From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomasz Duszynski Subject: Re: [PATCH 1/2] net/mrvl: switch to the new Rx offload API Date: Tue, 23 Jan 2018 09:14:25 +0100 Message-ID: <20180123081425.GA27011@sh.semihalf.local> References: <1516622670-21120-1-git-send-email-tdu@semihalf.com> <1516622670-21120-2-git-send-email-tdu@semihalf.com> <928d3a16-5417-8a20-3d9b-78dba6802e66@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Tomasz Duszynski , dev@dpdk.org, mw@semihalf.com, dima@marvell.com, nsamsono@marvell.com, Jianbo.liu@arm.com, jck@semihalf.com To: Ferruh Yigit Return-path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id 496DF397D for ; Tue, 23 Jan 2018 09:14:27 +0100 (CET) Received: by mail-wm0-f42.google.com with SMTP id g1so43939wmg.2 for ; Tue, 23 Jan 2018 00:14:27 -0800 (PST) Content-Disposition: inline In-Reply-To: <928d3a16-5417-8a20-3d9b-78dba6802e66@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > > <...> > > > @@ -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 requeste= d) > > +{ > > + uint64_t mandatory =3D dev->data->dev_conf.rxmode.offloads; > > + uint64_t supported =3D MRVL_RX_OFFLOADS; > > + uint64_t unsupported =3D requested & ~supported; > > + uint64_t missing =3D (requested & mandatory) ^ mandatory; > > Isn't this same as: > missing =3D mandatory & ~requested; > > Since "unsupported" use same logic, it can be easier to understand this w= ay. 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 corre= ct :) > > <...> -- - Tomasz Duszy=C5=84ski