* [PATCH 1/2] net: use NETIF_F_ALL_TSO for vlan features
@ 2011-04-29 5:20 Shan Wei
2011-05-05 17:53 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Shan Wei @ 2011-04-29 5:20 UTC (permalink / raw)
To: David Miller, netdev, eilong, dm, leedom, mirqus, bhutchings, dm
As Dimitris Michailidis suggested, use NETIF_F_ALL_TSO for vlan_features,
which is a mask, but not hw_features.
Compile test.
Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
---
drivers/net/bnx2x/bnx2x_main.c | 2 +-
drivers/net/cxgb4/cxgb4_main.c | 2 +-
drivers/net/cxgb4vf/cxgb4vf_main.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c
index bfd7ac9..67b1011 100644
--- a/drivers/net/bnx2x/bnx2x_main.c
+++ b/drivers/net/bnx2x/bnx2x_main.c
@@ -9429,7 +9429,7 @@ static int __devinit bnx2x_init_dev(struct pci_dev *pdev,
NETIF_F_RXCSUM | NETIF_F_LRO | NETIF_F_HW_VLAN_TX;
dev->vlan_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
- NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6 | NETIF_F_HIGHDMA;
+ NETIF_F_ALL_TSO | NETIF_F_HIGHDMA;
dev->features |= dev->hw_features | NETIF_F_HW_VLAN_RX;
if (bp->flags & USING_DAC_FLAG)
diff --git a/drivers/net/cxgb4/cxgb4_main.c b/drivers/net/cxgb4/cxgb4_main.c
index bdc868c..d6b1a91 100644
--- a/drivers/net/cxgb4/cxgb4_main.c
+++ b/drivers/net/cxgb4/cxgb4_main.c
@@ -3526,7 +3526,7 @@ static void free_some_resources(struct adapter *adapter)
}
#define TSO_FLAGS (NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_TSO_ECN)
-#define VLAN_FEAT (NETIF_F_SG | NETIF_F_IP_CSUM | TSO_FLAGS | \
+#define VLAN_FEAT (NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_ALL_TSO | \
NETIF_F_IPV6_CSUM | NETIF_F_HIGHDMA)
static int __devinit init_one(struct pci_dev *pdev,
diff --git a/drivers/net/cxgb4vf/cxgb4vf_main.c b/drivers/net/cxgb4vf/cxgb4vf_main.c
index 8cf9890..b735c52 100644
--- a/drivers/net/cxgb4vf/cxgb4vf_main.c
+++ b/drivers/net/cxgb4vf/cxgb4vf_main.c
@@ -2603,7 +2603,7 @@ static int __devinit cxgb4vf_pci_probe(struct pci_dev *pdev,
netdev->hw_features = NETIF_F_SG | TSO_FLAGS |
NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
NETIF_F_HW_VLAN_TX | NETIF_F_RXCSUM;
- netdev->vlan_features = NETIF_F_SG | TSO_FLAGS |
+ netdev->vlan_features = NETIF_F_SG | NETIF_F_ALL_TSO |
NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
NETIF_F_HIGHDMA;
netdev->features = netdev->hw_features |
--
1.7.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] net: use NETIF_F_ALL_TSO for vlan features
2011-04-29 5:20 [PATCH 1/2] net: use NETIF_F_ALL_TSO for vlan features Shan Wei
@ 2011-05-05 17:53 ` David Miller
2011-05-05 18:19 ` Michał Mirosław
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2011-05-05 17:53 UTC (permalink / raw)
To: shanwei; +Cc: netdev, eilong, dm, leedom, mirqus, bhutchings
From: Shan Wei <shanwei@cn.fujitsu.com>
Date: Fri, 29 Apr 2011 13:20:52 +0800
>
> As Dimitris Michailidis suggested, use NETIF_F_ALL_TSO for vlan_features,
> which is a mask, but not hw_features.
>
> Compile test.
>
>
> Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
I do not understand why we want to advertise a set of ->vlan_features
TSO flags that are different from the flags advertised in ->hw_features.
Why do we want to do this?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] net: use NETIF_F_ALL_TSO for vlan features
2011-05-05 17:53 ` David Miller
@ 2011-05-05 18:19 ` Michał Mirosław
0 siblings, 0 replies; 3+ messages in thread
From: Michał Mirosław @ 2011-05-05 18:19 UTC (permalink / raw)
To: David Miller; +Cc: shanwei, netdev, eilong, dm, leedom, bhutchings
2011/5/5 David Miller <davem@davemloft.net>:
> From: Shan Wei <shanwei@cn.fujitsu.com>
> Date: Fri, 29 Apr 2011 13:20:52 +0800
>> As Dimitris Michailidis suggested, use NETIF_F_ALL_TSO for vlan_features,
>> which is a mask, but not hw_features.
> I do not understand why we want to advertise a set of ->vlan_features
> TSO flags that are different from the flags advertised in ->hw_features.
>
> Why do we want to do this?
I remember some posts about hardware that needs HW tag insertion for
TSO on VLAN to work or other additional constraints for offloads on
VLANs. I wonder if vlan_features handling should be converted to
something like ndo_fix_features.
Best Regards,
Michał Mirosław
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-05 18:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-29 5:20 [PATCH 1/2] net: use NETIF_F_ALL_TSO for vlan features Shan Wei
2011-05-05 17:53 ` David Miller
2011-05-05 18:19 ` Michał Mirosław
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).