* [PATCH v2 net 0/2] Alow tg3/bnx recevie full sized 802.1ad frames
@ 2014-09-30 23:39 Vladislav Yasevich
2014-09-30 23:39 ` [PATCH v2 net 1/2] tg3: Allow for recieve of full-size 8021AD frames Vladislav Yasevich
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Vladislav Yasevich @ 2014-09-30 23:39 UTC (permalink / raw)
To: netdev
Cc: prashant, mchan, sony.chacko, Dept-HSGLinuxNICDev,
Vladislav Yasevich
bnx2 and tg3 drivers drop packets that exceed device mtu and that
do not have a vlan tag. The idea is to catch ethernet frames
that are too long. This also ends up dropping 802.1ad tagged
frames since the encapsulation protocol is different.
We should not be dropping this packets.
v2: rebased and consolidated tg3 and bnx patches.
Vladislav Yasevich (2):
tg3: Allow for recieve of full-size 8021AD frames
bnx2: Correctly receive full sized 802.1ad fragmes
drivers/net/ethernet/broadcom/bnx2.c | 5 +++--
drivers/net/ethernet/broadcom/tg3.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
--
1.9.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 net 1/2] tg3: Allow for recieve of full-size 8021AD frames
2014-09-30 23:39 [PATCH v2 net 0/2] Alow tg3/bnx recevie full sized 802.1ad frames Vladislav Yasevich
@ 2014-09-30 23:39 ` Vladislav Yasevich
2014-09-30 23:39 ` [PATCH v2 net 2/2] bnx2: Correctly receive full sized 802.1ad fragmes Vladislav Yasevich
2014-10-01 20:45 ` [PATCH v2 net 0/2] Alow tg3/bnx recevie full sized 802.1ad frames David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Vladislav Yasevich @ 2014-09-30 23:39 UTC (permalink / raw)
To: netdev
Cc: prashant, mchan, sony.chacko, Dept-HSGLinuxNICDev,
Vladislav Yasevich
When receiving a vlan-tagged frame that still contains
a vlan header, the length of the packet will be greater
then MTU+ETH_HLEN since it will account of the extra
vlan header. TG3 checks this for the case for 802.1Q,
but not for 802.1ad. As a result, full sized 802.1ad
frames get dropped by the card.
Add a check for 802.1ad protocol when receving full
sized frames.
Suggested-by: Prashant Sreedharan <prashant@broadcom.com>
CC: Prashant Sreedharan <prashant@broadcom.com>
CC: Michael Chan <mchan@broadcom.com>
Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
---
drivers/net/ethernet/broadcom/tg3.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index e7d3a62..ba49948 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -6918,7 +6918,8 @@ static int tg3_rx(struct tg3_napi *tnapi, int budget)
skb->protocol = eth_type_trans(skb, tp->dev);
if (len > (tp->dev->mtu + ETH_HLEN) &&
- skb->protocol != htons(ETH_P_8021Q)) {
+ skb->protocol != htons(ETH_P_8021Q) &&
+ skb->protocol != htons(ETH_P_8021AD)) {
dev_kfree_skb_any(skb);
goto drop_it_no_recycle;
}
--
1.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 net 2/2] bnx2: Correctly receive full sized 802.1ad fragmes
2014-09-30 23:39 [PATCH v2 net 0/2] Alow tg3/bnx recevie full sized 802.1ad frames Vladislav Yasevich
2014-09-30 23:39 ` [PATCH v2 net 1/2] tg3: Allow for recieve of full-size 8021AD frames Vladislav Yasevich
@ 2014-09-30 23:39 ` Vladislav Yasevich
2014-10-01 20:45 ` [PATCH v2 net 0/2] Alow tg3/bnx recevie full sized 802.1ad frames David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Vladislav Yasevich @ 2014-09-30 23:39 UTC (permalink / raw)
To: netdev
Cc: prashant, mchan, sony.chacko, Dept-HSGLinuxNICDev,
Vladislav Yasevich
This driver, similar to tg3, has a check that will
cause full sized 802.1ad frames to be dropped. The
frame will be larger then the standard mtu due to the
presense of vlan header that has not been stripped.
The driver should not drop this frame and should process
it just like it does for 802.1q.
CC: Sony Chacko <sony.chacko@qlogic.com>
CC: Dept-HSGLinuxNICDev@qlogic.com
Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
---
drivers/net/ethernet/broadcom/bnx2.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
index 2fee73b..823d01c 100644
--- a/drivers/net/ethernet/broadcom/bnx2.c
+++ b/drivers/net/ethernet/broadcom/bnx2.c
@@ -3236,8 +3236,9 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
skb->protocol = eth_type_trans(skb, bp->dev);
- if ((len > (bp->dev->mtu + ETH_HLEN)) &&
- (ntohs(skb->protocol) != 0x8100)) {
+ if (len > (bp->dev->mtu + ETH_HLEN) &&
+ skb->protocol != htons(0x8100) &&
+ skb->protocol != htons(ETH_P_8021AD)) {
dev_kfree_skb(skb);
goto next_rx;
--
1.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 net 0/2] Alow tg3/bnx recevie full sized 802.1ad frames
2014-09-30 23:39 [PATCH v2 net 0/2] Alow tg3/bnx recevie full sized 802.1ad frames Vladislav Yasevich
2014-09-30 23:39 ` [PATCH v2 net 1/2] tg3: Allow for recieve of full-size 8021AD frames Vladislav Yasevich
2014-09-30 23:39 ` [PATCH v2 net 2/2] bnx2: Correctly receive full sized 802.1ad fragmes Vladislav Yasevich
@ 2014-10-01 20:45 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2014-10-01 20:45 UTC (permalink / raw)
To: vyasevich
Cc: netdev, prashant, mchan, sony.chacko, Dept-HSGLinuxNICDev,
vyasevic
From: Vladislav Yasevich <vyasevich@gmail.com>
Date: Tue, 30 Sep 2014 19:39:35 -0400
> bnx2 and tg3 drivers drop packets that exceed device mtu and that
> do not have a vlan tag. The idea is to catch ethernet frames
> that are too long. This also ends up dropping 802.1ad tagged
> frames since the encapsulation protocol is different.
> We should not be dropping this packets.
>
> v2: rebased and consolidated tg3 and bnx patches.
Applied, thanks Vlad.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-10-01 20:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-30 23:39 [PATCH v2 net 0/2] Alow tg3/bnx recevie full sized 802.1ad frames Vladislav Yasevich
2014-09-30 23:39 ` [PATCH v2 net 1/2] tg3: Allow for recieve of full-size 8021AD frames Vladislav Yasevich
2014-09-30 23:39 ` [PATCH v2 net 2/2] bnx2: Correctly receive full sized 802.1ad fragmes Vladislav Yasevich
2014-10-01 20:45 ` [PATCH v2 net 0/2] Alow tg3/bnx recevie full sized 802.1ad frames David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).