From: Jakub Kicinski <kuba@kernel.org>
To: Ronak Doshi <doshir@vmware.com>
Cc: <netdev@vger.kernel.org>, "VMware, Inc." <pv-drivers@vmware.com>,
"David S. Miller" <davem@davemloft.net>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 net-next 3/4] vmxnet3: add geneve and vxlan tunnel offload support
Date: Thu, 28 May 2020 12:35:05 -0700 [thread overview]
Message-ID: <20200528123505.25baf888@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> (raw)
In-Reply-To: <20200528183615.27212-4-doshir@vmware.com>
On Thu, 28 May 2020 11:36:14 -0700 Ronak Doshi wrote:
> @@ -1168,13 +1220,21 @@ vmxnet3_rx_csum(struct vmxnet3_adapter *adapter,
> (le32_to_cpu(gdesc->dword[3]) &
> VMXNET3_RCD_CSUM_OK) == VMXNET3_RCD_CSUM_OK) {
> skb->ip_summed = CHECKSUM_UNNECESSARY;
> - BUG_ON(!(gdesc->rcd.tcp || gdesc->rcd.udp));
> - BUG_ON(gdesc->rcd.frg);
> + BUG_ON(!(gdesc->rcd.tcp || gdesc->rcd.udp) &&
> + !(le32_to_cpu(gdesc->dword[0]) &
> + (1UL << VMXNET3_RCD_HDR_INNER_SHIFT)));
> + BUG_ON(gdesc->rcd.frg &&
> + !(le32_to_cpu(gdesc->dword[0]) &
> + (1UL << VMXNET3_RCD_HDR_INNER_SHIFT)));
> } else if (gdesc->rcd.v6 && (le32_to_cpu(gdesc->dword[3]) &
> (1 << VMXNET3_RCD_TUC_SHIFT))) {
> skb->ip_summed = CHECKSUM_UNNECESSARY;
> - BUG_ON(!(gdesc->rcd.tcp || gdesc->rcd.udp));
> - BUG_ON(gdesc->rcd.frg);
> + BUG_ON(!(gdesc->rcd.tcp || gdesc->rcd.udp) &&
> + !(le32_to_cpu(gdesc->dword[0]) &
> + (1UL << VMXNET3_RCD_HDR_INNER_SHIFT)));
> + BUG_ON(gdesc->rcd.frg &&
> + !(le32_to_cpu(gdesc->dword[0]) &
> + (1UL << VMXNET3_RCD_HDR_INNER_SHIFT)));
> } else {
> if (gdesc->rcd.csum) {
> skb->csum = htons(gdesc->rcd.csum);
Seems fairly extreme to trigger BUG_ONs if rx descriptor doesn't
contain valid checksum offload flags :S WARN_ON_ONCE() and ignore
checsum or drop packet would be more than sufficient.
next prev parent reply other threads:[~2020-05-28 19:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-28 18:36 [PATCH v2 net-next 0/4] vmxnet3: upgrade to version 4 Ronak Doshi
2020-05-28 18:36 ` [PATCH v2 net-next 1/4] vmxnet3: prepare for version 4 changes Ronak Doshi
2020-05-28 18:36 ` [PATCH v2 net-next 2/4] vmxnet3: add support to get/set rx flow hash Ronak Doshi
2020-05-28 19:20 ` Michal Kubecek
2020-05-28 19:29 ` Ronak Doshi
2020-05-28 20:15 ` Michal Kubecek
2020-05-28 21:09 ` Ronak Doshi
2020-05-28 18:36 ` [PATCH v2 net-next 3/4] vmxnet3: add geneve and vxlan tunnel offload support Ronak Doshi
2020-05-28 19:35 ` Jakub Kicinski [this message]
2020-05-28 21:18 ` Ronak Doshi
2020-05-28 21:43 ` David Miller
2020-05-28 21:57 ` Ronak Doshi
2020-05-28 18:36 ` [PATCH v2 net-next 4/4] vmxnet3: update to version 4 Ronak Doshi
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=20200528123505.25baf888@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=doshir@vmware.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pv-drivers@vmware.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).