Commit 39980292fda20b38baf95bfa577db8b678eecc86

Authored by Eric Dumazet
Committed by David S. Miller
1 parent 0dfb33a0d7

ifb: add performance flags

Le lundi 03 janvier 2011 à 11:40 -0800, David Miller a écrit :
> From: Jarek Poplawski <jarkao2@gmail.com>
> Date: Mon, 3 Jan 2011 20:37:03 +0100
>
> > On Sun, Jan 02, 2011 at 09:24:36PM +0100, Eric Dumazet wrote:
> >> Le mercredi 29 décembre 2010 ?? 00:07 +0100, Jarek Poplawski a écrit :
> >>
> >> > Ingress is before vlans handler so these features and the
> >> > NETIF_F_HW_VLAN_TX flag seem useful for ifb considering
> >> > dev_hard_start_xmit() checks.
> >>
> >> OK, here is v2 of the patch then, thanks everybody.
> >>
> >>
> >> [PATCH v2 net-next-2.6] ifb: add performance flags
> >>
> >> IFB can use the full set of features flags (NETIF_F_SG |
> >> NETIF_F_FRAGLIST | NETIF_F_TSO | NETIF_F_NO_CSUM | NETIF_F_HIGHDMA) to
> >> avoid unnecessary split of some packets (GRO for example)
> >>
> >> Changli suggested to also set vlan_features,
> >
> > He also suggested more GSO flags of which especially NETIF_F_TSO6
> > seems interesting (wrt GRO)?
>
> I think at least TSO6 would very much be appropriate here.

Yes, why not, I am only wondering why loopback / dummy (and others ?)
only set NETIF_F_TSO :)

Since I want to play with ECN, I might also add NETIF_F_TSO_ECN ;)

For other flags, I really doubt it can matter on ifb ?

[PATCH v3 net-next-2.6] ifb: add performance flags

IFB can use the full set of features flags (NETIF_F_SG |
NETIF_F_FRAGLIST | NETIF_F_TSO | NETIF_F_NO_CSUM | NETIF_F_HIGHDMA) to
avoid unnecessary split of some packets (GRO for example)

Changli suggested to also set vlan_features, NETIF_F_TSO6,
NETIF_F_TSO_ECN.

Jarek suggested to add NETIF_F_HW_VLAN_TX as well.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Changli Gao <xiaosuo@gmail.com>
Cc: Jarek Poplawski <jarkao2@gmail.com>
Cc: Pawel Staszewski <pstaszewski@itcare.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 7 additions and 0 deletions Side-by-side Diff

... ... @@ -126,6 +126,10 @@
126 126 .ndo_validate_addr = eth_validate_addr,
127 127 };
128 128  
  129 +#define IFB_FEATURES (NETIF_F_NO_CSUM | NETIF_F_SG | NETIF_F_FRAGLIST | \
  130 + NETIF_F_TSO_ECN | NETIF_F_TSO | NETIF_F_TSO6 | \
  131 + NETIF_F_HIGHDMA | NETIF_F_HW_VLAN_TX)
  132 +
129 133 static void ifb_setup(struct net_device *dev)
130 134 {
131 135 /* Initialize the device structure. */
... ... @@ -135,6 +139,9 @@
135 139 /* Fill in device structure with ethernet-generic values. */
136 140 ether_setup(dev);
137 141 dev->tx_queue_len = TX_Q_LIMIT;
  142 +
  143 + dev->features |= IFB_FEATURES;
  144 + dev->vlan_features |= IFB_FEATURES;
138 145  
139 146 dev->flags |= IFF_NOARP;
140 147 dev->flags &= ~IFF_MULTICAST;