]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
net: Optimize hard_start_xmit() return checking
authorJarek Poplawski <jarkao2@gmail.com>
Sun, 15 Nov 2009 07:20:12 +0000 (07:20 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Nov 2009 06:08:33 +0000 (22:08 -0800)
commit9a1654ba0b50402a6bd03c7b0fe9b0200a5ea7b1
tree3defd37672da2069e6c0ffd86b0b99c694324985
parentcb43e23435a66d5ed90f804af9efe9096503979f
net: Optimize hard_start_xmit() return checking

Recent changes in the TX error propagation require additional checking
and masking of values returned from hard_start_xmit(), mainly to
separate cases where skb was consumed. This aim can be simplified by
changing the order of NETDEV_TX and NET_XMIT codes, because the latter
are treated similarly to negative (ERRNO) values.

After this change much simpler dev_xmit_complete() is also used in
sch_direct_xmit(), so it is moved to netdevice.h.

Additionally NET_RX definitions in netdevice.h are moved up from
between TX codes to avoid confusion while reading the TX comment.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
net/core/dev.c
net/sched/sch_generic.c