From: Daniel Borkmann <daniel@iogearbox•net>
To: Jesper Dangaard Brouer <brouer@redhat•com>,
Daniel Borkmann <borkmann@iogearbox•net>,
Alexei Starovoitov <alexei.starovoitov@gmail•com>
Cc: John Fastabend <john.r.fastabend@intel•com>,
netdev@vger•kernel.org, saeedm@mellanox•com
Subject: Re: [RFC net-next PATCH 2/5] mlx5: fix bug reading rss_hash_type from CQE
Date: Fri, 19 May 2017 17:47:01 +0200 [thread overview]
Message-ID: <591F1375.8020307@iogearbox.net> (raw)
In-Reply-To: <149512209807.14733.12774004120782832472.stgit@firesoul>
On 05/18/2017 05:41 PM, Jesper Dangaard Brouer wrote:
> Masks for extracting part of the Completion Queue Entry (CQE)
> field rss_hash_type was swapped, namely CQE_RSS_HTYPE_IP and
> CQE_RSS_HTYPE_L4.
>
> The bug resulted in setting skb->l4_hash, even-though the
> rss_hash_type indicated that hash was NOT computed over the
> L4 (UDP or TCP) part of the packet.
>
> Added comments from the datasheet, to make it more clear what
> these masks are selecting.
>
> Signed-off-by: Jesper Dangaard Brouer <brouer@redhat•com>
> ---
Stand-alone fix for -net tree?
> include/linux/mlx5/device.h | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/mlx5/device.h b/include/linux/mlx5/device.h
> index dd9a263ed368..a940ec6a046c 100644
> --- a/include/linux/mlx5/device.h
> +++ b/include/linux/mlx5/device.h
> @@ -787,8 +787,14 @@ enum {
> };
>
> enum {
> - CQE_RSS_HTYPE_IP = 0x3 << 6,
> - CQE_RSS_HTYPE_L4 = 0x3 << 2,
> + CQE_RSS_HTYPE_IP = 0x3 << 2,
> + /* cqe->rss_hash_type[3:2] - IP destination selected for hash
> + * (00 = none, 01 = IPv4, 10 = IPv6, 11 = Reserved)
> + */
> + CQE_RSS_HTYPE_L4 = 0x3 << 6,
> + /* cqe->rss_hash_type[7:6] - L4 destination selected for hash
> + * (00 = none, 01 = TCP. 10 = UDP, 11 = IPSEC.SPI
> + */
> };
>
> enum {
>
next prev parent reply other threads:[~2017-05-19 15:47 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-18 15:41 [RFC net-next PATCH 0/5] XDP driver feature API and handling change to xdp_buff Jesper Dangaard Brouer
2017-05-18 15:41 ` [RFC net-next PATCH 1/5] samples/bpf: xdp_tx_iptunnel make use of map_data[] Jesper Dangaard Brouer
2017-05-19 15:45 ` Daniel Borkmann
2017-05-18 15:41 ` [RFC net-next PATCH 2/5] mlx5: fix bug reading rss_hash_type from CQE Jesper Dangaard Brouer
2017-05-19 15:47 ` Daniel Borkmann [this message]
2017-05-19 23:38 ` David Miller
2017-05-22 18:27 ` Jesper Dangaard Brouer
2017-05-18 15:41 ` [RFC net-next PATCH 3/5] net: introduce XDP driver features interface Jesper Dangaard Brouer
2017-05-19 17:13 ` Daniel Borkmann
2017-05-19 23:37 ` David Miller
2017-05-20 7:53 ` Jesper Dangaard Brouer
2017-05-21 0:58 ` Daniel Borkmann
2017-05-22 14:49 ` Jesper Dangaard Brouer
2017-05-22 17:07 ` Daniel Borkmann
2017-05-30 9:58 ` Jesper Dangaard Brouer
2017-05-18 15:41 ` [RFC net-next PATCH 4/5] net: new XDP feature for reading HW rxhash from drivers Jesper Dangaard Brouer
2017-05-19 11:47 ` Jesper Dangaard Brouer
2017-05-20 3:07 ` Alexei Starovoitov
2017-05-20 3:21 ` Jakub Kicinski
2017-05-20 3:34 ` Alexei Starovoitov
2017-05-20 4:13 ` Jakub Kicinski
2017-05-21 15:55 ` Jesper Dangaard Brouer
2017-05-22 3:21 ` Alexei Starovoitov
2017-05-22 4:12 ` John Fastabend
2017-05-20 16:16 ` Tom Herbert
2017-05-21 16:04 ` Jesper Dangaard Brouer
2017-05-21 22:10 ` Tom Herbert
2017-05-22 6:39 ` Jesper Dangaard Brouer
2017-05-22 20:42 ` Jesper Dangaard Brouer
2017-05-22 21:32 ` Tom Herbert
2017-05-18 15:41 ` [RFC net-next PATCH 5/5] mlx5: add XDP rxhash feature for driver mlx5 Jesper Dangaard Brouer
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=591F1375.8020307@iogearbox.net \
--to=daniel@iogearbox$(echo .)net \
--cc=alexei.starovoitov@gmail$(echo .)com \
--cc=borkmann@iogearbox$(echo .)net \
--cc=brouer@redhat$(echo .)com \
--cc=john.r.fastabend@intel$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=saeedm@mellanox$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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