[ovs-dev] [PATCH V3 2/2] netdev-dpdk: Remove usage of RTE_ETH_DEV_CLOSE_REMOVE flag
Eli Britstein
elibr at nvidia.com
Wed Oct 14 15:14:04 UTC 2020
On 10/14/2020 6:10 PM, Stokes, Ian wrote:
> External email: Use caution opening links or attachments
>
>
>> On 10/14/2020 5:25 PM, Ilya Maximets wrote:
>>> External email: Use caution opening links or attachments
>>>
>>>
>>> On 10/14/20 4:05 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 at nvidia.com>
>>>> ---
>>> This change is for dpdk-latest, right? DPDK patch is not in 19.11.
>> Right. Added in v4. Also, dpdk-latest should be rebased.
> I've rebased and pushed dpdk-latest yesterday, is there a new commit that needs rebasing again?
Sorry, I missed that rebase.
>
> Regards
> Ian
>
>>>> lib/netdev-dpdk.c | 12 +++---------
>>>> 1 file changed, 3 insertions(+), 9 deletions(-)
>>>>
>>>> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
>>>> index c048aaa75..76eec449a 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,20 +1458,15 @@ 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. */
>>>> rte_eth_dev_close(dev->port_id);
>>>>
>>>> - /* Remove this rte device and all its eth devices if flag
>>>> - * RTE_ETH_DEV_CLOSE_REMOVE is not supported (which means
>> representors
>>>> - * are not supported), or if all the eth devices belonging to the rte
>>>> - * device are closed.
>>>> + /* Remove this rte device and all its eth devices 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) {
>>>>
More information about the dev
mailing list