[dpdk-dev] [PATCH 1/2] net/mrvl: switch to the new Rx offload API

Tomasz Duszynski tdu at semihalf.com
Tue Jan 23 09:14:25 CET 2018


Hi Ferruh,

On Mon, Jan 22, 2018 at 05:53:45PM +0000, Ferruh Yigit wrote:
> On 1/22/2018 12:04 PM, Tomasz Duszynski wrote:
> > Since the old Rx offload API is now depracated
> > update the driver to use the latest one.
> >
> > Signed-off-by: Tomasz Duszynski <tdu at semihalf.com>
>
> <...>
>
> > @@ -1308,6 +1313,42 @@ mrvl_fill_bpool(struct mrvl_rxq *rxq, int num)
> >  }
> >
> >  /**
> > + * Check whether requested rx queue offloads match port offloads.
> > + *
> > + * @param
> > + *   dev Pointer to the device.
> > + * @param
> > + *   requested Bitmap of the requested offloads.
> > + *
> > + * @return
> > + *   1 if requested offloads are okay, 0 otherwise.
> > + */
> > +static int
> > +mrvl_rx_queue_offloads_okay(struct rte_eth_dev *dev, uint64_t requested)
> > +{
> > +	uint64_t mandatory = dev->data->dev_conf.rxmode.offloads;
> > +	uint64_t supported = MRVL_RX_OFFLOADS;
> > +	uint64_t unsupported = requested & ~supported;
> > +	uint64_t missing = (requested & mandatory) ^ mandatory;
>
> Isn't this same as:
> missing = mandatory & ~requested;
>
> Since "unsupported" use same logic, it can be easier to understand this way.

Fair enough. I'll prepare v2 then.
Thanks for catching this.

>
> Or just putting following comment may be useful enough:
> "mandatory subset of requested subset of supported", assuming it is correct :)
>
> <...>

--
- Tomasz Duszyński


More information about the dev mailing list