Message ID | 1330999558-14270-1-git-send-email-greearb@candelatech.com |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
From: greearb@candelatech.com Date: Mon, 5 Mar 2012 18:05:58 -0800 > 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. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 03/05/2012 06:14 PM, David Miller wrote: > From: greearb@candelatech.com > Date: Mon, 5 Mar 2012 18:05:58 -0800 > >> 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
From: Ben Greear <greearb@candelatech.com> Date: Mon, 05 Mar 2012 19:59:57 -0800 > On 03/05/2012 06:14 PM, David Miller wrote: >> From: greearb@candelatech.com >> Date: Mon, 5 Mar 2012 18:05:58 -0800 >> >>> 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... NETIF_F_CAN_VLAN_WITH_CUSTOM_CRC -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, 2012-03-05 at 23:12 -0500, David Miller wrote: > From: Ben Greear <greearb@candelatech.com> > Date: Mon, 05 Mar 2012 19:59:57 -0800 > > > On 03/05/2012 06:14 PM, David Miller wrote: > >> From: greearb@candelatech.com > >> Date: Mon, 5 Mar 2012 18:05:58 -0800 > >> > >>> 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... > > NETIF_F_CAN_VLAN_WITH_CUSTOM_CRC Er... vlan_features? Ben.
From: Ben Hutchings <bhutchings@solarflare.com> Date: Tue, 6 Mar 2012 16:16:34 +0000 > On Mon, 2012-03-05 at 23:12 -0500, David Miller wrote: >> From: Ben Greear <greearb@candelatech.com> >> Date: Mon, 05 Mar 2012 19:59:57 -0800 >> >> > On 03/05/2012 06:14 PM, David Miller wrote: >> >> From: greearb@candelatech.com >> >> Date: Mon, 5 Mar 2012 18:05:58 -0800 >> >> >> >>> 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... >> >> NETIF_F_CAN_VLAN_WITH_CUSTOM_CRC > > Er... vlan_features? Right. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 9988d4a..6aeb0a3 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c @@ -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;