All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: Linux Kernel Network Developers <netdev@vger.kernel.org>
Cc: Saeed Mahameed <saeedm@mellanox.com>, Eric Dumazet <edumazet@google.com>
Subject: Re: [Patch net] mlx5: fixup checksum for ethernet padding
Date: Tue, 27 Nov 2018 15:23:50 -0800	[thread overview]
Message-ID: <CAM_iQpVFWStL2KazKSufohmGeGfyEAptBqQO7x9Hpi_w6Mygig@mail.gmail.com> (raw)
In-Reply-To: <20181127232142.7561-1-xiyou.wangcong@gmail.com>

On Tue, Nov 27, 2018 at 3:21 PM Cong Wang <xiyou.wangcong@gmail.com> wrote:
> +       if (proto == htons(ETH_P_IP)) {
> +               struct iphdr *ipv4 = ip_p;
> +
> +               pad_offset =  network_depth + be16_to_cpu(ipv4->tot_len);
> +       } else if (proto == htons(ETH_P_IPV6)) {
> +               struct ipv6hdr *ipv6 = ip_p;
> +
> +               pad_offset = network_depth + sizeof(struct ipv6hdr) +
> +                            be16_to_cpu(ipv6->payload_len);
> +       }
> +

Should return here for other protocols... Will fix this in v2.

  reply	other threads:[~2018-11-28 10:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-27 23:21 [Patch net] mlx5: fixup checksum for ethernet padding Cong Wang
2018-11-27 23:23 ` Cong Wang [this message]
2018-11-27 23:48 ` Eric Dumazet
2018-11-28  0:07   ` Cong Wang
2018-11-28  1:11     ` Saeed Mahameed
2018-11-28  1:38       ` Cong Wang
2018-11-28  1:25     ` Eric Dumazet
2018-11-28  1:42       ` Cong Wang
2018-11-28  1:48         ` Eric Dumazet
2018-11-28  1:52           ` Cong Wang
2018-11-29 21:51 ` kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAM_iQpVFWStL2KazKSufohmGeGfyEAptBqQO7x9Hpi_w6Mygig@mail.gmail.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.