From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id 21F377D30 for ; Thu, 4 Jan 2018 11:12:49 +0100 (CET) Received: by mail-wm0-f68.google.com with SMTP id a79so2450538wma.0 for ; Thu, 04 Jan 2018 02:12:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-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=0gL8ajnEjIgtdFAwy6PKKhCHZRIfW1dWFN7KteEqNAk=; b=E5+YrtzSGXcLczW4ZpMeqtAIJwXKS6rf06IvPQfgahm9y9YLB8E/Q/F4aeLKIcqBTf cHcDGlJeXy9yNJ9bFFCuxQu/WR4eV2NRxE6KVIYLNMSuPh76f7c5TfaFfkms+n6gscFu GZjf7W1owuuWoN/aAtOwF8esFwjAdTVgeJyLVSzkmeCZ4zx0e4GxUM7FE6zpBcwwx/ja x8Gy4T3sOEWKZI3klYiqskHig7tqpMAHx1/JVNUrdNkJcPK7U9ODJmPs1KucQD5NWrPa FH3xcAnScz4zjE5MESZJSJuP10XmECKUSBVXRc3rvjVrDznoO6bM9jkNqJsbYU/AuyHy p5xg== 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=0gL8ajnEjIgtdFAwy6PKKhCHZRIfW1dWFN7KteEqNAk=; b=I1Ij1ndUUWT4KlzcGeSvb/Tf/ObfI4gYh2Q8tAAMh6Z6XU5glfuIea+CBKPheGRj47 0in1KGs9x8Ag0O396fZqvgOKgGHf2p3OYpd6a05pWZYLebcmzcz5P7WyamssD/X8KXSh 3PS6zBnIzA4G41yaiPRjl98F+8A28bLhH5n586hAXhGCOTKUt0vQ+5beCcL/cHBAfyW/ sNl29XwhIWVVjyhKX0kWAEXYbd/NKAZr4qeTogOypCQGftVLleIa/i+16mPkylbPOtRk Z9Pq+o4DKWs9MneXhhQTpYnVC1E85w0fuMTKCWSFCNqTsF6rd+kpC5DznYsHeemdBvfW btHg== X-Gm-Message-State: AKGB3mI0rpPS7t7plnUVr9y1jkhP6rYSUnhU4PKfW84jv5mrV7hSvwz+ RC4/RexEa0Lvq9P1dkBOiFOw X-Google-Smtp-Source: ACJfBotiJBcjmokXHn/xhj36LXlDPBLrDA6DcjjF5uh7PFaUd8cngo7y2dfu5Yas0WE4yH0IsRxXug== X-Received: by 10.80.206.26 with SMTP id y26mr6973537edi.117.1515060768772; Thu, 04 Jan 2018 02:12:48 -0800 (PST) Received: from laranjeiro-vm.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id u21sm1743917edl.54.2018.01.04.02.12.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 Jan 2018 02:12:48 -0800 (PST) Date: Thu, 4 Jan 2018 11:12:03 +0100 From: Nelio Laranjeiro To: Shahaf Shuler Cc: yskoh@mellanox.com, adrien.mazarguil@6wind.com, dev@dpdk.org Message-ID: <20180104101203.qov5cb6kurarivtv@laranjeiro-vm.dev.6wind.com> References: <20171123120252.143695-1-shahafs@mellanox.com> <43ca45bbb786d83b7870b590f00a5b1027a33076.1514963302.git.shahafs@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <43ca45bbb786d83b7870b590f00a5b1027a33076.1514963302.git.shahafs@mellanox.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v2 5/7] net/mlx5: convert to new Rx offloads 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: Thu, 04 Jan 2018 10:12:49 -0000 Hi Shahaf, Please see bellow, On Wed, Jan 03, 2018 at 09:16:15AM +0200, Shahaf Shuler wrote: > Ethdev Rx offloads API has changed since: > > commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API") > > This commit support the new Rx offloads API. > > Signed-off-by: Shahaf Shuler > Acked-by: Nelio Laranjeiro > --- I have to remove my acked-by on this patch, there is an issue. > +/** > + * Checks if the per-queue offload configuration is valid. > + * > + * @param priv > + * Pointer to private structure. > + * @param offloads > + * Per-queue offloads configuration. > + * > + * @return > + * 1 if the configuration is valid, 0 otherwise. > + */ > +static int > +priv_is_rx_queue_offloads_allowed(struct priv *priv, uint64_t offloads) > +{ > + uint64_t port_offloads = priv->dev->data->dev_conf.rxmode.offloads; > + uint64_t queue_supp_offloads = > + mlx5_priv_get_rx_queue_offloads(priv); > + uint64_t port_supp_offloads = mlx5_priv_get_rx_port_offloads(priv); > + > + if ((offloads & (queue_supp_offloads | port_supp_offloads)) != > + offloads) > + return 0; > + if (((port_offloads ^ offloads) & port_supp_offloads)) port_offloads is wrongly named, it should be device_offloads and this make things clearer. Seems the mask is wrong as port_supp_offloads is a subset of device_offloads. For my understanding you want this statement to be true when the request offloads is not supported, in such situation it should be a negative mask i.e. ~(port_supp_offloads | queue_supp_offloads). > + return 0; > + return 1; > +} The same issue is present in Tx side. Regards, -- Nélio Laranjeiro 6WIND