patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@xilinx.com>
To: Ajit Khaparde <ajit.khaparde@broadcom.com>,
	Somnath Kotur <somnath.kotur@broadcom.com>,
	Hemant Agrawal <hemant.agrawal@nxp.com>,
	Sachin Saxena <sachin.saxena@oss.nxp.com>,
	Ziyang Xuan <xuanziyang2@huawei.com>,
	Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>,
	Guoyang Zhou <zhouguoyang@huawei.com>,
	Andrew Boyer <aboyer@pensando.io>,
	Shijith Thotton <sthotton@marvell.com>,
	Srisivasubramanian Srinivasan <srinivasan@marvell.com>,
	Matan Azrad <matan@nvidia.com>,
	Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
	Zyta Szpak <zr@semihalf.com>, Liron Himi <lironh@marvell.com>,
	Rasesh Mody <rmody@marvell.com>,
	Devendra Singh Rawat <dsinghrawat@marvell.com>
Cc: Long Li <longli@microsoft.com>, <stable@dpdk.org>,
	<longli@linuxonhyperv.com>,
	Stephen Hemminger <sthemmin@microsoft.com>, <dev@dpdk.org>
Subject: Re: [Patch v2] net/netvsc: fix the calculation of checksums based on mbuf flag
Date: Tue, 26 Apr 2022 22:56:57 +0100	[thread overview]
Message-ID: <2f759901-4b8f-c273-0c36-50fa12e984a6@xilinx.com> (raw)
In-Reply-To: <1648143968-17947-1-git-send-email-longli@linuxonhyperv.com>

On 3/24/2022 5:46 PM, longli@linuxonhyperv.com wrote:
> From: Long Li <longli@microsoft.com>
> 
> The netvsc should use RTE_MBUF_F_TX_L4_MASK and check the masked value to
> decide the correct way to calculate checksums.
> 
> Not checking for RTE_MBUF_F_TX_L4_MASK results in incorrect RNDIS packets
> sent to VSP and incorrect checksums calculated by the VSP.
> 
> Fixes: 4e9c73e96e ("net/netvsc: add Hyper-V network device")
> Cc: stable@dpdk.org
> Signed-off-by: Long Li <longli@microsoft.com>
> ---
>   drivers/net/netvsc/hn_rxtx.c | 13 +++++++++----
>   1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
> index 028f176c7e..34f40be5b8 100644
> --- a/drivers/net/netvsc/hn_rxtx.c
> +++ b/drivers/net/netvsc/hn_rxtx.c
> @@ -1348,8 +1348,11 @@ static void hn_encap(struct rndis_packet_msg *pkt,
>   			*pi_data = NDIS_LSO2_INFO_MAKEIPV4(hlen,
>   							   m->tso_segsz);
>   		}
> -	} else if (m->ol_flags &
> -		   (RTE_MBUF_F_TX_TCP_CKSUM | RTE_MBUF_F_TX_UDP_CKSUM | RTE_MBUF_F_TX_IP_CKSUM)) {
> +	} else if ((m->ol_flags & RTE_MBUF_F_TX_L4_MASK) ==
> +			RTE_MBUF_F_TX_TCP_CKSUM ||
> +		   (m->ol_flags & RTE_MBUF_F_TX_L4_MASK) ==
> +			RTE_MBUF_F_TX_UDP_CKSUM ||
> +		   (m->ol_flags & RTE_MBUF_F_TX_IP_CKSUM)) {

As far as I can see following drivers also has similar issue, can 
maintainers (cc'ed) of below drivers check:

bnxt
dpaa
hnic
ionic
liquidio
mlx4
mvneta
mvpp2
qede

  parent reply	other threads:[~2022-04-26 21:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-24 17:46 longli
2022-04-26 21:56 ` Ferruh Yigit
2022-04-26 21:56 ` Ferruh Yigit [this message]
2022-04-26 22:09   ` Ajit Khaparde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2f759901-4b8f-c273-0c36-50fa12e984a6@xilinx.com \
    --to=ferruh.yigit@xilinx.com \
    --cc=aboyer@pensando.io \
    --cc=ajit.khaparde@broadcom.com \
    --cc=cloud.wangxiaoyun@huawei.com \
    --cc=dev@dpdk.org \
    --cc=dsinghrawat@marvell.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=lironh@marvell.com \
    --cc=longli@linuxonhyperv.com \
    --cc=longli@microsoft.com \
    --cc=matan@nvidia.com \
    --cc=rmody@marvell.com \
    --cc=sachin.saxena@oss.nxp.com \
    --cc=somnath.kotur@broadcom.com \
    --cc=srinivasan@marvell.com \
    --cc=stable@dpdk.org \
    --cc=sthemmin@microsoft.com \
    --cc=sthotton@marvell.com \
    --cc=viacheslavo@nvidia.com \
    --cc=xuanziyang2@huawei.com \
    --cc=zhouguoyang@huawei.com \
    --cc=zr@semihalf.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).