Re: [patch net-next-2.6] vlan: introduce ndo_vlan_[enable/disable]
From: Michał Mirosław <hidden>
Date: 2011-07-19 08:27:52
W dniu 19 lipca 2011 10:24 użytkownik Michał Mirosław [off-list ref] napisał:
W dniu 19 lipca 2011 10:13 użytkownik Jiri Pirko [off-list ref] napisał:quoted
Tue, Jul 19, 2011 at 09:24:29AM CEST, mirqus@gmail.com wrote:quoted
W dniu 18 lipca 2011 09:13 użytkownik Jiri Pirko [off-list ref] napisał:quoted
static u32 atl1c_fix_features(struct net_device *netdev, u32 features) { + u32 changed = netdev->features ^ features; + + /* + * Since there is no support for separate rx/tx vlan accel + * enable/disable make sure these are always set in pair. + */ + if ((changed & NETIF_F_HW_VLAN_TX && features & NETIF_F_HW_VLAN_TX) || + (changed & NETIF_F_HW_VLAN_RX && features & NETIF_F_HW_VLAN_RX)) + features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; + else + features &= ~(NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX); +You ignored my hint about combined TX/RX offload. Is that on purpose?Sorry but I'm probably missing what you mean.You could replace above code with: if (!(features & NETIF_F_HW_VLAN_RX)) features &= ~NETIF_F_HW_VLAN_TX;
Or you could invert the test and effect:
if (features & NETIF_F_HW_VLAN_TX)
features |= NETIF_F_HW_VLAN_RX;
Best Regards,
Michał Mirosław