From: Xin Long <lucien.xin@gmail.com>
To: network dev <netdev@vger.kernel.org>, linux-sctp@vger.kernel.org
Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
Neil Horman <nhorman@tuxdriver.com>,
davem@davemloft.net, Jakub Kicinski <kuba@kernel.org>,
Alexander Duyck <alexander.duyck@gmail.com>
Subject: [PATCHv2 net-next 2/2] udp: remove CRC flag from dev features in __skb_udp_tunnel_segment
Date: Fri, 15 Jan 2021 16:21:12 +0800 [thread overview]
Message-ID: <fb2283b264aac66379356ec7a1f17243f02504a1.1610698811.git.lucien.xin@gmail.com> (raw)
In-Reply-To: <bfecc76748f5dc64eaddf501c258dca9efb92bdf.1610698811.git.lucien.xin@gmail.com>
In-Reply-To: <cover.1610698811.git.lucien.xin@gmail.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
net/ipv4/udp_offload.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
index ff39e94..1168d18 100644
--- a/net/ipv4/udp_offload.c
+++ b/net/ipv4/udp_offload.c
@@ -68,8 +68,8 @@ static struct sk_buff *__skb_udp_tunnel_segment(struct sk_buff *skb,
(NETIF_F_HW_CSUM | NETIF_F_IP_CSUM))));
features &= skb->dev->hw_enc_features;
- /* CRC checksum can't be handled by HW when it's a UDP tunneling packet. */
- features &= ~NETIF_F_SCTP_CRC;
+ if (need_csum)
+ features &= ~NETIF_F_SCTP_CRC;
/* The only checksum offload we care about from here on out is the
* outer one so strip the existing checksum feature flags and
--
2.1.0
next prev parent reply other threads:[~2021-01-15 8:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-15 8:21 [PATCHv2 net-next 0/2] net: fix the features flag in sctp_gso_segment Xin Long
2021-01-15 8:21 ` [PATCHv2 net-next 1/2] net: move the hsize check to the else block in skb_segment Xin Long
2021-01-15 8:21 ` Xin Long [this message]
2021-01-15 9:31 ` [PATCHv2 net-next 0/2] net: fix the features flag in sctp_gso_segment Xin Long
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=fb2283b264aac66379356ec7a1f17243f02504a1.1610698811.git.lucien.xin@gmail.com \
--to=lucien.xin@gmail.com \
--cc=alexander.duyck@gmail.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-sctp@vger.kernel.org \
--cc=marcelo.leitner@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.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).