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 <t...@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. Or just putting following comment may be useful enough: "mandatory subset of requested subset of supported", assuming it is correct :) <...>