Files
linux-stable-mirror/include/uapi/linux
Willem de Bruijn 58ba426388 net/packet: add PACKET_FANOUT_FLAG_IGNORE_OUTGOING
Extend packet socket option PACKET_IGNORE_OUTGOING to fanout groups.

The socket option sets ptype.ignore_outgoing, which makes
dev_queue_xmit_nit skip the socket.

When the socket joins a fanout group, the option is not reflected in
the struct ptype of the group. dev_queue_xmit_nit only tests the
fanout ptype, so the flag is ignored once a socket joins a
fanout group.

Inheriting the option from a socket would change established behavior.
Different sockets in the group can set different flags, and can also
change them at runtime.

Testing in packet_rcv_fanout defeats the purpose of the original
patch, which is to avoid skb_clone in dev_queue_xmit_nit (esp. for
MSG_ZEROCOPY packets).

Instead, introduce a new fanout group flag with the same behavior.

Tested with https://github.com/wdebruij/kerneltools/blob/master/tests/test_psock_fanout_ignore_outgoing.c

Signed-off-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20221027211014.3581513-1-willemdebruijn.kernel@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-10-28 22:00:49 -07:00
..
2022-09-15 09:08:09 +02:00
2022-08-11 10:31:19 -07:00
2022-08-23 14:54:54 -05:00
2022-09-24 07:00:00 +02:00
2022-08-10 13:49:50 +01:00
2022-09-20 09:13:38 +02:00
2022-09-20 09:13:38 +02:00
2022-09-29 18:43:04 +02:00
2022-09-07 16:46:03 +02:00
2022-09-20 09:13:38 +02:00
2022-09-27 17:29:09 -07:00
2022-09-08 12:59:00 -06:00
2022-08-11 04:31:15 -04:00