diff mbox series

[v2] net/core/dev.c : Use skb_is_gso

Message ID 20201026013435.1910386-1-yili@winhong.com
State Changes Requested
Delegated to: David Miller
Headers show
Series [v2] net/core/dev.c : Use skb_is_gso | expand

Checks

Context Check Description
jkicinski/cover_letter success Link
jkicinski/fixes_present success Link
jkicinski/patch_count success Link
jkicinski/tree_selection success Guessed tree name to be net-next
jkicinski/subject_prefix warning Target tree name not specified in the subject
jkicinski/source_inline success Was 0 now: 0
jkicinski/verify_signedoff success Link
jkicinski/module_param success Was 0 now: 0
jkicinski/build_32bit fail Errors and warnings before: 14 this patch: 14
jkicinski/kdoc success Errors and warnings before: 0 this patch: 0
jkicinski/verify_fixes success Link
jkicinski/checkpatch fail Link
jkicinski/build_allmodconfig_warn success Errors and warnings before: 10 this patch: 10
jkicinski/header_inline success Link
jkicinski/stable success Stable not CCed

Commit Message

Yi Li Oct. 26, 2020, 1:34 a.m. UTC
Trivial fix to use func skb_is_gso in place of
test for skb_shinfo(skb)->gso_size.

Signed-off-by: Yi Li <yili@winhong.com>
---
 net/core/dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jakub Kicinski Oct. 26, 2020, 4:24 p.m. UTC | #1
On Mon, 26 Oct 2020 09:34:35 +0800 Yi Li wrote:
> Trivial fix to use func skb_is_gso in place of
> test for skb_shinfo(skb)->gso_size.
> 
> Signed-off-by: Yi Li <yili@winhong.com>

So you gave up on all the drivers now?

Please replace the word "fix" in the commit message with "refactoring",
the resulting code is identical.

The subject should be something like

net: core: Use skb_is_gso() in skb_checksum_help()

> diff --git a/net/core/dev.c b/net/core/dev.c
> index 9499a414d67e..55f66e108059 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -3205,7 +3205,7 @@ int skb_checksum_help(struct sk_buff *skb)
>  	if (skb->ip_summed == CHECKSUM_COMPLETE)
>  		goto out_set_summed;
>  
> -	if (unlikely(skb_shinfo(skb)->gso_size)) {
> +	if (unlikely(skb_is_gso(skb))) {
>  		skb_warn_bad_offload(skb);
>  		return -EINVAL;
>  	}
diff mbox series

Patch

diff --git a/net/core/dev.c b/net/core/dev.c
index 9499a414d67e..55f66e108059 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3205,7 +3205,7 @@  int skb_checksum_help(struct sk_buff *skb)
 	if (skb->ip_summed == CHECKSUM_COMPLETE)
 		goto out_set_summed;
 
-	if (unlikely(skb_shinfo(skb)->gso_size)) {
+	if (unlikely(skb_is_gso(skb))) {
 		skb_warn_bad_offload(skb);
 		return -EINVAL;
 	}