Re: [PATCH net-next v2 3/4] net: use indirect call wrappers at GRO transport layer

From: Stephen Hemminger
Date: Thu Dec 20 2018 - 21:57:36 EST


On Wed, 5 Dec 2018 19:13:41 +0100
Paolo Abeni <pabeni@xxxxxxxxxx> wrote:

> This avoids an indirect call in the receive path for TCP and UDP
> packets. TCP takes precedence on UDP, so that we have a single
> additional conditional in the common case.
>
> v1 -> v2:
> - adapted to INDIRECT_CALL_ changes
>
> Signed-off-by: Paolo Abeni <pabeni@xxxxxxxxxx>

This introduces a bunch of new warnings when kernel is built with W=1.
Please add the necessary prototypes in header files.

Putting prototypes in C file for global function is not the right way to fix
this.

net/ipv4/tcp_offload.c:310:17: warning: no previous prototype for âtcp4_gro_receiveâ [-Wmissing-prototypes]
struct sk_buff *tcp4_gro_receive(struct list_head *head, struct sk_buff *skb)
^~~~~~~~~~~~~~~~
net/ipv4/tcp_offload.c:323:29: warning: no previous prototype for âtcp4_gro_completeâ [-Wmissing-prototypes]
INDIRECT_CALLABLE_SCOPE int tcp4_gro_complete(struct sk_buff *skb, int thoff)
^~~~~~~~~~~~~~~~~
CC net/ipv4/datagram.o
CC net/ipv4/udp_offload.o
net/ipv4/udp_offload.c:459:17: warning: no previous prototype for âudp4_gro_receiveâ [-Wmissing-prototypes]
struct sk_buff *udp4_gro_receive(struct list_head *head, struct sk_buff *skb)
^~~~~~~~~~~~~~~~
net/ipv4/udp_offload.c:533:29: warning: no previous prototype for âudp4_gro_completeâ [-Wmissing-prototypes]
INDIRECT_CALLABLE_SCOPE int udp4_gro_complete(struct sk_buff *skb, int nhoff)
^~~~~~~~~~~~~~~~~
CC net/ipv4/arp.o
CC net/ipv6/ip6_offload.o
net/ipv6/ip6_offload.c:188:41: warning: no previous prototype for âipv6_gro_receiveâ [-Wmissing-prototypes]
INDIRECT_CALLABLE_SCOPE struct sk_buff *ipv6_gro_receive(struct list_head *head,
^~~~~~~~~~~~~~~~
net/ipv6/ip6_offload.c:328:29: warning: no previous prototype for âipv6_gro_completeâ [-Wmissing-prototypes]
INDIRECT_CALLABLE_SCOPE int ipv6_gro_complete(struct sk_buff *skb, int nhoff)
^~~~~~~~~~~~~~~~~
CC net/ipv6/tcpv6_offload.o
net/ipv6/tcpv6_offload.c:20:17: warning: no previous prototype for âtcp6_gro_receiveâ [-Wmissing-prototypes]
struct sk_buff *tcp6_gro_receive(struct list_head *head, struct sk_buff *skb)
^~~~~~~~~~~~~~~~
net/ipv6/tcpv6_offload.c:33:29: warning: no previous prototype for âtcp6_gro_completeâ [-Wmissing-prototypes]
INDIRECT_CALLABLE_SCOPE int tcp6_gro_complete(struct sk_buff *skb, int thoff)
^~~~~~~~~~~~~~~~~
CC net/ipv6/exthdrs_offload.o