Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GRO_DROP deprecation in Linux v5.12. #66

Open
wants to merge 1 commit into
base: v5.8.5.1
Choose a base branch
from

Conversation

quanium-89
Copy link

The check on the return value of rtw_napi_gro_receive() is not necessary any more for kernels > v5.12.

There is another pull request #64 that checks whether return value is GRO_MERGED_FREE and treats that as an error condition. But I don't think that is the correct behavior, since the underlying kernel API dev_gro_receive(), defined in net/core/dev.c also returns that status in previous Linux versions (e.g., v5.11.21), and yet the driver did not treat it as an error conditions previously. This pull request should preserve the original semantics of the driver code.

@jjsarton
Copy link

I have modified the file os_dep/linux/recv_linux.c as follow:
add the line
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 12, 0)) before:
#ifdef CONFIG_RTW_GRO

and the line
#endif after
#endif /* CONFIG_RTW_GRO */

This change work for me.

@quanium-89
Copy link
Author

I have modified the file os_dep/linux/recv_linux.c as follow:
add the line
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 12, 0)) before:
#ifdef CONFIG_RTW_GRO

and the line
#endif after
#endif /* CONFIG_RTW_GRO */

This change work for me.

Isn't this going to skip the call rtw_napi_gro_receive() all together? I don't think it's correct, especially if CONFIG_RTW_GRO is set.

@deepanonymous3773
Copy link

I want to buy usb Wi-Fi adapter edup EP-AC1621
RTL8814AU chipset
4*6 dpi antannas
2,4 / 5 GHz 600 Mps 1300 Mps
802.11n
802.11a/g
802.11ac
--- The questions :
Can i use it on kali linux ( vmware )
Did this USB WiFi adapter support monitor mode and injection ?!!
Pls i need help can someone help me pls

@comrumino
Copy link

@quanium-89 Afaik, #64 changes are consistent with changes to net/core/dev.c
From 5.11

	case GRO_DROP:
		kfree_skb(skb);
		break;

	case GRO_MERGED_FREE:
		if (NAPI_GRO_CB(skb)->free == NAPI_GRO_FREE_STOLEN_HEAD)
			napi_skb_free_stolen_head(skb);
		else
			__kfree_skb(skb);
		break;

to master of torvalds/linux

	case GRO_MERGED_FREE:
		if (NAPI_GRO_CB(skb)->free == NAPI_GRO_FREE_STOLEN_HEAD)
			napi_skb_free_stolen_head(skb);
		else if (skb->fclone != SKB_FCLONE_UNAVAILABLE)
			__kfree_skb(skb);
		else
			__kfree_skb_defer(skb);
		break;

@quanium-89
Copy link
Author

@comrumino I'm not sure how that justifies treating GRO_MERGED_FREE as an error condition. Can you please explain?

nrndda added a commit to nrndda/rtl8814au that referenced this pull request Sep 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants