aboutsummaryrefslogtreecommitdiffstats
path: root/examples/udpfwd/pkt.c
diff options
context:
space:
mode:
authorMohammad Abdul Awal <mohammad.abdul.awal@intel.com>2016-06-15 09:21:55 +0100
committerMohammad Abdul Awal <mohammad.abdul.awal@intel.com>2016-09-06 13:16:52 +0100
commit8ae38dfb285ab9843312964b3081b2c52ba857dc (patch)
tree87dd74f1ca5668df4b859fdb7633ac7f83bbf75e /examples/udpfwd/pkt.c
parent58a3674671da166ff3e3ec4dd552eb60adf3652b (diff)
Initial working version of RSS
The patch enables RSS support for TLDK udpfwd application. The number of rx queues and tx queues are equal to the number of lcore enabled for backend operation. NICs calculate the RSS hash based on the UDP dest port only. The RSS hash key is calculated at runtime based on the number of queues enebaled. Change-Id: I06006a4606f8faad8f16241348b2ce19b70335e5 Signed-off-by: Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
Diffstat (limited to 'examples/udpfwd/pkt.c')
-rw-r--r--examples/udpfwd/pkt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/udpfwd/pkt.c b/examples/udpfwd/pkt.c
index af87b08..6832b9a 100644
--- a/examples/udpfwd/pkt.c
+++ b/examples/udpfwd/pkt.c
@@ -23,7 +23,6 @@ _mbuf_tx_offload(uint64_t il2, uint64_t il3, uint64_t il4, uint64_t tso,
return il2 | il3 << 7 | il4 << 16 | tso << 24 | ol3 << 40 | ol2 << 49;
}
-
static inline void
fill_pkt_hdr_len(struct rte_mbuf *m, uint32_t l2, uint32_t l3, uint32_t l4)
{
@@ -223,7 +222,7 @@ reassemble(struct rte_mbuf *m, struct netbe_lcore *lc, uint64_t tms,
tbl = lc->ftbl;
dr = &lc->death_row;
- l3cs = lc->prt[port].port.rx_offload & DEV_RX_OFFLOAD_IPV4_CKSUM;
+ l3cs = lc->prtq[port].port.rx_offload & DEV_RX_OFFLOAD_IPV4_CKSUM;
if (RTE_ETH_IS_IPV4_HDR(m->packet_type)) {
@@ -508,7 +507,8 @@ typen_rx_callback(uint8_t port, __rte_unused uint16_t queue,
}
int
-setup_rx_cb(const struct netbe_port *uprt, struct netbe_lcore *lc)
+setup_rx_cb(const struct netbe_port *uprt, struct netbe_lcore *lc,
+ uint16_t qid)
{
int32_t i, rc;
uint32_t smask;
@@ -589,7 +589,7 @@ setup_rx_cb(const struct netbe_port *uprt, struct netbe_lcore *lc)
for (i = 0; i != RTE_DIM(ptype2cb); i++) {
if ((smask & ptype2cb[i].mask) == ptype2cb[i].mask) {
- cb = rte_eth_add_rx_callback(uprt->id, 0,
+ cb = rte_eth_add_rx_callback(uprt->id, qid,
ptype2cb[i].fn, lc);
rc = -rte_errno;
RTE_LOG(ERR, USER1,