This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, master has been updated via 6f07a40cc29b4b9ebc69a3badc31de7497ae6253 (commit) from 257b08b35ceea41bad5a7f1c626496cf111e657a (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 6f07a40cc29b4b9ebc69a3badc31de7497ae6253 Author: Matias Elo matias.elo@nokia.com Date: Wed Feb 7 14:55:56 2018 +0200
linux-gen: dpdk: conf NICs to drop packets if no descriptors are available
Configure DPDK NIC RX rings to automatically drop packets if no free descriptors are available. Without this option being set, some NICs (e.g. 82599, X540) will stop receiving packets from all RX queues if any of the RX queues is not emptied fast enough.
Fixes: https://bugs.linaro.org/show_bug.cgi?id=3618
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/pktio/dpdk.c b/platform/linux-generic/pktio/dpdk.c index bd6920e6..53ddf2fc 100644 --- a/platform/linux-generic/pktio/dpdk.c +++ b/platform/linux-generic/pktio/dpdk.c @@ -1402,6 +1402,8 @@ static int dpdk_open(odp_pktio_t id ODP_UNUSED,
static int dpdk_start(pktio_entry_t *pktio_entry) { + struct rte_eth_dev_info dev_info; + struct rte_eth_rxconf *rxconf; pkt_dpdk_t *pkt_dpdk = &pktio_entry->s.pkt_dpdk; uint8_t port_id = pkt_dpdk->port_id; int ret; @@ -1420,7 +1422,6 @@ static int dpdk_start(pktio_entry_t *pktio_entry) } /* Init TX queues */ for (i = 0; i < pktio_entry->s.num_out_queue; i++) { - struct rte_eth_dev_info dev_info; const struct rte_eth_txconf *txconf = NULL; int ip_ena = pktio_entry->s.config.pktout.bit.ipv4_chksum_ena; int udp_ena = pktio_entry->s.config.pktout.bit.udp_chksum_ena; @@ -1469,10 +1470,13 @@ static int dpdk_start(pktio_entry_t *pktio_entry) } } /* Init RX queues */ + rte_eth_dev_info_get(port_id, &dev_info); + rxconf = &dev_info.default_rxconf; + rxconf->rx_drop_en = 1; for (i = 0; i < pktio_entry->s.num_in_queue; i++) { ret = rte_eth_rx_queue_setup(port_id, i, DPDK_NM_RX_DESC, rte_eth_dev_socket_id(port_id), - NULL, pkt_dpdk->pkt_pool); + rxconf, pkt_dpdk->pkt_pool); if (ret < 0) { ODP_ERR("Queue setup failed: err=%d, port=%" PRIu8 "\n", ret, port_id);
-----------------------------------------------------------------------
Summary of changes: platform/linux-generic/pktio/dpdk.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
hooks/post-receive