gro: get out of core files
Subsystems (13)
cover gro: get out of core files
From: Eric Dumazet <[email protected]>
Move GRO related content into net/core/gro.c
and include/net/gro.h.
This reduces GRO scope to where it is really needed, and shrinks too big files (include/linux/netdevice.h and net/core/dev.c)
Eric Dumazet (4):
net: move gro definitions to include/net/gro.h
net: gro: move skb_gro_receive_list to udp_offload.c
net: gro: move skb_gro_receive into net/core/gro.c
net: gro: populate net/core/gro.c
.../net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 1 + drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 + .../net/ethernet/hisilicon/hns3/hns3_enet.c | 1 + .../net/ethernet/mellanox/mlx5/core/en_rx.c | 1 + drivers/net/ethernet/qlogic/qede/qede_fp.c | 1 + drivers/net/geneve.c | 1 + drivers/net/vxlan.c | 1 + include/linux/netdevice.h | 351 +------- include/net/gro.h | 420 +++++++++- include/net/ip.h | 8 - include/net/ip6_checksum.h | 8 - include/net/udp.h | 24 - net/core/Makefile | 2 +- net/core/dev.c | 668 +-------------- net/core/gro.c | 766 ++++++++++++++++++ net/core/skbuff.c | 142 ---- net/ipv4/af_inet.c | 1 + net/ipv4/esp4_offload.c | 1 + net/ipv4/fou.c | 1 + net/ipv4/gre_offload.c | 1 + net/ipv4/tcp_offload.c | 1 + net/ipv4/udp_offload.c | 28 + net/ipv6/esp6_offload.c | 1 + net/ipv6/tcpv6_offload.c | 1 + net/ipv6/udp_offload.c | 1 + 25 files changed, 1230 insertions(+), 1202 deletions(-) create mode 100644 net/core/gro.c
Signature · 1 line
2.34.0.rc1.387.gb447b232ab-goog
PATCH 1/4 net: move gro definitions to include/net/gro.h
From: Eric Dumazet <[email protected]>
include/linux/netdevice.h became too big, move gro stuff into include/net/gro.h
Signed-off-by Eric Dumazet <[email protected]>
--- .../net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 1 + drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 + .../net/ethernet/hisilicon/hns3/hns3_enet.c | 1 + .../net/ethernet/mellanox/mlx5/core/en_rx.c | 1 + drivers/net/ethernet/qlogic/qede/qede_fp.c | 1 + drivers/net/geneve.c | 1 + drivers/net/vxlan.c | 1 + include/linux/netdevice.h | 348 --------------- include/net/gro.h | 396 +++++++++++++++++- include/net/ip.h | 8 - include/net/ip6_checksum.h | 8 - include/net/udp.h | 24 -- net/core/skbuff.c | 1 + net/ipv4/af_inet.c | 1 + net/ipv4/esp4_offload.c | 1 + net/ipv4/fou.c | 1 + net/ipv4/gre_offload.c | 1 + net/ipv4/tcp_offload.c | 1 + net/ipv4/udp_offload.c | 1 + net/ipv6/esp6_offload.c | 1 + net/ipv6/tcpv6_offload.c | 1 + net/ipv6/udp_offload.c | 1 + 22 files changed, 411 insertions(+), 390 deletions(-)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +1 -0
@@ -25,6 +25,7 @@#include <linux/ip.h> #include <linux/crash_dump.h> #include <net/tcp.h> +#include <net/gro.h> #include <net/ipv6.h> #include <net/ip6_checksum.h> #include <linux/prefetch.h>
drivers/net/ethernet/broadcom/bnxt/bnxt.c +1 -0
@@ -37,6 +37,7 @@#include <linux/if_bridge.h> #include <linux/rtc.h> #include <linux/bpf.h> +#include <net/gro.h> #include <net/ip.h> #include <net/tcp.h> #include <net/udp.h>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +1 -0
@@ -17,6 +17,7 @@#include <linux/skbuff.h> #include <linux/sctp.h> #include <net/gre.h> +#include <net/gro.h> #include <net/ip6_checksum.h> #include <net/pkt_cls.h> #include <net/tcp.h>
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +1 -0
@@ -37,6 +37,7 @@#include <net/ip6_checksum.h> #include <net/page_pool.h> #include <net/inet_ecn.h> +#include <net/gro.h> #include <net/udp.h> #include <net/tcp.h> #include "en.h"
drivers/net/ethernet/qlogic/qede/qede_fp.c +1 -0
@@ -10,6 +10,7 @@#include <linux/bpf_trace.h> #include <net/udp_tunnel.h> #include <linux/ip.h> +#include <net/gro.h> #include <net/ipv6.h> #include <net/tcp.h> #include <linux/if_ether.h>
drivers/net/geneve.c +1 -0
@@ -17,6 +17,7 @@#include <net/gro_cells.h> #include <net/rtnetlink.h> #include <net/geneve.h> +#include <net/gro.h> #include <net/protocol.h> #define GENEVE_NETDEV_VER "0.6"
drivers/net/vxlan.c +1 -0
@@ -17,6 +17,7 @@#include <linux/ethtool.h> #include <net/arp.h> #include <net/ndisc.h> +#include <net/gro.h> #include <net/ipv6_stubs.h> #include <net/ip.h> #include <net/icmp.h>
include/linux/netdevice.h +0 -348
360 lines not on this page · raw message
include/net/gro.h +394 -2
413 lines not on this page · raw message
include/net/ip.h +0 -8
@@ -568,14 +568,6 @@ static inline void iph_to_flow_copy_v4addrs(struct flow_keys *flow, flow->control.addr_type =FLOW_DISSECTOR_KEY_IPV4_ADDRS ; } -static inline __wsum inet_gro_compute_pseudo (struct sk_buff *skb,int proto) -{ -const struct iphdr *iph =skb_gro_network_header (skb); - -return csum_tcpudp_nofold (iph->saddr, iph->daddr, -skb_gro_len (skb), proto,0 ); -} -/* * Map a multicast IP onto multicast MAC for type ethernet. */
include/net/ip6_checksum.h +0 -8
@@ -43,14 +43,6 @@ static inline __wsum ip6_compute_pseudo(struct sk_buff *skb, int proto) skb->len, proto, 0)); } -static inline __wsum ip6_gro_compute_pseudo (struct sk_buff *skb,int proto) -{ -const struct ipv6hdr *iph =skb_gro_network_header (skb); - -return ~csum_unfold (csum_ipv6_magic (&iph->saddr, &iph->daddr, -skb_gro_len (skb), proto,0 )); -} - static __inline__ __sum16 tcp_v6_check(int len, const struct in6_addr *saddr, const struct in6_addr *daddr,
include/net/udp.h +0 -24
@@ -167,36 +167,12 @@ static inline void udp_csum_pull_header(struct sk_buff *skb)typedef struct sock *(*udp_lookup_t )(const struct sk_buff *skb,__be16 sport,__be16 dport); -INDIRECT_CALLABLE_DECLARE(struct sk_buff *udp4_gro_receive(struct list_head *, -struct sk_buff *)); -INDIRECT_CALLABLE_DECLARE(int udp4_gro_complete(struct sk_buff *, int)); -INDIRECT_CALLABLE_DECLARE(struct sk_buff *udp6_gro_receive(struct list_head *, -struct sk_buff *)); -INDIRECT_CALLABLE_DECLARE(int udp6_gro_complete(struct sk_buff *, int)); INDIRECT_CALLABLE_DECLARE(void udp_v6_early_demux(struct sk_buff *)); INDIRECT_CALLABLE_DECLARE(int udpv6_rcv(struct sk_buff *)); -struct sk_buff *udp_gro_receive (struct list_head *head,struct sk_buff *skb, -struct udphdr *uh,struct sock *sk); -int udp_gro_complete (struct sk_buff *skb,int nhoff,udp_lookup_t lookup); -struct sk_buff *__udp_gso_segment (struct sk_buff *gso_skb,netdev_features_t features,bool is_ipv6); -static inline struct udphdr *udp_gro_udphdr (struct sk_buff *skb) -{ -struct udphdr *uh; -unsigned int hlen, off; - - off =skb_gro_offset (skb); - hlen = off +sizeof (*uh); - uh =skb_gro_header_fast (skb, off); -if (skb_gro_header_hard (skb, hlen)) - uh =skb_gro_header_slow (skb, hlen, off); - -return uh; -} -/* hash routines shared between UDPv4/6 and UDP-Litev4/6 */ static inline int udp_lib_hash (struct sock *sk) {
net/core/skbuff.c +1 -0
@@ -64,6 +64,7 @@#include <net/protocol.h> #include <net/dst.h> +#include <net/gro.h> #include <net/sock.h> #include <net/checksum.h> #include <net/ip6_checksum.h>
net/ipv4/af_inet.c +1 -0
@@ -99,6 +99,7 @@#include <net/route.h> #include <net/ip_fib.h> #include <net/inet_connection_sock.h> +#include <net/gro.h> #include <net/tcp.h> #include <net/udp.h> #include <net/udplite.h>
net/ipv4/esp4_offload.c +1 -0
@@ -16,6 +16,7 @@#include <crypto/authenc.h> #include <linux/err.h> #include <linux/module.h> +#include <net/gro.h> #include <net/ip.h> #include <net/xfrm.h> #include <net/esp.h>
net/ipv4/fou.c +1 -0
@@ -9,6 +9,7 @@#include <linux/types.h> #include <linux/kernel.h> #include <net/genetlink.h> +#include <net/gro.h> #include <net/gue.h> #include <net/fou.h> #include <net/ip.h>
net/ipv4/gre_offload.c +1 -0
@@ -10,6 +10,7 @@#include <linux/init.h> #include <net/protocol.h> #include <net/gre.h> +#include <net/gro.h> static struct sk_buff *gre_gso_segment (struct sk_buff *skb,netdev_features_t features)
net/ipv4/tcp_offload.c +1 -0
@@ -8,6 +8,7 @@#include <linux/indirect_call_wrapper.h> #include <linux/skbuff.h> +#include <net/gro.h> #include <net/tcp.h> #include <net/protocol.h>
net/ipv4/udp_offload.c +1 -0
@@ -7,6 +7,7 @@*/ #include <linux/skbuff.h> +#include <net/gro.h> #include <net/udp.h> #include <net/protocol.h> #include <net/inet_common.h>
net/ipv6/esp6_offload.c +1 -0
@@ -16,6 +16,7 @@#include <crypto/authenc.h> #include <linux/err.h> #include <linux/module.h> +#include <net/gro.h> #include <net/ip.h> #include <net/xfrm.h> #include <net/esp.h>
net/ipv6/tcpv6_offload.c +1 -0
@@ -7,6 +7,7 @@*/ #include <linux/indirect_call_wrapper.h> #include <linux/skbuff.h> +#include <net/gro.h> #include <net/protocol.h> #include <net/tcp.h> #include <net/ip6_checksum.h>
net/ipv6/udp_offload.c +1 -0
@@ -13,6 +13,7 @@#include <net/udp.h> #include <net/ip6_checksum.h> #include "ip6_offload.h" +#include <net/gro.h> static struct sk_buff *udp6_ufo_fragment (struct sk_buff *skb,netdev_features_t features)
Signature · 1 line
2.34.0.rc1.387.gb447b232ab-goog