lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 9 Mar 2022 21:43:16 -0800
From:   Eric Dumazet <edumazet@...gle.com>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     Eric Dumazet <eric.dumazet@...il.com>,
        "David S . Miller" <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>,
        Alexander Duyck <alexanderduyck@...com>,
        Coco Li <lixiaoyan@...gle.com>,
        Tariq Toukan <tariqt@...dia.com>,
        Saeed Mahameed <saeedm@...dia.com>,
        Leon Romanovsky <leon@...nel.org>
Subject: Re: [PATCH v3 net-next 14/14] mlx5: support BIG TCP packets

On Wed, Mar 9, 2022 at 9:40 PM Eric Dumazet <edumazet@...gle.com> wrote:
>
> On Wed, Mar 9, 2022 at 8:44 PM Jakub Kicinski <kuba@...nel.org> wrote:
> >
> > On Wed,  9 Mar 2022 16:28:46 -0800 Eric Dumazet wrote:
> > > @@ -918,12 +953,27 @@ void mlx5i_sq_xmit(struct mlx5e_txqsq *sq, struct sk_buff *skb,
> > >       eseg->mss = attr.mss;
> > >
> > >       if (attr.ihs) {
> > > -             memcpy(eseg->inline_hdr.start, skb->data, attr.ihs);
> > > +             if (unlikely(attr.hopbyhop)) {
> > > +                     /* remove the HBH header.
> > > +                      * Layout: [Ethernet header][IPv6 header][HBH][TCP header]
> > > +                      */
> > > +                     memcpy(eseg->inline_hdr.start, skb->data, ETH_HLEN + sizeof(*h6));
> > > +                     h6 = (struct ipv6hdr *)((char *)eseg->inline_hdr.start + ETH_HLEN);
> > > +                     h6->nexthdr = IPPROTO_TCP;
> > > +                     /* Copy the TCP header after the IPv6 one */
> > > +                     memcpy(h6 + 1,
> > > +                            skb->data + ETH_HLEN + sizeof(*h6) +
> > > +                                     sizeof(struct hop_jumbo_hdr),
> > > +                            tcp_hdrlen(skb));
> > > +                     /* Leave ipv6 payload_len set to 0, as LSO v2 specs request. */
> > > +             } else {
> > > +                     memcpy(eseg->inline_hdr.start, skb->data, attr.ihs);
> > > +             }
> >
> > Compiler says there's no h6 in mlx5i_sq_xmit().
>
> Ah, we missed CONFIG_MLX5_CORE_IPOIB=y it seems.
>
> Let me take a look before sending the fix.

I will squash this:

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
index c6f6ca2d216692e1d3fd99e540198b11145788cd..b4fc45ba1b347fb9ad0f46b9c091cc45e4d3d84f
100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
@@ -954,6 +954,8 @@ void mlx5i_sq_xmit(struct mlx5e_txqsq *sq, struct
sk_buff *skb,

        if (attr.ihs) {
                if (unlikely(attr.hopbyhop)) {
+                       struct ipv6hdr *h6;
+
                        /* remove the HBH header.
                         * Layout: [Ethernet header][IPv6
header][HBH][TCP header]
                         */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ