From: Jay Vosburgh <jay.vosburgh@canonical.com>
To: Moshe Tal <moshet@nvidia.com>
Cc: Veaceslav Falico <vfalico@gmail.com>,
Andy Gospodarek <andy@greyhouse.net>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, Jussi Maki <joamaki@gmail.com>,
Daniel Borkmann <daniel@iogearbox.net>,
Tariq Toukan <tariqt@nvidia.com>,
Saeed Mahameed <saeedm@nvidia.com>, Gal Pressman <gal@nvidia.com>
Subject: Re: [PATCH net v2] bonding: Fix extraction of ports from the packet headers
Date: Sun, 16 Jan 2022 12:23:37 -0800 [thread overview]
Message-ID: <3153.1642364617@famine> (raw)
In-Reply-To: <20220116173929.6590-1-moshet@nvidia.com>
Moshe Tal <moshet@nvidia.com> wrote:
>Wrong hash sends single stream to multiple output interfaces.
>
>The offset calculation was relative to skb->head, fix it to be relative
>to skb->data.
>
>Fixes: a815bde56b15 ("net, bonding: Refactor bond_xmit_hash for use with
>xdp_buff")
>Reviewed-by: Jussi Maki <joamaki@gmail.com>
>Reviewed-by: Saeed Mahameed <saeedm@nvidia.com>
>Reviewed-by: Gal Pressman <gal@nvidia.com>
>Signed-off-by: Moshe Tal <moshet@nvidia.com>
Acked-by: Jay Vosburgh <jay.vosburgh@canonical.com>
>---
>
>Notes:
> v2: Change the offset to be relative to skb->data in higher level to
> handle the case when skb is NULL.
>
> drivers/net/bonding/bond_main.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>index fce80b57f15b..ec498ce70f35 100644
>--- a/drivers/net/bonding/bond_main.c
>+++ b/drivers/net/bonding/bond_main.c
>@@ -3874,8 +3874,8 @@ u32 bond_xmit_hash(struct bonding *bond, struct sk_buff *skb)
> skb->l4_hash)
> return skb->hash;
>
>- return __bond_xmit_hash(bond, skb, skb->head, skb->protocol,
>- skb->mac_header, skb->network_header,
>+ return __bond_xmit_hash(bond, skb, skb->data, skb->protocol,
>+ skb_mac_offset(skb), skb_network_offset(skb),
> skb_headlen(skb));
> }
>
>--
>2.26.2
>
next prev parent reply other threads:[~2022-01-16 20:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-16 17:39 [PATCH net v2] bonding: Fix extraction of ports from the packet headers Moshe Tal
2022-01-16 20:23 ` Jay Vosburgh [this message]
2022-01-16 23:40 ` patchwork-bot+netdevbpf
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=3153.1642364617@famine \
--to=jay.vosburgh@canonical.com \
--cc=andy@greyhouse.net \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=gal@nvidia.com \
--cc=joamaki@gmail.com \
--cc=kuba@kernel.org \
--cc=moshet@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@nvidia.com \
--cc=tariqt@nvidia.com \
--cc=vfalico@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.