Message ID | 20201012140456.26001-3-elibr@nvidia.com |
---|---|
State | Superseded |
Headers | show |
Series | DPDK: adaptations to 20.11 | expand |
On 10/12/20 5:04 PM, Eli Britstein wrote: > Following DPDK commit [1], RTE_ETH_DEV_CLOSE_REMOVE flag is obsolete. > Behavior is equivalent to "always on". Remove the usage of that flag. > > [1] 638d40ba9622 ("ethdev: remove old close behaviour") > > Signed-off-by: Eli Britstein <elibr@nvidia.com> > --- > lib/netdev-dpdk.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c > index c048aaa75..710bc86c9 100644 > --- a/lib/netdev-dpdk.c > +++ b/lib/netdev-dpdk.c > @@ -1447,7 +1447,6 @@ netdev_dpdk_destruct(struct netdev *netdev) > struct netdev_dpdk *dev = netdev_dpdk_cast(netdev); > struct rte_device *rte_dev; > struct rte_eth_dev *eth_dev; > - bool remove_on_close; > > ovs_mutex_lock(&dpdk_mutex); > > @@ -1459,9 +1458,6 @@ netdev_dpdk_destruct(struct netdev *netdev) > * FIXME: avoid direct access to DPDK internal array rte_eth_devices. > */ > eth_dev = &rte_eth_devices[dev->port_id]; > - remove_on_close = > - eth_dev->data && > - (eth_dev->data->dev_flags & RTE_ETH_DEV_CLOSE_REMOVE); > rte_dev = eth_dev->device; > > /* Remove the eth device. */ > @@ -1472,7 +1468,7 @@ netdev_dpdk_destruct(struct netdev *netdev) > * are not supported), or if all the eth devices belonging to the rte > * device are closed. > */ Description above should be fixed as well > - if (!remove_on_close || !netdev_dpdk_get_num_ports(rte_dev)) { > + if (!netdev_dpdk_get_num_ports(rte_dev)) { > int ret = rte_dev_remove(rte_dev); > > if (ret < 0) { >
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index c048aaa75..710bc86c9 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -1447,7 +1447,6 @@ netdev_dpdk_destruct(struct netdev *netdev) struct netdev_dpdk *dev = netdev_dpdk_cast(netdev); struct rte_device *rte_dev; struct rte_eth_dev *eth_dev; - bool remove_on_close; ovs_mutex_lock(&dpdk_mutex); @@ -1459,9 +1458,6 @@ netdev_dpdk_destruct(struct netdev *netdev) * FIXME: avoid direct access to DPDK internal array rte_eth_devices. */ eth_dev = &rte_eth_devices[dev->port_id]; - remove_on_close = - eth_dev->data && - (eth_dev->data->dev_flags & RTE_ETH_DEV_CLOSE_REMOVE); rte_dev = eth_dev->device; /* Remove the eth device. */ @@ -1472,7 +1468,7 @@ netdev_dpdk_destruct(struct netdev *netdev) * are not supported), or if all the eth devices belonging to the rte * device are closed. */ - if (!remove_on_close || !netdev_dpdk_get_num_ports(rte_dev)) { + if (!netdev_dpdk_get_num_ports(rte_dev)) { int ret = rte_dev_remove(rte_dev); if (ret < 0) {
Following DPDK commit [1], RTE_ETH_DEV_CLOSE_REMOVE flag is obsolete. Behavior is equivalent to "always on". Remove the usage of that flag. [1] 638d40ba9622 ("ethdev: remove old close behaviour") Signed-off-by: Eli Britstein <elibr@nvidia.com> --- lib/netdev-dpdk.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)