Patch "mac80211: implement multicast forwarding on fast-RX path" has been added to the 4.9-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
mac80211: implement multicast forwarding on fast-RX path
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
mac80211-implement-multicast-forwarding-on-fast-rx-path.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
eeb0d56fab4cd7848cf2be6704fa48900dbc1381Mon Sep 17 00:00:00 2001
From: Johannes Berg <[email protected]>
Date: Wed, 14 Dec 2016 16:47:43 +0100
Subject: mac80211: implement multicast forwarding on fast-RX path
From: Johannes Berg <[email protected]>
commit eeb0d56fab4cd7848cf2be6704fa48900dbc1381 upstream.
In AP (or VLAN) mode, when unicast 802.11 packets are received, they might actually be multicast after conversion. In this case the fast-RX path didn't handle them properly to send them back to the wireless medium. Implement that by copying the SKB and sending it back out.
The possible alternative would be to just punt the packet back to the regular (slow) RX path, but since we have almost all of the required code here already it's not so complicated to add here. Punting it back would also mean acquiring the spinlock, which would be bad for the stated purpose of the fast-RX path, to enable well-performing parallel RX.
--- net/mac80211/rx.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-)
net/mac80211/rx.c +18 -8
@@ -3939,21 +3939,31 @@ static bool ieee80211_invoke_fast_rx(stru64_stats_update_end (&stats->syncp);if (fast_rx->internal_forward) { -struct sta_info *dsta =sta_info_get (rx->sdata, skb->data); +struct sk_buff *xmit_skb =NULL ; +bool multicast =is_multicast_ether_addr (skb->data); -if (dsta) { +if (multicast) { + xmit_skb =skb_copy (skb,GFP_ATOMIC ); + }else if (sta_info_get (rx->sdata, skb->data)) { + xmit_skb = skb; + skb =NULL ; + } + +if (xmit_skb) {/* * Send to wireless media and increase priority by 256 * to keep the received priority instead of * reclassifying the frame (see cfg80211_classify8021d). */ - skb->priority +=256 ; - skb->protocol =htons (ETH_P_802_3 ); -skb_reset_network_header (skb); -skb_reset_mac_header (skb); -dev_queue_xmit (skb); -return true; + xmit_skb->priority +=256 ; + xmit_skb->protocol =htons (ETH_P_802_3 ); +skb_reset_network_header (xmit_skb); +skb_reset_mac_header (xmit_skb); +dev_queue_xmit (xmit_skb); } + +if (!skb) +return true; }/* deliver to local stack */
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/mac80211-implement-multicast-forwarding-on-fast-rx-path.patch