[PATCH net 1/1] via-rhine: fix VLAN receive handling regression.

Subsystems: networking drivers, the rest, via rhine network driver

STALE3981d REVIEWED: 2 (2M)

1 review trailer.

3 messages, 3 authors, 2015-10-16 · open the first message on its own page

[PATCH net 1/1] via-rhine: fix VLAN receive handling regression.

From: Francois Romieu <romieu@fr.zoreil.com>
Date: 2015-10-14 22:15:32

From: Andrej Ota <redacted>

Because eth_type_trans() consumes ethernet header worth of bytes, a call
to read TCI from end of packet using rhine_rx_vlan_tag() no longer works
as it's reading from an invalid offset.

Tested to be working on PCEngines Alix board.

Fixes: 810f19bcb862 ("via-rhine: add consistent memory barrier in vlan receive code.")
Signed-off-by: Andrej Ota <redacted>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>

---

 Applies fine as of 0f8b8e28fb3241f9fd82ce13bac2b40c35e987e0
 ("tipc: eliminate risk of stalled link synchronization").

 Andrej posted it on l-k the 2015/10/04, see
 http://marc.info/?l=linux-kernel&m=144398918324349

 Kernel v4.2 exhibits the regression. Stable v4.[01] kernels don't.

 drivers/net/ethernet/via/via-rhine.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/via/via-rhine.c b/drivers/net/ethernet/via/via-rhine.c
index a832637..2b7550c 100644
--- a/drivers/net/ethernet/via/via-rhine.c
+++ b/drivers/net/ethernet/via/via-rhine.c
@@ -2134,10 +2134,11 @@ static int rhine_rx(struct net_device *dev, int limit)
 			}
 
 			skb_put(skb, pkt_len);
-			skb->protocol = eth_type_trans(skb, dev);
 
 			rhine_rx_vlan_tag(skb, desc, data_size);
 
+			skb->protocol = eth_type_trans(skb, dev);
+
 			netif_receive_skb(skb);
 
 			u64_stats_update_begin(&rp->rx_stats.syncp);
-- 
2.4.3

Re: [PATCH net 1/1] via-rhine: fix VLAN receive handling regression.

From: Nick Alcock <hidden>
Date: 2015-10-15 08:25:05

On 14 Oct 2015, Francois Romieu told this:
From: Andrej Ota <redacted>

Because eth_type_trans() consumes ethernet header worth of bytes, a call
to read TCI from end of packet using rhine_rx_vlan_tag() no longer works
as it's reading from an invalid offset.

Tested to be working on PCEngines Alix board.
LGTM, though not tested because I don't have any vlans set up on my VIA
Rhine box and I can't reboot it at the moment. :)

Re: [PATCH net 1/1] via-rhine: fix VLAN receive handling regression.

From: David Miller <davem@davemloft.net>
Date: 2015-10-16 07:46:41

From: Francois Romieu <romieu@fr.zoreil.com>
Date: Thu, 15 Oct 2015 00:14:37 +0200
From: Andrej Ota <redacted>

Because eth_type_trans() consumes ethernet header worth of bytes, a call
to read TCI from end of packet using rhine_rx_vlan_tag() no longer works
as it's reading from an invalid offset.

Tested to be working on PCEngines Alix board.

Fixes: 810f19bcb862 ("via-rhine: add consistent memory barrier in vlan receive code.")
Signed-off-by: Andrej Ota <redacted>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help