Re: [dpdk-dev] [PATCH 06/11] ethdev: allow ownership operations on unused port

2018-05-10 Thread Thomas Monjalon
10/05/2018 22:26, Stephen Hemminger: > On Wed, 9 May 2018 11:43:32 +0200 > Thomas Monjalon wrote: > > > - RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > > + if (port_id >= RTE_MAX_ETHPORTS || ethdev->data->name[0] == '\0') { > > Since name being empty now has significance, why not int

Re: [dpdk-dev] [PATCH 06/11] ethdev: allow ownership operations on unused port

2018-05-10 Thread Stephen Hemminger
On Wed, 9 May 2018 11:43:32 +0200 Thomas Monjalon wrote: > - RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > + if (port_id >= RTE_MAX_ETHPORTS || ethdev->data->name[0] == '\0') { Since name being empty now has significance, why not introduce an macro or inline function to make the

Re: [dpdk-dev] [PATCH 06/11] ethdev: allow ownership operations on unused port

2018-05-09 Thread Thomas Monjalon
09/05/2018 20:00, Ferruh Yigit: > On 5/9/2018 10:43 AM, Thomas Monjalon wrote: > > From: Matan Azrad > > > > When the state will be updated later than in allocation, > > we may need to update the ownership of a port which is > > still in state unused. > > > > It will be used to take ownership of

Re: [dpdk-dev] [PATCH 06/11] ethdev: allow ownership operations on unused port

2018-05-09 Thread Ferruh Yigit
On 5/9/2018 10:43 AM, Thomas Monjalon wrote: > From: Matan Azrad > > When the state will be updated later than in allocation, > we may need to update the ownership of a port which is > still in state unused. > > It will be used to take ownership of a port before it is > declared as available for