kernel_optimize_test/net/tipc
Gerlando Falauto 488fc9af82 tipc: pskb_copy() buffers when sending on more than one bearer
When sending packets, TIPC bearers use skb_clone() before writing their
hardware header. This will however NOT copy the data buffer.
So when the same packet is sent over multiple bearers (to reach multiple
nodes), the same socket buffer data will be treated by multiple
tipc_media drivers which will write their own hardware header through
dev_hard_header().
Most of the time this is not a problem, because by the time the
packet is processed by the second media, it has already been sent over
the first one. However, when the first transmission is delayed (e.g.
because of insufficient bandwidth or through a shaper), the next bearer
will overwrite the hardware header, resulting in the packet being sent:
a) with the wrong source address, when bearers of the same type,
e.g. ethernet, are involved
b) with a completely corrupt header, or even dropped, when bearers of
different types are involved.

So when the same socket buffer is to be sent multiple times, send a
pskb_copy() instead (from the second instance on), and release it
afterwards (the bearer will skb_clone() it anyway).

Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-03 16:08:58 -04:00
..
addr.c
addr.h
bcast.c tipc: pskb_copy() buffers when sending on more than one bearer 2013-05-03 16:08:58 -04:00
bcast.h
bearer.c tipc: add InfiniBand media type 2013-04-17 14:18:33 -04:00
bearer.h tipc: add InfiniBand media type 2013-04-17 14:18:33 -04:00
config.c
config.h
core.c tipc: add InfiniBand media type 2013-04-17 14:18:33 -04:00
core.h
discover.c tipc: move bcast_addr from struct tipc_media to struct tipc_bearer 2013-04-17 14:18:33 -04:00
discover.h
eth_media.c tipc: set skb->protocol in eth_media packet transmission 2013-04-17 14:18:33 -04:00
handler.c
ib_media.c tipc: add InfiniBand media type 2013-04-17 14:18:33 -04:00
Kconfig tipc: add InfiniBand media type 2013-04-17 14:18:33 -04:00
link.c tipc: remove obsolete flush of stale reassembly buffer 2012-12-06 17:20:19 -05:00
link.h tipc: remove the bearer congestion mechanism 2012-11-21 20:07:25 -05:00
log.c
Makefile tipc: add InfiniBand media type 2013-04-17 14:18:33 -04:00
msg.c
msg.h
name_distr.c tipc: eliminate an unnecessary cast of node variable 2012-11-22 14:33:28 -05:00
name_distr.h
name_table.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
name_table.h
net.c
net.h
netlink.c net-next: replace obsolete NLMSG_* with type safe nlmsg_* 2013-03-28 14:25:25 -04:00
node_subscr.c
node_subscr.h
node.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
node.h tipc: rename supported flag to recv_permitted 2012-11-22 07:50:51 -05:00
port.c tipc: standardize across connect/disconnect function naming 2012-12-07 17:23:19 -05:00
port.h tipc: standardize across connect/disconnect function naming 2012-12-07 17:23:19 -05:00
ref.c
ref.h
socket.c tipc: fix info leaks via msg_name in recv_msg/recv_stream 2013-04-07 16:28:02 -04:00
subscr.c tipc: standardize across connect/disconnect function naming 2012-12-07 17:23:19 -05:00
subscr.h