]> bbs.cooldavid.org Git - net-next-2.6.git/commit
net: consolidate netif_needs_gso() checks
authorJohn Fastabend <john.r.fastabend@intel.com>
Wed, 16 Jun 2010 14:18:12 +0000 (14:18 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Jun 2010 19:58:41 +0000 (12:58 -0700)
commit6afff0caa721211e8c04bdc7627ee3bff95bcb95
treeec0b2f5b2e15f847ffad3db9501bbd9661bf671b
parent1dc8d8c06d4002be4d1373fc06f25cd589be47e1
net: consolidate netif_needs_gso() checks

netif_needs_gso() is checked twice in the TX path once,
before submitting the skb to the qdisc and once after
it is dequeued from the qdisc just before calling
ndo_hard_start().  This opens a window for a user to
change the gso/tso or tx checksum settings that can
cause netif_needs_gso to be true in one check and false
in the other.

Specifically, changing TX checksum setting may cause
the warning in skb_gso_segment() to be triggered if
the checksum is calculated earlier.

This consolidates the netif_needs_gso() calls so that
the stack only checks if gso is needed in
dev_hard_start_xmit().

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c