Merge branch 'net-address-some-sparse-warnings'
Eric Dumazet says: ==================== net: address some sparse warnings This series adds missing declarations and move others to address W=1 C=1 warnings in tcp and udp. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
943d01183c
|
@ -907,6 +907,8 @@ static inline void tcp_skb_bpf_redirect_clear(struct sk_buff *skb)
|
|||
TCP_SKB_CB(skb)->bpf.sk_redir = NULL;
|
||||
}
|
||||
|
||||
extern const struct inet_connection_sock_af_ops ipv4_specific;
|
||||
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
/* This is the variant of inet6_iif() that must be used by TCP,
|
||||
* as TCP moves IP6CB into a different location in skb->cb[]
|
||||
|
@ -933,7 +935,11 @@ static inline int tcp_v6_sdif(const struct sk_buff *skb)
|
|||
return 0;
|
||||
}
|
||||
|
||||
extern const struct inet_connection_sock_af_ops ipv6_specific;
|
||||
|
||||
INDIRECT_CALLABLE_DECLARE(void tcp_v6_send_check(struct sock *sk, struct sk_buff *skb));
|
||||
INDIRECT_CALLABLE_DECLARE(int tcp_v6_rcv(struct sk_buff *skb));
|
||||
INDIRECT_CALLABLE_DECLARE(void tcp_v6_early_demux(struct sk_buff *skb));
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1951,6 +1957,10 @@ void tcp_v4_destroy_sock(struct sock *sk);
|
|||
struct sk_buff *tcp_gso_segment(struct sk_buff *skb,
|
||||
netdev_features_t features);
|
||||
struct sk_buff *tcp_gro_receive(struct list_head *head, struct sk_buff *skb);
|
||||
INDIRECT_CALLABLE_DECLARE(int tcp4_gro_complete(struct sk_buff *skb, int thoff));
|
||||
INDIRECT_CALLABLE_DECLARE(struct sk_buff *tcp4_gro_receive(struct list_head *head, struct sk_buff *skb));
|
||||
INDIRECT_CALLABLE_DECLARE(int tcp6_gro_complete(struct sk_buff *skb, int thoff));
|
||||
INDIRECT_CALLABLE_DECLARE(struct sk_buff *tcp6_gro_receive(struct list_head *head, struct sk_buff *skb));
|
||||
int tcp_gro_complete(struct sk_buff *skb);
|
||||
|
||||
void __tcp_v4_send_check(struct sk_buff *skb, __be32 saddr, __be32 daddr);
|
||||
|
|
|
@ -56,9 +56,6 @@ ip6_dgram_sock_seq_show(struct seq_file *seq, struct sock *sp, __u16 srcp,
|
|||
|
||||
#define LOOPBACK4_IPV6 cpu_to_be32(0x7f000006)
|
||||
|
||||
/* address family specific functions */
|
||||
extern const struct inet_connection_sock_af_ops ipv4_specific;
|
||||
|
||||
void inet6_destroy_sock(struct sock *sk);
|
||||
|
||||
#define IPV6_SEQ_DGRAM_HEADER \
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <linux/ipv6.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/poll.h>
|
||||
#include <linux/indirect_call_wrapper.h>
|
||||
|
||||
/**
|
||||
* struct udp_skb_cb - UDP(-Lite) private variables
|
||||
|
@ -166,6 +167,12 @@ static inline void udp_csum_pull_header(struct sk_buff *skb)
|
|||
typedef struct sock *(*udp_lookup_t)(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));
|
||||
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);
|
||||
|
|
|
@ -1432,10 +1432,6 @@ static struct sk_buff *ipip_gso_segment(struct sk_buff *skb,
|
|||
return inet_gso_segment(skb, features);
|
||||
}
|
||||
|
||||
INDIRECT_CALLABLE_DECLARE(struct sk_buff *tcp4_gro_receive(struct list_head *,
|
||||
struct sk_buff *));
|
||||
INDIRECT_CALLABLE_DECLARE(struct sk_buff *udp4_gro_receive(struct list_head *,
|
||||
struct sk_buff *));
|
||||
struct sk_buff *inet_gro_receive(struct list_head *head, struct sk_buff *skb)
|
||||
{
|
||||
const struct net_offload *ops;
|
||||
|
@ -1608,8 +1604,6 @@ int inet_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
INDIRECT_CALLABLE_DECLARE(int tcp4_gro_complete(struct sk_buff *, int));
|
||||
INDIRECT_CALLABLE_DECLARE(int udp4_gro_complete(struct sk_buff *, int));
|
||||
int inet_gro_complete(struct sk_buff *skb, int nhoff)
|
||||
{
|
||||
__be16 newlen = htons(skb->len - nhoff);
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
#include <net/protocol.h>
|
||||
#include <net/ipv6.h>
|
||||
#include <net/inet_common.h>
|
||||
#include <net/tcp.h>
|
||||
#include <net/udp.h>
|
||||
|
||||
#include "ip6_offload.h"
|
||||
|
||||
|
@ -177,10 +179,6 @@ static int ipv6_exthdrs_len(struct ipv6hdr *iph,
|
|||
return len;
|
||||
}
|
||||
|
||||
INDIRECT_CALLABLE_DECLARE(struct sk_buff *tcp6_gro_receive(struct list_head *,
|
||||
struct sk_buff *));
|
||||
INDIRECT_CALLABLE_DECLARE(struct sk_buff *udp6_gro_receive(struct list_head *,
|
||||
struct sk_buff *));
|
||||
INDIRECT_CALLABLE_SCOPE struct sk_buff *ipv6_gro_receive(struct list_head *head,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
|
@ -319,8 +317,6 @@ static struct sk_buff *ip4ip6_gro_receive(struct list_head *head,
|
|||
return inet_gro_receive(head, skb);
|
||||
}
|
||||
|
||||
INDIRECT_CALLABLE_DECLARE(int tcp6_gro_complete(struct sk_buff *, int));
|
||||
INDIRECT_CALLABLE_DECLARE(int udp6_gro_complete(struct sk_buff *, int));
|
||||
INDIRECT_CALLABLE_SCOPE int ipv6_gro_complete(struct sk_buff *skb, int nhoff)
|
||||
{
|
||||
const struct net_offload *ops;
|
||||
|
|
|
@ -354,11 +354,6 @@ static inline void mptcp_subflow_tcp_fallback(struct sock *sk,
|
|||
inet_csk(sk)->icsk_af_ops = ctx->icsk_af_ops;
|
||||
}
|
||||
|
||||
extern const struct inet_connection_sock_af_ops ipv4_specific;
|
||||
#if IS_ENABLED(CONFIG_MPTCP_IPV6)
|
||||
extern const struct inet_connection_sock_af_ops ipv6_specific;
|
||||
#endif
|
||||
|
||||
void mptcp_proto_init(void);
|
||||
#if IS_ENABLED(CONFIG_MPTCP_IPV6)
|
||||
int mptcp_proto_v6_init(void);
|
||||
|
|
Loading…
Reference in New Issue
Block a user