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 /app | |
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 'app')
-rw-r--r-- | app/nginx/src/tldk/be.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/app/nginx/src/tldk/be.c b/app/nginx/src/tldk/be.c index 3d17b60..1b7b496 100644 --- a/app/nginx/src/tldk/be.c +++ b/app/nginx/src/tldk/be.c @@ -64,7 +64,7 @@ typedef uint8_t dpdk_port_t; static const struct rte_eth_conf port_conf_default = { .rxmode = { - .hw_vlan_strip = 1, + .offloads = DEV_RX_OFFLOAD_VLAN_STRIP, }, }; @@ -201,14 +201,18 @@ port_init(const struct tldk_port_conf *pcf) if ((pcf->rx_offload & RX_CSUM_OFFLOAD) != 0) { RTE_LOG(ERR, USER1, "%s(%u): enabling RX csum offload;\n", __func__, pcf->id); - port_conf.rxmode.hw_ip_checksum = 1; + port_conf.rxmode.offloads |= pcf->rx_offload & RX_CSUM_OFFLOAD; } port_conf.rxmode.max_rx_pkt_len = pcf->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; port_conf.rxmode.mq_mode = ETH_MQ_RX_RSS; port_conf.rx_adv_conf.rss_conf.rss_hf = ETH_RSS_IP | ETH_RSS_TCP; + port_conf.rx_adv_conf.rss_conf.rss_hf &= + dev_info.flow_type_rss_offloads; + + port_conf.txmode.offloads = pcf->tx_offload; rc = rte_eth_dev_configure(pcf->id, pcf->nb_queues, pcf->nb_queues, &port_conf); @@ -296,13 +300,11 @@ be_queue_init(struct tldk_ctx *tcx, const tldk_conf_t *cf) uint32_t port_id, i, nb_rxd, nb_txd; struct rte_eth_dev_info dev_info; const struct tldk_ctx_conf *ctx; - const struct tldk_port_conf *pcf; ctx = tcx->cf; for (i = 0; i < ctx->nb_dev; i++) { port_id = ctx->dev[i].port; queue_id = ctx->dev[i].queue; - pcf = &cf->port[port_id]; rte_eth_dev_info_get(port_id, &dev_info); @@ -312,13 +314,6 @@ be_queue_init(struct tldk_ctx *tcx, const tldk_conf_t *cf) 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 (pcf->tx_offload != 0) { - RTE_LOG(ERR, USER1, - "%s(port=%u): enabling full featured TX;\n", - __func__, port_id); - dev_info.default_txconf.txq_flags = 0; - } - socket = rte_eth_dev_socket_id(port_id); rc = rte_eth_rx_queue_setup(port_id, queue_id, nb_rxd, @@ -999,7 +994,7 @@ setup_rx_cb(const struct tldk_dev *td, struct tldk_ctx *tcx) { int32_t rc; uint32_t i, n, smask; - void *cb; + const void *cb; const struct ptype2cb *ptype2cb; static const struct ptype2cb tcp_ptype2cb[] = { |