patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "humin (Q)" <humin29@huawei.com>
To: Jun Qiu <jun.qiu@jaguarmicro.com>, <dev@dpdk.org>
Cc: <chas3@att.com>, <radu.nicolau@intel.com>, <stable@dpdk.org>
Subject: Re: [PATCH] net/bonding: fix xmit l34 hash calculate for tcp
Date: Tue, 26 Jul 2022 10:02:10 +0800	[thread overview]
Message-ID: <dc0413da-3b76-f262-9b91-7500f9557cd5@huawei.com> (raw)
In-Reply-To: <20220726004844.6354-1-jun.qiu@jaguarmicro.com>

Acked-by: Min Hu (Connor) <humin29@huawei.com>

在 2022/7/26 8:48, Jun Qiu 写道:
> In the following two cases, tcp_hdr + sizeof(*tcp_hdr) == pkt_end,
> and the TCP port is not taken into account in calculating the HASH
> value of TCP packets. TCP connections with the same source and
> destination IP addresses will be hashed to the same slave port,
> which may cause load imbalance.
> 1. TCP Pure ACK packets with no options, The header length is 20
> and there is no data.
> 2. A TCP packet contains data, but the first seg of the mbuf
> contains only the header information (ETH, IP, TCP), and the
> data is in subsequent segs, which is usually the case in the
> indirect mbuf used for zero-copy.
>
> Fixes: 726158060d55 ("net/bonding: fix potential out of bounds read")
> Cc: stable@dpdk.org
>
> Signed-off-by: Jun Qiu <jun.qiu@jaguarmicro.com>
> ---
>   drivers/net/bonding/rte_eth_bond_pmd.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
> index 73e6972035..3bf978e2df 100644
> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
> @@ -768,7 +768,7 @@ burst_xmit_l34_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
>   						((char *)ipv4_hdr +
>   							ip_hdr_offset);
>   					if ((size_t)tcp_hdr + sizeof(*tcp_hdr)
> -							< pkt_end)
> +							<= pkt_end)
>   						l4hash = HASH_L4_PORTS(tcp_hdr);
>   				} else if (ipv4_hdr->next_proto_id ==
>   								IPPROTO_UDP) {

  reply	other threads:[~2022-07-26  2:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-26  0:48 Jun Qiu
2022-07-26  2:02 ` humin (Q) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-07-25 11:11 Jun Qiu
2022-07-25 12:42 ` humin (Q)
2022-07-26  0:52   ` 答复: " Jun Qiu

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=dc0413da-3b76-f262-9b91-7500f9557cd5@huawei.com \
    --to=humin29@huawei.com \
    --cc=chas3@att.com \
    --cc=dev@dpdk.org \
    --cc=jun.qiu@jaguarmicro.com \
    --cc=radu.nicolau@intel.com \
    --cc=stable@dpdk.org \
    /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).