Re: [dpdk-dev] [PATCH 3/4] net/failsafe: replace local sub-device with shared data

2019-02-28 Thread Stephen Hemminger
On Thu, 28 Feb 2019 15:49:27 + Raslan Darawsheh wrote: > > /* sdev: (struct sub_device *) */ > #define ETH(sdev) \ > - ((sdev)->edev) > + (sdev->data == NULL ? NULL : &rte_eth_devices[sdev->data->port_id]) Macro arguments should always be parenthesised and you can shorten by usin

[dpdk-dev] [PATCH 3/4] net/failsafe: replace local sub-device with shared data

2019-02-28 Thread Raslan Darawsheh
In multiprocess context, the pointer to sub-device is shared between processes. Previously, it was a pointer to per process eth_dev so it's needed to replace this dependency. Signed-off-by: Thomas Monjalon Signed-off-by: Raslan Darawsheh --- drivers/net/failsafe/failsafe_eal.c | 2 +- driv