net: add inline function skb_csum_is_sctp
[ Upstream commit fa82117010430aff2ce86400f7328f55a31b48a6 ] This patch is to define a inline function skb_csum_is_sctp(), and also replace all places where it checks if it's a SCTP CSUM skb. This function would be used later in many networking drivers in the following patches. Suggested-by: Alexander Duyck <alexander.duyck@gmail.com> Signed-off-by: Xin Long <lucien.xin@gmail.com> Reviewed-by: Alexander Duyck <alexanderduyck@fb.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Stable-dep-of: db0b124f02ba ("igc: Enhance Qbv scheduling by using first flag bit") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
67349025f0
commit
4794d07fe6
@@ -3631,7 +3631,7 @@ static struct sk_buff *validate_xmit_vlan(struct sk_buff *skb,
|
||||
int skb_csum_hwoffload_help(struct sk_buff *skb,
|
||||
const netdev_features_t features)
|
||||
{
|
||||
if (unlikely(skb->csum_not_inet))
|
||||
if (unlikely(skb_csum_is_sctp(skb)))
|
||||
return !!(features & NETIF_F_SCTP_CRC) ? 0 :
|
||||
skb_crc32c_csum_help(skb);
|
||||
|
||||
|
Reference in New Issue
Block a user