On 15.11.2018 20:26, Kevin Traynor wrote:
> On 11/15/2018 04:38 PM, Ophir Munk wrote:
>> Hi Kevin,
>> Thanks for this RFC. Please find comments inline.
>>
>>> -----Original Message-----
>>> From: Kevin Traynor [mailto:[email protected]]
>>> Sent: Thursday, November 08, 2018 8:37 PM
>>> To: [email protected]; Ophir Munk <[email protected]>;
>>> [email protected]; [email protected]
>>> Cc: Kevin Traynor <[email protected]>
>>> Subject: [RFC dpdk-latest 2/2] netdev-dpdk: Replace
>>> rte_eth_dev_attach/detach.
>>>
>>> rte_eth_dev_attach/detach have been removed from DPDK 18.11. Replace
>>> them with rte_dev_probe/remove.
>>>
>>
>> I have submitted a patch on the same issue, see [1]. 
>> Please suggest how to unify our patches.
>>
> 
> Hi Ophir,
> 
> I looked through your patch and it is trying to do two things:
> 1. update OVS to use DPDK 18.11
> 2. enable additional functionality/representors etc in OVS based on
> using DPDK 18.11
> 
> I don't think that needs to be all in one patch and there isn't really
> any throw away work in doing 1. on it's own. My suggestion is that we
> proceed with 1. through the patches I sent, and then (or in parallel)
> you can send patches to cover 2.
> 
> What do people think?

+1. Sounds good.


> thanks,
> Kevin.
> 
>>> Signed-off-by: Kevin Traynor <[email protected]>
>>> ---
>>>  lilib/librte_ethdev/rte_ethdev_core.hb/netdev-dpdk.c | 29 
>>> +++++++++++++++++------------
>>>  1 file changed, 17 insertions(+), 12 deletions(-)
>>>
>>> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index
>>> 10c4879a1..190d50007 100644
>>> --- a/lib/netdev-dpdk.c
>>> +++ b/lib/netdev-dpdk.c
>>> @@ -1351,5 +1351,5 @@ netdev_dpdk_destruct(struct netdev *netdev)  {
>>>      struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);
>>> -    char devname[RTE_ETH_NAME_MAX_LEN];
>>> +    struct rte_eth_dev_info dev_info;
>>>
>>>      ovs_mutex_lock(&dpdk_mutex);
>>> @@ -1360,8 +1360,9 @@ netdev_dpdk_destruct(struct netdev *netdev)
>>>      if (dev->attached) {
>>>          rte_eth_dev_close(dev->port_id);
>>> -        if (rte_eth_dev_detach(dev->port_id, devname) < 0) {
>>> +        rte_eth_dev_info_get(dev->port_id, &dev_info);
>>
>> I suggest having a direct access to the device (rather than accessing 
>> dev_info).
>> rte_eth_devices[dev->port_id].device;

I don't think that we can use 'rte_eth_devices' directly because it
marked as @internal in dpdk code. Also it's located in file
lib/librte_ethdev/rte_ethdev_core.h, which has following disclaimer:

/**
 * @file
 *
 * RTE Ethernet Device internal header.
 *
 * This header contains internal data types. But they are still part of the
 * public API because they are used by inline functions in the published API.
 *
 * Applications should not use these directly.
 *
 */

I'd like to raise this issue in DPDK community, because test-pmd and some
example apps are using this array directly.

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to