From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id 22C632A6C for ; Fri, 28 Oct 2016 14:19:14 +0200 (CEST) Received: by mail-wm0-f47.google.com with SMTP id e69so97095356wmg.0 for ; Fri, 28 Oct 2016 05:19:14 -0700 (PDT) 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:in-reply-to; bh=eAPgiygoToQVFifPrSoQ+GFTK28IN3+/TbAE7CrzIL8=; b=K57aLPjjmN9RgSe/Hw5Z6szL3prJoNXn991PheZmpa5LG/7PvPEEynEwJG9Fn9M0W9 6wkKotDb1MZ02vCRGK8ase6W2orKGfxOQ3Rz21Ep8+XU2GUHVhkSJz3K3Wodx4UWuHXQ vfdt0sjQr13Yi5+m29MM5ZwdZY/hArk77OOZmZ5YlOZNxdfOx7ZTjg7iOmxlQs9TTs4f OpF6zZ8vEdXLy8hIxOkAR+K3v4tmwh81eUP3P6iOORZV0jxu4izvLtdwZ9/4ci/cb9ov unkf79oNj42tRf2wffLtQ8Fx23sz2LbfwB8yfUH1wPPTeknLWQ6U8GZEDNLjuSaOyiWZ G5KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=eAPgiygoToQVFifPrSoQ+GFTK28IN3+/TbAE7CrzIL8=; b=eC7Bv56/5lR60WRV6ZZJZO5KgeD7Fslb08hIdZswHxCtOFQAB80i+L5rb1GGQ9E02W AQHBFnXNvrKirS7QxycHZLRSl9adbTxcdYg5gaA9MJ7zpg/drLDbadZP0MlbIs1lcKwt d09vhTyaF5KG4Qy8qlMWbtoDCRih3IHZcxA97I/wNnMpGdK9jBQrS1rse4o8s2rk1tLq 7iOKoA49IIBjIl2756Bxxm11lfEjBcgFCef8c3JwEFwTZO+xFe0cbVTA+zuTI+6ZJVFv /lw03XrNQ3TfjAdnPUXbNU0LkReEh6msShK8SOEQAxpNJhcgk+h+6SYtva+tmPO2A2za T+yQ== X-Gm-Message-State: ABUngvckmgxyr9GGpp0ddMzxDGMjF3Q0EHtBqtmwo8uJt12F7NnmBUgWDRFQobHANWJ27MQj X-Received: by 10.28.149.209 with SMTP id x200mr3630381wmd.123.1477657153791; Fri, 28 Oct 2016 05:19:13 -0700 (PDT) Received: from 6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id d72sm8658136wmd.17.2016.10.28.05.19.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Oct 2016 05:19:13 -0700 (PDT) Date: Fri, 28 Oct 2016 14:19:06 +0200 From: Adrien Mazarguil To: Raslan Darawsheh Message-ID: <20161028121906.GW5733@6wind.com> References: <937aac679e571c4fff8ab720f4dd910fe10a283e.1477296585.git.rasland@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <937aac679e571c4fff8ab720f4dd910fe10a283e.1477296585.git.rasland@mellanox.com> Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix handling of small mbuf sizes X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2016 12:19:14 -0000 On Mon, Oct 24, 2016 at 11:10:59AM +0300, Raslan Darawsheh wrote: > When mbufs are smaller than MRU, multi-segment support must be enabled to > default set when not in promiscuous or allmulticast modes. > > Fixes: 9964b965ad69 ("net/mlx5: re-add Rx scatter support") > > Signed-off-by: Raslan Darawsheh > --- > drivers/net/mlx5/mlx5_rxq.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c > index 4dc5cc3..62253ed 100644 > --- a/drivers/net/mlx5/mlx5_rxq.c > +++ b/drivers/net/mlx5/mlx5_rxq.c > @@ -946,6 +946,12 @@ rxq_ctrl_setup(struct rte_eth_dev *dev, struct rxq_ctrl *rxq_ctrl, > (void)conf; /* Thresholds configuration (ignored). */ > /* Enable scattered packets support for this queue if necessary. */ > assert(mb_len >= RTE_PKTMBUF_HEADROOM); > + /* If smaller than MRU, multi-segment support must be enabled. */ > + if (mb_len < (priv->mtu > dev->data->dev_conf.rxmode.max_rx_pkt_len ? > + dev->data->dev_conf.rxmode.max_rx_pkt_len : > + priv->mtu > + )) Let's move poor "))" to the end of the previous line. > + dev->data->dev_conf.rxmode.jumbo_frame = 1; > if ((dev->data->dev_conf.rxmode.jumbo_frame) && > (dev->data->dev_conf.rxmode.max_rx_pkt_len > > (mb_len - RTE_PKTMBUF_HEADROOM))) { > -- > 1.9.1 Besides the above comment: Acked-by: Adrien Mazarguil -- Adrien Mazarguil 6WIND