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:   Mon, 3 Dec 2018 23:51:43 -0800
From:   Eric Dumazet <edumazet@...gle.com>
To:     Cong Wang <xiyou.wangcong@...il.com>
Cc:     netdev <netdev@...r.kernel.org>,
        Saeed Mahameed <saeedm@...lanox.com>,
        Tariq Toukan <tariqt@...lanox.com>
Subject: Re: [Patch net v3] mlx5: force CHECKSUM_NONE for short ethernet frames

On Mon, Dec 3, 2018 at 11:30 PM Cong Wang <xiyou.wangcong@...il.com> wrote:
>
> On Mon, Dec 3, 2018 at 11:08 PM Eric Dumazet <edumazet@...gle.com> wrote:
> >
> > The hardware has probably validated the L3 & L4 checksum just fine.
> >
> > Note that if ip_summed is CHECKSUM_UNNECESSARY, the padding bytes (if any)
> > have no impact on the csum that has been verified by the NIC.
>
>
> Why? Why does the hardware validates L3/L4 checksum when it
> supplies a full-packet checksum? What's its point here?

The point is that the driver author can decide what is best.

For native IP+TCP or IP+UDP, the NIC has the ability to fully
understand the packet and fully validate the checksum.

>
> If it really validates L3/L4 checksum, then a full-packet checksum
> is not needed.

Yes, this is exactly what CHECKSUM_UNNECESSARY means.
linux stack does not have to perform the check another time.

For example, no call to csum_partial() is needed, even for IPv6+TCP or IPv6+UDP

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ