[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpXjmJBrq8gnQ899JCZW_dFSuNmVQvbFQB0V=G1i=YSDrg@mail.gmail.com>
Date: Tue, 22 Jan 2019 13:30:00 -0800
From: Cong Wang <xiyou.wangcong@...il.com>
To: Saeed Mahameed <saeedm@...lanox.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Linux Kernel Network Developers <netdev@...r.kernel.org>,
Eric Dumazet <edumazet@...gle.com>,
Tariq Toukan <tariqt@...lanox.com>,
Nikola Ciprich <nikola.ciprich@...uxbox.cz>
Subject: Re: [net 1/4] net/mlx5e: Force CHECKSUM_UNNECESSARY for short
ethernet frames
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.
> 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.
> 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.
> + */
> + 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!
Powered by blists - more mailing lists