diff options
author | Jianfeng Tan <henry.tjf@antfin.com> | 2019-06-13 15:14:12 +0800 |
---|---|---|
committer | Konstantin Ananyev <konstantin.ananyev@intel.com> | 2019-06-14 17:54:42 +0100 |
commit | cecfc87fc706a6ac819aa213b368072fa011bcae (patch) | |
tree | 6b23f4f7d92fd6e90c5434d7ddb6b1eefebda9b4 /examples | |
parent | 37854f54f97e07b5443a7ec3eb19dcfad6ace5ed (diff) |
dpdk: move to v18.11 as default DPDK version
DPDK v18.11 is the latest LTS verison.
As of the API/ABI changes introduced in ether at v18.08, we cannot
compile l4fwd and nginx with old DPDK versions.
Change-Id: I225302d9a257e9bce4aa22ff84d76a57170e7eb7
Signed-off-by: Jianfeng Tan <henry.tjf@antfin.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/l4fwd/main.c | 3 | ||||
-rw-r--r-- | examples/l4fwd/pkt.c | 2 | ||||
-rw-r--r-- | examples/l4fwd/port.h | 11 |
3 files changed, 6 insertions, 10 deletions
diff --git a/examples/l4fwd/main.c b/examples/l4fwd/main.c index ff572be..9396403 100644 --- a/examples/l4fwd/main.c +++ b/examples/l4fwd/main.c @@ -68,8 +68,7 @@ static char proto_name[3][10] = {"udp", "tcp", ""}; static const struct rte_eth_conf port_conf_default = { .rxmode = { - .hw_vlan_strip = 1, - .jumbo_frame = 0, + .offloads = DEV_RX_OFFLOAD_VLAN_STRIP, }, }; diff --git a/examples/l4fwd/pkt.c b/examples/l4fwd/pkt.c index 6dfad0e..43aa9c8 100644 --- a/examples/l4fwd/pkt.c +++ b/examples/l4fwd/pkt.c @@ -946,7 +946,7 @@ setup_rx_cb(const struct netbe_port *uprt, struct netbe_lcore *lc, { int32_t rc; uint32_t i, n, smask; - void *cb; + const void *cb; const struct ptype2cb *ptype2cb; static const struct ptype2cb tcp_ptype2cb[] = { diff --git a/examples/l4fwd/port.h b/examples/l4fwd/port.h index b727b1b..a154844 100644 --- a/examples/l4fwd/port.h +++ b/examples/l4fwd/port.h @@ -180,16 +180,18 @@ port_init(struct netbe_port *uprt, uint32_t proto) if ((uprt->rx_offload & RX_CSUM_OFFLOAD) != 0) { RTE_LOG(ERR, USER1, "%s(%u): enabling RX csum offload;\n", __func__, uprt->id); - port_conf.rxmode.hw_ip_checksum = 1; + port_conf.rxmode.offloads |= uprt->rx_offload & RX_CSUM_OFFLOAD; } port_conf.rxmode.max_rx_pkt_len = uprt->mtu + ETHER_CRC_LEN; if (port_conf.rxmode.max_rx_pkt_len > ETHER_MAX_LEN) - port_conf.rxmode.jumbo_frame = 1; + port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME; rc = update_rss_conf(uprt, &dev_info, &port_conf, proto); if (rc != 0) return rc; + port_conf.txmode.offloads = uprt->tx_offload; + rc = rte_eth_dev_configure(uprt->id, uprt->nb_lcore, uprt->nb_lcore, &port_conf); RTE_LOG(NOTICE, USER1, @@ -220,11 +222,6 @@ queue_init(struct netbe_port *uprt, struct rte_mempool *mp) nb_txd = RTE_MIN(TX_RING_SIZE, dev_info.tx_desc_lim.nb_max); dev_info.default_txconf.tx_free_thresh = nb_txd / 2; - if (uprt->tx_offload != 0) { - RTE_LOG(ERR, USER1, "%s(%u): enabling full featured TX;\n", - __func__, uprt->id); - dev_info.default_txconf.txq_flags = 0; - } for (q = 0; q < uprt->nb_lcore; q++) { rc = rte_eth_rx_queue_setup(uprt->id, q, nb_rxd, |