From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=SPvcj0yNUIAgHZBWE1AuGZ7G6xxf7mT7AZKDSp3P/rE=; b=1908SAfYvhM4Mt7lzaiuHMZ/3KzqUjTR6N9vVOtYDoGW0s2YTzsfs3/dFcHa2BzD4n POPEgYCqlFbT+fPIJupxEy3tTjX2By8xPcuiZgmw9YDSnXqROMS7H214yTL+VVKJ1pyQ 78QSUvtXG+s0ax8QFH6J32R9DBU0cNm29E5SCQuOzgSZL+t6TuyMdbGoPItRv9GYTYzC TtNSGYdLPCJ4YQOAGHBTSCxqZmEtukk4B4FEzhLp+TA3idLyS2G86lnuvUTjJN3OFjom ZjukGk1k+rqIKveyH7JSfTduBSOVfqqGPiP7SEkc5M8R0hp0L9KA6PsVgAaiOFqHjXIN rVVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=SPvcj0yNUIAgHZBWE1AuGZ7G6xxf7mT7AZKDSp3P/rE=; b=n111/Wv/9sBqUyzt3W0o1IucPXOnNosktH52SmRBoE0mYqW/7ERdzGuI6bjJqKNJkr DaU7CEfkpefVz0EYt7jhHMd5VBulXtZBjnqhnuM5Bi1VbE455g0PWTuxWLVJFhMfQsjE h14ELo57Cw94IHOwG/+NfPQCDfHxqrQO377pt8+kWkbgri+x9H8kD8sFGLbBFp55LeTm ZN6jC2/KST/X9FOGYje7iVdrAbxJa4cnYTYP+iC2jM0Xj/vB4wXDwZeiKkfzg7xq6CJH wun0OsOHxE3Hlr6ug8X6mB9Uhj1L6K/LwR050VoFpbcc+vUgw/VwpfOENntHuGge05qp TPoQ== X-Gm-Message-State: AKwxytekqUSkKTqUBQEmpVUM+Khnq70QHzAAdLfNSVR+7kzXMqv9Rg0B gmR6f2KxhDwmw/6ErIvZik49aQ== X-Google-Smtp-Source: AH8x226+hKh5VNKyn90l1J9hZt2yKzMh+mRhBUdlJvMoontbIxHT2f96vLnabzxYbBwquaLcI3Uzhg== X-Received: by 10.80.176.69 with SMTP id i63mr3247864edd.140.1516695267036; Tue, 23 Jan 2018 00:14:27 -0800 (PST) Received: from localhost (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id d4sm3677780eda.78.2018.01.23.00.14.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Jan 2018 00:14:26 -0800 (PST) Date: Tue, 23 Jan 2018 09:14:25 +0100 From: Tomasz Duszynski To: Ferruh Yigit Cc: Tomasz Duszynski , dev@dpdk.org, mw@semihalf.com, dima@marvell.com, nsamsono@marvell.com, Jianbo.liu@arm.com, jck@semihalf.com 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-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <928d3a16-5417-8a20-3d9b-78dba6802e66@intel.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH 1/2] net/mrvl: switch to the new Rx offload API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2018 08:14:27 -0000 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