[ovs-dev,net-next,2/6] netdev-dpdk: Allow dpdk-ethdev not support setting mtu

Message ID 1523537572-2595-3-git-send-email-xiangxia.m.yue@gmail.com
State Rejected
Delegated to: Ian Stokes
Headers show
Series
  • Add dpdk-bond support
Related show

Commit Message

Tonghao Zhang April 12, 2018, 12:52 p.m.
From: Tonghao Zhang <xiangxia.m.yue@gmail.com>

The bond device in dpdk-17.11 does not support setting mtu,
but dpdk upstream supports it now. For more information, see:

http://dpdk.org/browse/dpdk/commit/?id=55b58a7374554cd1c86f4a13a0e2f54e9ba6fe4d

This patch allows to create bond devices which not support
setting mtu.

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
---
 lib/netdev-dpdk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 30dc76d..ef95c43 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -721,7 +721,7 @@  dpdk_eth_dev_queue_setup(struct netdev_dpdk *dev, int n_rxq, int n_txq)
         }
 
         diag = rte_eth_dev_set_mtu(dev->port_id, dev->mtu);
-        if (diag) {
+        if (diag && diag != -ENOTSUP) {
             VLOG_ERR("Interface %s MTU (%d) setup error: %s",
                     dev->up.name, dev->mtu, rte_strerror(-diag));
             break;