2016-11-11 5:44 GMT-08:00 Binbin Xu <xu.binb...@zte.com.cn>: > If the eth device starts failed or vhost port is not running, > the flags of dpdk netdev should be restored. > > Signed-off-by: Binbin Xu <xu.binb...@zte.com.cn> > --- > lib/netdev-dpdk.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c > index 4ed7274..0d8da16 100644 > --- a/lib/netdev-dpdk.c > +++ b/lib/netdev-dpdk.c > @@ -2151,8 +2151,12 @@ netdev_dpdk_update_flags__(struct netdev_dpdk *dev, > if (dev->type == DPDK_DEV_ETH) { > if (dev->flags & NETDEV_UP) { > err = rte_eth_dev_start(dev->port_id); > - if (err) > + if (err) { > + VLOG_INFO("Start eth dev %s failed: %d\n", > + dev->up.name, err); > + dev->flags = *old_flagsp; > return -err; > + } > } > > if (dev->flags & NETDEV_PROMISC) { > @@ -2179,6 +2183,8 @@ netdev_dpdk_update_flags__(struct netdev_dpdk *dev, > memset(&dev->stats, 0, sizeof dev->stats); > rte_spinlock_unlock(&dev->stats_lock); > } > + } else { > + dev->flags = *old_flagsp; > } > }
I noticed that if I bring the device up or down while traffic is flowing, ovs-vswitchd crashes. I think we're not supposed to call rte_eth_dev_stop() while the device is running, so I sent a patch that checks for the flags in the rx/tx routines. _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev