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]
Message-ID: <CAM_iQpUqhaJ0_hJZfZoJtu50K5bae0oR5f1jAUVR1F7id6YLzQ@mail.gmail.com>
Date:   Tue, 4 Dec 2018 12:35:34 -0800
From:   Cong Wang <xiyou.wangcong@...il.com>
To:     saeedm@....mellanox.co.il
Cc:     Eric Dumazet <edumazet@...gle.com>,
        Linux Kernel Network Developers <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 Tue, Dec 4, 2018 at 11:17 AM Saeed Mahameed
<saeedm@....mellanox.co.il> wrote:
>
> On Mon, Dec 3, 2018 at 11:52 PM Eric Dumazet <edumazet@...gle.com> wrote:
> >
> > 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.
>
> Also for Native IP4 and IP6 plain L3 packets.
> The Hardware validates the csum when it can, and always provides
> checksum complete for all packets.
> One of the reason to validate is that sometimes we want to skip
> checksum complete, but still leverage the hw validation,
> like in your patch :), or LRO case, or many other cases in other
> kernels/OSes/drivers.

This sounds wrong to me too.

If the HW already validates it, the software doesn't need to do it,
therefore must skip hw csum for performance gain.,


>
> So i agree with Eric, let's jump to checksum_unnecessary for short packets.

This is odd, if Eric is right, then we should completely get rid of
CHECKSUM_COMPLETE. Short packets are not exceptions.

I still don't understand why people including Eric kept fixing this
thing which could be just removed from the very beginning.
Sounds like nobody even looked into it until my patch.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ