Re: [dpdk-dev] [PATCH 2/4] net/failsafe: change back-reference from sub-device

2019-02-28 Thread Stephen Hemminger
On Thu, 28 Feb 2019 15:49:26 + Raslan Darawsheh wrote: > +/* sdev: (struct sub_device *) */ > +#define FSDEV_FROM_SUBDEV(sdev) \ > + (&rte_eth_devices[sdev->fs_port_id]) If at all possible, inline functions are preferable to macros because inline functions don't allow side effects and ke

[dpdk-dev] [PATCH 2/4] net/failsafe: change back-reference from sub-device

2019-02-28 Thread Raslan Darawsheh
In multiprocess context, the sub-device structure is shared between processes. The reference to the failsafe device was a per process pointer. It's changed to port id which is the same for all processes. Signed-off-by: Raslan Darawsheh Signed-off-by: Thomas Monjalon --- drivers/net/failsafe/fai