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:   Fri, 25 Jan 2019 18:22:06 +0000
From:   Saeed Mahameed <saeedm@...lanox.com>
To:     "xiyou.wangcong@...il.com" <xiyou.wangcong@...il.com>
CC:     "davem@...emloft.net" <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Tariq Toukan <tariqt@...lanox.com>,
        "edumazet@...gle.com" <edumazet@...gle.com>,
        "nikola.ciprich@...uxbox.cz" <nikola.ciprich@...uxbox.cz>
Subject: Re: [net 1/4] net/mlx5e: Force CHECKSUM_UNNECESSARY for short
 ethernet frames

On Tue, 2019-01-22 at 13:30 -0800, Cong Wang wrote:
> On Fri, Jan 18, 2019 at 4:25 PM Saeed Mahameed <saeedm@...lanox.com>
> wrote:
> > From: Cong Wang <xiyou.wangcong@...il.com>
> 
> I don't know why you want to make me as the author here, but I never
> agree on _your_ updates on my previous patch.
> 
> Please see below.
> 

sorry, i just took your patch and worked on top of it, i thought you
would like to get the credit for this.


> 
> >  drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> > 
> > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
> > b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
> > index 1d0bb5ff8c26..f86e4804e83e 100644
> > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
> > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
> > @@ -732,6 +732,8 @@ static u8 get_ip_proto(struct sk_buff *skb, int
> > network_depth, __be16 proto)
> >                                             ((struct ipv6hdr
> > *)ip_p)->nexthdr;
> >  }
> > 
> > +#define short_frame(size) ((size) <= ETH_ZLEN + ETH_FCS_LEN)
> > +
> 
> I don't agree on unconditionally comparing with ETH_ZLEN +
> ETH_FCS_LEN.
> 

This is more relaxed and it covers both cases unconditionally. 

> 
> >  static inline void mlx5e_handle_csum(struct net_device *netdev,
> >                                      struct mlx5_cqe64 *cqe,
> >                                      struct mlx5e_rq *rq,
> > @@ -754,6 +756,17 @@ static inline void mlx5e_handle_csum(struct
> > net_device *netdev,
> >         if (unlikely(test_bit(MLX5E_RQ_STATE_NO_CSUM_COMPLETE, &rq-
> > >state)))
> >                 goto csum_unnecessary;
> > 
> > +       /* CQE csum doesn't cover padding octets in short ethernet
> > +        * frames. And the pad field is appended prior to
> > calculating
> > +        * and appending the FCS field.
> > +        *
> > +        * Detecting these padded frames requires to verify and
> > parse
> > +        * IP headers, so we simply force all those small frames to
> > be
> > +        * CHECKSUM_UNNECESSARY even if they are not padded.
> 
> This is inaccurate and misleading, it is unnecessary only if the
> packet
> passes the if check right below the goto label 'csum_unnecessary',
> otherwise still a CHECKSUM_NONE. IOW, you are not forcing anything
> here.
> 

yes, the comment is not 100% accurate, but it delivers the message.

> > +        */
> > +       if (short_frame(skb->len))
> 
> Missed an "unlikely()". Short frames are rare, comparing to non-short
> ones.
> 
> I respect your judgement on CHECKSUM_UNNECESSARY, even when
> I still disagree with you. Please respect me by not forcing me to
> accept
> any updates from you, IOW, kindly removing my name from anything
> in this commit, SoB and authorship.
> 
> Thank you for your understanding!

Again sorry about this, will be more careful in the future.

Thanks for your support and great work.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ