diff options
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/cfg80211.h | 1 | ||||
| -rw-r--r-- | include/net/gue.h | 18 | ||||
| -rw-r--r-- | include/net/ip.h | 1 | ||||
| -rw-r--r-- | include/net/mac80211.h | 8 | ||||
| -rw-r--r-- | include/net/pkt_cls.h | 5 | ||||
| -rw-r--r-- | include/net/red.h | 13 | ||||
| -rw-r--r-- | include/net/sch_generic.h | 1 | ||||
| -rw-r--r-- | include/net/sctp/checksum.h | 13 | ||||
| -rw-r--r-- | include/net/sctp/sctp.h | 5 | ||||
| -rw-r--r-- | include/net/sctp/stream_sched.h | 5 | ||||
| -rw-r--r-- | include/net/sctp/structs.h | 5 | ||||
| -rw-r--r-- | include/net/sock.h | 11 | ||||
| -rw-r--r-- | include/net/tc_act/tc_sample.h | 1 | ||||
| -rw-r--r-- | include/net/tcp.h | 5 | ||||
| -rw-r--r-- | include/net/vxlan.h | 2 | ||||
| -rw-r--r-- | include/net/xfrm.h | 3 | 
16 files changed, 64 insertions, 33 deletions
| diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 8b8118a7fadb..cb4d92b79cd9 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -3226,7 +3226,6 @@ struct cfg80211_ops {   * @WIPHY_FLAG_IBSS_RSN: The device supports IBSS RSN.   * @WIPHY_FLAG_MESH_AUTH: The device supports mesh authentication by routing   *	auth frames to userspace. See @NL80211_MESH_SETUP_USERSPACE_AUTH. - * @WIPHY_FLAG_SUPPORTS_SCHED_SCAN: The device supports scheduled scans.   * @WIPHY_FLAG_SUPPORTS_FW_ROAM: The device supports roaming feature in the   *	firmware.   * @WIPHY_FLAG_AP_UAPSD: The device supports uapsd on AP. diff --git a/include/net/gue.h b/include/net/gue.h index 2fdb29ca74c2..fdad41469b65 100644 --- a/include/net/gue.h +++ b/include/net/gue.h @@ -44,10 +44,10 @@ struct guehdr {  #else  #error  "Please fix <asm/byteorder.h>"  #endif -			__u8    proto_ctype; -			__u16   flags; +			__u8	proto_ctype; +			__be16	flags;  		}; -		__u32 word; +		__be32	word;  	};  }; @@ -84,11 +84,10 @@ static inline size_t guehdr_priv_flags_len(__be32 flags)   * if there is an unknown standard or private flags, or the options length for   * the flags exceeds the options length specific in hlen of the GUE header.   */ -static inline int validate_gue_flags(struct guehdr *guehdr, -				     size_t optlen) +static inline int validate_gue_flags(struct guehdr *guehdr, size_t optlen)  { +	__be16 flags = guehdr->flags;  	size_t len; -	__be32 flags = guehdr->flags;  	if (flags & ~GUE_FLAGS_ALL)  		return 1; @@ -101,12 +100,13 @@ static inline int validate_gue_flags(struct guehdr *guehdr,  		/* Private flags are last four bytes accounted in  		 * guehdr_flags_len  		 */ -		flags = *(__be32 *)((void *)&guehdr[1] + len - GUE_LEN_PRIV); +		__be32 pflags = *(__be32 *)((void *)&guehdr[1] + +					    len - GUE_LEN_PRIV); -		if (flags & ~GUE_PFLAGS_ALL) +		if (pflags & ~GUE_PFLAGS_ALL)  			return 1; -		len += guehdr_priv_flags_len(flags); +		len += guehdr_priv_flags_len(pflags);  		if (len > optlen)  			return 1;  	} diff --git a/include/net/ip.h b/include/net/ip.h index 9896f46cbbf1..af8addbaa3c1 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -34,6 +34,7 @@  #include <net/flow_dissector.h>  #define IPV4_MAX_PMTU		65535U		/* RFC 2675, Section 5.1 */ +#define IPV4_MIN_MTU		68			/* RFC 791 */  struct sock; diff --git a/include/net/mac80211.h b/include/net/mac80211.h index cc9073e45be9..eec143cca1c0 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -4470,18 +4470,24 @@ struct sk_buff *ieee80211_pspoll_get(struct ieee80211_hw *hw,   * ieee80211_nullfunc_get - retrieve a nullfunc template   * @hw: pointer obtained from ieee80211_alloc_hw().   * @vif: &struct ieee80211_vif pointer from the add_interface callback. + * @qos_ok: QoS NDP is acceptable to the caller, this should be set + *	if at all possible   *   * Creates a Nullfunc template which can, for example, uploaded to   * hardware. The template must be updated after association so that correct   * BSSID and address is used.   * + * If @qos_ndp is set and the association is to an AP with QoS/WMM, the + * returned packet will be QoS NDP. + *   * Note: Caller (or hardware) is responsible for setting the   * &IEEE80211_FCTL_PM bit as well as Duration and Sequence Control fields.   *   * Return: The nullfunc template. %NULL on error.   */  struct sk_buff *ieee80211_nullfunc_get(struct ieee80211_hw *hw, -				       struct ieee80211_vif *vif); +				       struct ieee80211_vif *vif, +				       bool qos_ok);  /**   * ieee80211_probereq_get - retrieve a Probe Request template diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index 0105445cab83..8e08b6da72f3 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h @@ -694,9 +694,7 @@ struct tc_cls_matchall_offload {  };  enum tc_clsbpf_command { -	TC_CLSBPF_ADD, -	TC_CLSBPF_REPLACE, -	TC_CLSBPF_DESTROY, +	TC_CLSBPF_OFFLOAD,  	TC_CLSBPF_STATS,  }; @@ -705,6 +703,7 @@ struct tc_cls_bpf_offload {  	enum tc_clsbpf_command command;  	struct tcf_exts *exts;  	struct bpf_prog *prog; +	struct bpf_prog *oldprog;  	const char *name;  	bool exts_integrated;  	u32 gen_flags; diff --git a/include/net/red.h b/include/net/red.h index 9a9347710701..9665582c4687 100644 --- a/include/net/red.h +++ b/include/net/red.h @@ -168,6 +168,17 @@ static inline void red_set_vars(struct red_vars *v)  	v->qcount	= -1;  } +static inline bool red_check_params(u32 qth_min, u32 qth_max, u8 Wlog) +{ +	if (fls(qth_min) + Wlog > 32) +		return false; +	if (fls(qth_max) + Wlog > 32) +		return false; +	if (qth_max < qth_min) +		return false; +	return true; +} +  static inline void red_set_parms(struct red_parms *p,  				 u32 qth_min, u32 qth_max, u8 Wlog, u8 Plog,  				 u8 Scell_log, u8 *stab, u32 max_P) @@ -179,7 +190,7 @@ static inline void red_set_parms(struct red_parms *p,  	p->qth_max	= qth_max << Wlog;  	p->Wlog		= Wlog;  	p->Plog		= Plog; -	if (delta < 0) +	if (delta <= 0)  		delta = 1;  	p->qth_delta	= delta;  	if (!max_P) { diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 65d0d25f2648..83a3e47d5845 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -71,6 +71,7 @@ struct Qdisc {  				      * qdisc_tree_decrease_qlen() should stop.  				      */  #define TCQ_F_INVISIBLE		0x80 /* invisible by default in dump */ +#define TCQ_F_OFFLOADED		0x200 /* qdisc is offloaded to HW */  	u32			limit;  	const struct Qdisc_ops	*ops;  	struct qdisc_size_table	__rcu *stab; diff --git a/include/net/sctp/checksum.h b/include/net/sctp/checksum.h index 4a5b9a306c69..32ee65a30aff 100644 --- a/include/net/sctp/checksum.h +++ b/include/net/sctp/checksum.h @@ -48,31 +48,32 @@ static inline __wsum sctp_csum_update(const void *buff, int len, __wsum sum)  	/* This uses the crypto implementation of crc32c, which is either  	 * implemented w/ hardware support or resolves to __crc32c_le().  	 */ -	return crc32c(sum, buff, len); +	return (__force __wsum)crc32c((__force __u32)sum, buff, len);  }  static inline __wsum sctp_csum_combine(__wsum csum, __wsum csum2,  				       int offset, int len)  { -	return __crc32c_le_combine(csum, csum2, len); +	return (__force __wsum)__crc32c_le_combine((__force __u32)csum, +						   (__force __u32)csum2, len);  }  static inline __le32 sctp_compute_cksum(const struct sk_buff *skb,  					unsigned int offset)  {  	struct sctphdr *sh = sctp_hdr(skb); -        __le32 ret, old = sh->checksum;  	const struct skb_checksum_ops ops = {  		.update  = sctp_csum_update,  		.combine = sctp_csum_combine,  	}; +	__le32 old = sh->checksum; +	__wsum new;  	sh->checksum = 0; -	ret = cpu_to_le32(~__skb_checksum(skb, offset, skb->len - offset, -					  ~(__u32)0, &ops)); +	new = ~__skb_checksum(skb, offset, skb->len - offset, ~(__wsum)0, &ops);  	sh->checksum = old; -	return ret; +	return cpu_to_le32((__force __u32)new);  }  #endif /* __sctp_checksum_h__ */ diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 749a42882437..906a9c0efa71 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h @@ -195,6 +195,11 @@ void sctp_remaddr_proc_exit(struct net *net);  int sctp_offload_init(void);  /* + * sctp/stream_sched.c + */ +void sctp_sched_ops_init(void); + +/*   * sctp/stream.c   */  int sctp_send_reset_streams(struct sctp_association *asoc, diff --git a/include/net/sctp/stream_sched.h b/include/net/sctp/stream_sched.h index c676550a4c7d..5c5da48f65e7 100644 --- a/include/net/sctp/stream_sched.h +++ b/include/net/sctp/stream_sched.h @@ -69,4 +69,9 @@ void sctp_sched_dequeue_common(struct sctp_outq *q, struct sctp_chunk *ch);  int sctp_sched_init_sid(struct sctp_stream *stream, __u16 sid, gfp_t gfp);  struct sctp_sched_ops *sctp_sched_ops_from_stream(struct sctp_stream *stream); +void sctp_sched_ops_register(enum sctp_sched_type sched, +			     struct sctp_sched_ops *sched_ops); +void sctp_sched_ops_prio_init(void); +void sctp_sched_ops_rr_init(void); +  #endif /* __sctp_stream_sched_h__ */ diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 16f949eef52f..9a5ccf03a59b 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h @@ -503,7 +503,8 @@ struct sctp_datamsg {  	/* Did the messenge fail to send? */  	int send_error;  	u8 send_failed:1, -	   can_delay;	    /* should this message be Nagle delayed */ +	   can_delay:1,	/* should this message be Nagle delayed */ +	   abandoned:1;	/* should this message be abandoned */  };  struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *, @@ -965,7 +966,7 @@ void sctp_transport_burst_limited(struct sctp_transport *);  void sctp_transport_burst_reset(struct sctp_transport *);  unsigned long sctp_transport_timeout(struct sctp_transport *);  void sctp_transport_reset(struct sctp_transport *t); -void sctp_transport_update_pmtu(struct sctp_transport *t, u32 pmtu); +bool sctp_transport_update_pmtu(struct sctp_transport *t, u32 pmtu);  void sctp_transport_immediate_rtx(struct sctp_transport *);  void sctp_transport_dst_release(struct sctp_transport *t);  void sctp_transport_dst_confirm(struct sctp_transport *t); diff --git a/include/net/sock.h b/include/net/sock.h index 79e1a2c7912c..7a7b14e9628a 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -685,11 +685,7 @@ static inline void sk_add_node_rcu(struct sock *sk, struct hlist_head *list)  static inline void __sk_nulls_add_node_rcu(struct sock *sk, struct hlist_nulls_head *list)  { -	if (IS_ENABLED(CONFIG_IPV6) && sk->sk_reuseport && -	    sk->sk_family == AF_INET6) -		hlist_nulls_add_tail_rcu(&sk->sk_nulls_node, list); -	else -		hlist_nulls_add_head_rcu(&sk->sk_nulls_node, list); +	hlist_nulls_add_head_rcu(&sk->sk_nulls_node, list);  }  static inline void sk_nulls_add_node_rcu(struct sock *sk, struct hlist_nulls_head *list) @@ -1518,6 +1514,11 @@ static inline bool sock_owned_by_user(const struct sock *sk)  	return sk->sk_lock.owned;  } +static inline bool sock_owned_by_user_nocheck(const struct sock *sk) +{ +	return sk->sk_lock.owned; +} +  /* no reclassification while locks are held */  static inline bool sock_allow_reclassification(const struct sock *csk)  { diff --git a/include/net/tc_act/tc_sample.h b/include/net/tc_act/tc_sample.h index 524cee4f4c81..01dbfea32672 100644 --- a/include/net/tc_act/tc_sample.h +++ b/include/net/tc_act/tc_sample.h @@ -14,7 +14,6 @@ struct tcf_sample {  	struct psample_group __rcu *psample_group;  	u32 psample_group_num;  	struct list_head tcfm_list; -	struct rcu_head rcu;  };  #define to_sample(a) ((struct tcf_sample *)a) diff --git a/include/net/tcp.h b/include/net/tcp.h index 4e09398009c1..6da880d2f022 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -844,12 +844,11 @@ static inline int tcp_v6_sdif(const struct sk_buff *skb)  }  #endif -/* TCP_SKB_CB reference means this can not be used from early demux */  static inline bool inet_exact_dif_match(struct net *net, struct sk_buff *skb)  {  #if IS_ENABLED(CONFIG_NET_L3_MASTER_DEV)  	if (!net->ipv4.sysctl_tcp_l3mdev_accept && -	    skb && ipv4_l3mdev_skb(TCP_SKB_CB(skb)->header.h4.flags)) +	    skb && ipv4_l3mdev_skb(IPCB(skb)->flags))  		return true;  #endif  	return false; @@ -1056,7 +1055,7 @@ void tcp_rate_skb_sent(struct sock *sk, struct sk_buff *skb);  void tcp_rate_skb_delivered(struct sock *sk, struct sk_buff *skb,  			    struct rate_sample *rs);  void tcp_rate_gen(struct sock *sk, u32 delivered, u32 lost, -		  struct rate_sample *rs); +		  bool is_sack_reneg, struct rate_sample *rs);  void tcp_rate_check_app_limited(struct sock *sk);  /* These functions determine how the current flow behaves in respect of SACK diff --git a/include/net/vxlan.h b/include/net/vxlan.h index 13223396dc64..f96391e84a8a 100644 --- a/include/net/vxlan.h +++ b/include/net/vxlan.h @@ -146,7 +146,7 @@ struct vxlanhdr_gpe {  		np_applied:1,  		instance_applied:1,  		version:2, -reserved_flags2:2; +		reserved_flags2:2;  #elif defined(__BIG_ENDIAN_BITFIELD)  	u8	reserved_flags2:2,  		version:2, diff --git a/include/net/xfrm.h b/include/net/xfrm.h index dc28a98ce97c..ae35991b5877 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -1570,6 +1570,9 @@ int xfrm_init_state(struct xfrm_state *x);  int xfrm_prepare_input(struct xfrm_state *x, struct sk_buff *skb);  int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type);  int xfrm_input_resume(struct sk_buff *skb, int nexthdr); +int xfrm_trans_queue(struct sk_buff *skb, +		     int (*finish)(struct net *, struct sock *, +				   struct sk_buff *));  int xfrm_output_resume(struct sk_buff *skb, int err);  int xfrm_output(struct sock *sk, struct sk_buff *skb);  int xfrm_inner_extract_output(struct xfrm_state *x, struct sk_buff *skb); | 

