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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 18 Feb 2020 10:37:01 -0800
From:   Alexander Duyck <alexander.duyck@...il.com>
To:     Heiner Kallweit <hkallweit1@...il.com>
Cc:     David Miller <davem@...emloft.net>,
        Realtek linux nic maintainers <nic_swsd@...ltek.com>,
        Jay Cliburn <jcliburn@...il.com>,
        Chris Snook <chris.snook@...il.com>,
        Rasesh Mody <rmody@...vell.com>,
        Sudarsana Kalluru <skalluru@...vell.com>,
        GR-Linux-NIC-Dev@...vell.com,
        Christian Benvenuti <benve@...co.com>,
        Govindarajulu Varadarajan <_govind@....com>,
        Parvi Kaustubhi <pkaustub@...co.com>,
        Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
        Guo-Fu Tseng <cooldavid@...ldavid.org>,
        Shannon Nelson <snelson@...sando.io>,
        Pensando Drivers <drivers@...sando.io>,
        Timur Tabi <timur@...nel.org>,
        Jassi Brar <jaswinder.singh@...aro.org>,
        Ilias Apalodimas <ilias.apalodimas@...aro.org>,
        "K. Y. Srinivasan" <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Sasha Levin <sashal@...nel.org>,
        Ronak Doshi <doshir@...are.com>,
        "VMware, Inc." <pv-drivers@...are.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        intel-wired-lan <intel-wired-lan@...ts.osuosl.org>,
        linux-hyperv@...r.kernel.org,
        Linux USB Mailing List <linux-usb@...r.kernel.org>
Subject: Re: [PATCH net-next 2/3] r8169: use new helper tcp_v6_gso_csum_prep

On Mon, Feb 17, 2020 at 1:42 PM Heiner Kallweit <hkallweit1@...il.com> wrote:
>
> Simplify the code by using new helper tcp_v6_gso_csum_prep.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
> ---
>  drivers/net/ethernet/realtek/r8169_main.c | 26 ++---------------------
>  1 file changed, 2 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
> index 5a9143b50..75ba10069 100644
> --- a/drivers/net/ethernet/realtek/r8169_main.c
> +++ b/drivers/net/ethernet/realtek/r8169_main.c
> @@ -4108,29 +4108,6 @@ static bool rtl_test_hw_pad_bug(struct rtl8169_private *tp, struct sk_buff *skb)
>         return skb->len < ETH_ZLEN && tp->mac_version == RTL_GIGA_MAC_VER_34;
>  }
>
> -/* msdn_giant_send_check()
> - * According to the document of microsoft, the TCP Pseudo Header excludes the
> - * packet length for IPv6 TCP large packets.
> - */
> -static int msdn_giant_send_check(struct sk_buff *skb)
> -{
> -       const struct ipv6hdr *ipv6h;
> -       struct tcphdr *th;
> -       int ret;
> -
> -       ret = skb_cow_head(skb, 0);
> -       if (ret)
> -               return ret;
> -
> -       ipv6h = ipv6_hdr(skb);
> -       th = tcp_hdr(skb);
> -
> -       th->check = 0;
> -       th->check = ~tcp_v6_check(0, &ipv6h->saddr, &ipv6h->daddr, 0);
> -
> -       return ret;
> -}
> -
>  static void rtl8169_tso_csum_v1(struct sk_buff *skb, u32 *opts)
>  {
>         u32 mss = skb_shinfo(skb)->gso_size;
> @@ -4163,9 +4140,10 @@ static bool rtl8169_tso_csum_v2(struct rtl8169_private *tp,
>                         break;
>
>                 case htons(ETH_P_IPV6):
> -                       if (msdn_giant_send_check(skb))
> +                       if (skb_cow_head(skb, 0))
>                                 return false;
>
> +                       tcp_v6_gso_csum_prep(skb, false);
>                         opts[0] |= TD1_GTSENV6;
>                         break;
>

This change looks more or less identical to the one you made in
"drivers/net/usb/r8152.c" for patch 3. If you have to resubmit it
might make sense to pull that change out and include it here since
they are both essentially the same change.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ