backports: add netif_receive_skb_list
PATCH v2 1/2 backports: add netif_receive_skb_list
It is needed for mac80211
--- backport/backport-include/linux/netdevice.h | 12 ++++++++++++ 1 file changed, 12 insertions(+)
backport/backport-include/linux/netdevice.h +12 -0
@@ -372,6 +372,18 @@ static inline int _bp_netdev_upper_dev_link(struct net_device *dev, macro_dispatcher(netdev_upper_dev_link, __VA_ARGS__)(__VA_ARGS__)#endif +#if LINUX_VERSION_IS_LESS (4 ,19 ,0 ) +static inline void netif_receive_skb_list (struct list_head *head) +{ +struct sk_buff *skb, *next; + +list_for_each_entry_safe (skb, next, head, list) { +skb_list_del_init (skb); +netif_receive_skb (skb); + } +} +#endif +#if LINUX_VERSION_IS_LESS (5 ,0 ,0 )static inline int backport_dev_open (struct net_device *dev,struct netlink_ext_ack *extack) {
Signature · 4 lines
2.28.0 -- To unsubscribe from this list: send the line "unsubscribe backports" in
PATCH v2 2/2 backports: add skb_list_del_init
It is needed for mac80211
--- backport/backport-include/linux/skbuff.h | 6 ++++++ 1 file changed, 6 insertions(+)
backport/backport-include/linux/skbuff.h +6 -0
@@ -384,6 +384,12 @@ static inline void skb_mark_not_on_list(struct sk_buff *skb) { skb->next =NULL ; } + +static inline void skb_list_del_init (struct sk_buff *skb) +{ +__list_del_entry (&skb->list); +skb_mark_not_on_list (skb); +}#endif /* 4.19.10 <= x < 4.20 */ #endif
Signature · 4 lines
2.28.0 -- To unsubscribe from this list: send the line "unsubscribe backports" in
Re: [PATCH v2 2/2] backports: add skb_list_del_init
Quoted 15 lines · Felix Fietkau
It is needed for mac80211
Signed-off-by Felix Fietkau <[email protected]>--- backport/backport-include/linux/skbuff.h | 6 ++++++ 1 file changed, 6 insertions(+)backport/backport-include/linux/skbuff.h +0
-0@@ -384,6 +384,12 @@ static inline void skb_mark_not_on_list(struct sk_buff *skb) { skb->next =NULL ;
backport/backport-include/linux/skbuff.h static inline void skb_mark_not_on_list(struct sk_buff *skb) · line 395
Quoted 10 lines
backport/backport-include/linux/skbuff.h +6
-0} + +static inline void skb_list_del_init (struct sk_buff *skb) +{ +__list_del_entry (&skb->list); +skb_mark_not_on_list (skb); +}#endif /* 4.19.10 <= x < 4.20 */ #endif
Hi Felix,
These two backports are not working.
The list member was only added in kernel 4.19 to the sk_buff structure, see here:
https://git.kernel.org/linus/d4546c2509b1e9cd082e3682dcec98472e37ee5a
Hauke
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Re: [PATCH v2 2/2] backports: add skb_list_del_init
Quoted 29 lines · Hauke Mehrtens
Quoted 15 lines · Felix Fietkau
It is needed for mac80211
Signed-off-by Felix Fietkau <[email protected]>--- backport/backport-include/linux/skbuff.h | 6 ++++++ 1 file changed, 6 insertions(+)backport/backport-include/linux/skbuff.h +0
-0@@ -384,6 +384,12 @@ static inline void skb_mark_not_on_list(struct sk_buff *skb) { skb->next =NULL ;backport/backport-include/linux/skbuff.h static inline void skb_mark_not_on_list(struct sk_buff *skb) · line 395
Quoted 10 lines
backport/backport-include/linux/skbuff.h +6
-0} + +static inline void skb_list_del_init (struct sk_buff *skb) +{ +__list_del_entry (&skb->list); +skb_mark_not_on_list (skb); +}#endif /* 4.19.10 <= x < 4.20 */ #endif Hi Felix,
Quoted 5 lines
These two backports are not working.
The list member was only added in kernel 4.19 to the
sk_buffstructure, see here:
https://git.kernel.org/linus/d4546c2509b1e9cd082e3682dcec98472e37ee5a
I guess it was working for me on 4.14 because the list member was backported in 4.14.71.
So it works for kernels with that backport, and I guess other versions which don't have that will need a more intrusive backport that patches mac80211 anyway.
- Felix
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Re: [PATCH v2 2/2] backports: add skb_list_del_init
Quoted 9 lines · Felix Fietkau
Quoted 4 lines
The list member was only added in kernel 4.19 to the
sk_buffstructure, see here:
https://git.kernel.org/linus/d4546c2509b1e9cd082e3682dcec98472e37ee5aI guess it was working for me on 4.14 because the list member was backported in 4.14.71.
So it works for kernels with that backport, and I guess other versions which don't have that will need a more intrusive backport that patches mac80211 anyway.
I think Luca (+) just made some internally - we should push that out.
johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Re: [PATCH v2 2/2] backports: add skb_list_del_init
T24gTW9uLCAyMDIwLTA5LTI4IGF0IDA5OjIwICswMjAwLCBKb2hhbm5lcyBCZXJnIHdyb3RlOg0K PiBPbiBNb24sIDIwMjAtMDktMjggYXQgMDg6MzEgKzAyMDAsIEZlbGl4IEZpZXRrYXUgd3JvdGU6 DQo+ID4gPiBUaGUgbGlzdCBtZW1iZXIgd2FzIG9ubHkgYWRkZWQgaW4ga2VybmVsIDQuMTkgdG8g dGhlIHNrX2J1ZmYgc3RydWN0dXJlLA0KPiA+ID4gc2VlIGhlcmU6DQo+ID4gPiBodHRwczovL2dp dC5rZXJuZWwub3JnL2xpbnVzL2Q0NTQ2YzI1MDliMWU5Y2QwODJlMzY4MmRjZWM5ODQ3MmUzN2Vl NWENCj4gPiBJIGd1ZXNzIGl0IHdhcyB3b3JraW5nIGZvciBtZSBvbiA0LjE0IGJlY2F1c2UgdGhl IGxpc3QgbWVtYmVyIHdhcw0KPiA+IGJhY2twb3J0ZWQgaW4gNC4xNC43MS4NCj4gPiBTbyBpdCB3 b3JrcyBmb3Iga2VybmVscyB3aXRoIHRoYXQgYmFja3BvcnQsIGFuZCBJIGd1ZXNzIG90aGVyIHZl cnNpb25zDQo+ID4gd2hpY2ggZG9uJ3QgaGF2ZSB0aGF0IHdpbGwgbmVlZCBhIG1vcmUgaW50cnVz aXZlIGJhY2twb3J0IHRoYXQgcGF0Y2hlcw0KPiA+IG1hYzgwMjExIGFueXdheS4NCj4gDQo+IEkg dGhpbmsgTHVjYSAoKykganVzdCBtYWRlIHNvbWUgaW50ZXJuYWxseSAtIHdlIHNob3VsZCBwdXNo IHRoYXQgb3V0Lg0KDQpUaGlzIGlzIHdoYXQgSSBoYXZlIChJJ20gcGxhbm5pbmcgdG8gc2VuZCBt eSB1cGRhdGVzIGxhdGVyIHRoaXMgd2Vlayk6DQoNCmRpZmYgLS1jYyBiY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rX25vdF9v bl9saXN0KHN0cnVjdCBza19idWZmICpza2IpDQorK3N0YXRpYyBpbmxpbmUgdm9pZCBza2JfbGlz dF9kZWxfaW5pdChzdHJ1Y3Qgc2tfYnVmZiAqc2tiKQ0KICB7DQotLSAgICAgIHNrYi0+bmV4dCA9 IE5VTEw7DQorKyAgICAgIF9fbGlzdF9kZWxfZW50cnkoKHN0cnVjdCBsaXN0X2hlYWQgKikmc2ti LT5uZXh0KTsNCisrICAgICAgc2tiX21hcmtfbm90X29uX2xpc3Qoc2tiKTsNCiAgfQ0KLSAjZW5k aWYgLyogPCA0LjIwIHx8IDQuMTkuMTAgPD0geCA8IDQuMjAgKi8NCiAtI2VuZGlmIC8qIDQuMTku MTAgPD0geCA8IDQuMjAgKi8NCisgI2VuZGlmDQogIA0KICAjaWYgTElOVVhfVkVSU0lPTl9JU19M RVNTKDQsMTEsMCkNCiAgI2RlZmluZSBza2JfbWFjX29mZnNldCBMSU5VWF9CQUNLUE9SVChza2Jf bWFjX29mZnNldCkNCg0KLS0NCkNoZWVycywNCkx1Y2EuDQo=
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Re: [PATCH v2 2/2] backports: add skb_list_del_init
Quoted 11 lines · Luciano
Quoted 10 lines · Johannes Berg
Quoted 8 lines · Felix Fietkau
Quoted 3 lines
The list member was only added in kernel 4.19 to the
sk_buffstructure, see here:
https://git.kernel.org/linus/d4546c2509b1e9cd082e3682dcec98472e37ee5aI guess it was working for me on 4.14 because the list member was backported in 4.14.71.
So it works for kernels with that backport, and I guess other versions which don't have that will need a more intrusive backport that patches mac80211 anyway.
Quoted 4 lines
Quoted 1 line
I think Luca (+) just made some internally - we should push that out.
This is what I have (I'm planning to send my updates later this week):
Hi,
I have something which looks good to me and is compiling, I have to test it on some devices and send the patches soon.
With kernel 5.10 I see some changes in netlink again. Do you already have some patches for that?
Hauke
Re: [PATCH v2 2/2] backports: add skb_list_del_init
Quoted 3 lines · Hauke Mehrtens
With kernel 5.10 I see some changes in netlink again. Do you already have some patches for that?
Not yet. It's likely going to be rather tricky, though in nl80211 we don't have multiple policies, so we could just basically revert commit 66a9b9287d24 ("genetlink: move to smaller ops wherever possible").
johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in