Skip to contentSkip to conversation

vlan: Support sending custom Ethernet CRC.

PATCH In review [email protected] 3 participants 6 messages Mar 6, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vlan: Support sending custom Ethernet CRC.

From: Ben Greear <[email protected]>

If the underlying device supports sending custom Ethernet CRC, then enable that feature in the VLANs as well.

NOTE: You will probably have to disable any VLAN hardware assist on the underlying device to get this to properly send packets with this feature enabled.

---
:100644 100644 9988d4a... 6aeb0a3... M net/8021q/vlan_dev.c

 net/8021q/vlan_dev.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
net/8021q/vlan_dev.c +3 -0
index 9988d4a..6aeb0a3 100644
@@ -543,6 +543,9 @@ static int vlan_dev_init(struct net_device *dev)
 	dev->features |= real_dev->vlan_features | NETIF_F_LLTX;
 	dev->gso_max_size = real_dev->gso_max_size;
 
+	if (netif_supports_nofcs(real_dev))
+		dev->priv_flags |= IFF_SUPP_NOFCS;
+
 	/* ipv6 shared card related stuff */
 	dev->dev_id = real_dev->dev_id;
 
Signature · 1 line
1.7.3.4
maintainer
#1 lore raw

From: [email protected]
Date: Mon, 5 Mar 2012 18:05:58 -0800

Quoted 3 lines

NOTE: You will probably have to disable any VLAN hardware assist on the underlying device to get this to properly send packets with this feature enabled.

This need to be therefore handled specifically on a device-by-device basis, and VLAN custom CRC disabled unless the device explicitly states that it can handle this situation properly and has any necessary feature rule enforcement codified.

author
#2 lore raw
Quoted 11 lines · David Miller

From: [email protected]
Date: Mon, 5 Mar 2012 18:05:58 -0800

Quoted 3 lines

NOTE: You will probably have to disable any VLAN hardware assist on the underlying device to get this to properly send packets with this feature enabled.

This need to be therefore handled specifically on a device-by-device basis, and VLAN custom CRC disabled unless the device explicitly states that it can handle this situation properly and has any necessary feature rule enforcement codified.

I'll see what I can come up with. Maybe figure out how to propagate a flag up from the NIC when it is in a state that can handle VLAN + custom-CRC and only enable the flag on the VLAN in that case...

Thanks,
Ben

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com
maintainer
#3 lore raw

From: Ben Greear <[email protected]>
Date: Mon, 05 Mar 2012 19:59:57 -0800

Quoted 13 lines · David Miller
Quoted 11 lines

From: [email protected]
Date: Mon, 5 Mar 2012 18:05:58 -0800

Quoted 3 lines

NOTE: You will probably have to disable any VLAN hardware assist on the underlying device to get this to properly send packets with this feature enabled.

This need to be therefore handled specifically on a device-by-device basis, and VLAN custom CRC disabled unless the device explicitly states that it can handle this situation properly and has any necessary feature rule enforcement codified.

Quoted 4 lines

I'll see what I can come up with. Maybe figure out how to propagate a flag up from the NIC when it is in a state that can handle VLAN + custom-CRC
and only enable the flag on the VLAN in that case...

NETIF_F_CAN_VLAN_WITH_CUSTOM_CRC

#4 lore raw
Quoted 16 lines · David Miller

From: Ben Greear <[email protected]>
Date: Mon, 05 Mar 2012 19:59:57 -0800

Quoted 13 lines · David Miller
Quoted 11 lines

From: [email protected]
Date: Mon, 5 Mar 2012 18:05:58 -0800

Quoted 3 lines

NOTE: You will probably have to disable any VLAN hardware assist on the underlying device to get this to properly send packets with this feature enabled.

This need to be therefore handled specifically on a device-by-device basis, and VLAN custom CRC disabled unless the device explicitly states that it can handle this situation properly and has any necessary feature rule enforcement codified.

Quoted 6 lines
Quoted 4 lines

I'll see what I can come up with. Maybe figure out how to propagate a flag up from the NIC when it is in a state that can handle VLAN + custom-CRC
and only enable the flag on the VLAN in that case...

NETIF_F_CAN_VLAN_WITH_CUSTOM_CRC

Er... vlan_features?

Ben.

Signature · 3 lines
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
maintainer
#5 lore raw

From: Ben Hutchings <[email protected]>
Date: Tue, 6 Mar 2012 16:16:34 +0000

Quoted 17 lines · David Miller
Quoted 16 lines

From: Ben Greear <[email protected]>
Date: Mon, 05 Mar 2012 19:59:57 -0800

Quoted 13 lines · David Miller
Quoted 11 lines

From: [email protected]
Date: Mon, 5 Mar 2012 18:05:58 -0800

Quoted 3 lines

NOTE: You will probably have to disable any VLAN hardware assist on the underlying device to get this to properly send packets with this feature enabled.

This need to be therefore handled specifically on a device-by-device basis, and VLAN custom CRC disabled unless the device explicitly states that it can handle this situation properly and has any necessary feature rule enforcement codified.

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

I'll see what I can come up with. Maybe figure out how to propagate a flag up from the NIC when it is in a state that can handle VLAN + custom-CRC
and only enable the flag on the VLAN in that case...

NETIF_F_CAN_VLAN_WITH_CUSTOM_CRC

Er... vlan_features?

Right.