Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -550,4 +550,15 @@ static inline void skb_dst_update_pmtu_no_confirm(struct sk_buff *skb, u32 mtu)
|
||||
dst->ops->update_pmtu(dst, NULL, skb, mtu, false);
|
||||
}
|
||||
|
||||
struct dst_entry *dst_blackhole_check(struct dst_entry *dst, u32 cookie);
|
||||
void dst_blackhole_update_pmtu(struct dst_entry *dst, struct sock *sk,
|
||||
struct sk_buff *skb, u32 mtu, bool confirm_neigh);
|
||||
void dst_blackhole_redirect(struct dst_entry *dst, struct sock *sk,
|
||||
struct sk_buff *skb);
|
||||
u32 *dst_blackhole_cow_metrics(struct dst_entry *dst, unsigned long old);
|
||||
struct neighbour *dst_blackhole_neigh_lookup(const struct dst_entry *dst,
|
||||
struct sk_buff *skb,
|
||||
const void *daddr);
|
||||
unsigned int dst_blackhole_mtu(const struct dst_entry *dst);
|
||||
|
||||
#endif /* _NET_DST_H */
|
||||
|
||||
@@ -282,7 +282,7 @@ static inline int inet_csk_reqsk_queue_is_full(const struct sock *sk)
|
||||
return inet_csk_reqsk_queue_len(sk) >= sk->sk_max_ack_backlog;
|
||||
}
|
||||
|
||||
void inet_csk_reqsk_queue_drop(struct sock *sk, struct request_sock *req);
|
||||
bool inet_csk_reqsk_queue_drop(struct sock *sk, struct request_sock *req);
|
||||
void inet_csk_reqsk_queue_drop_and_put(struct sock *sk, struct request_sock *req);
|
||||
|
||||
static inline void inet_csk_prepare_for_destroy_sock(struct sock *sk)
|
||||
|
||||
@@ -1539,6 +1539,7 @@ struct nft_trans_flowtable {
|
||||
struct nft_flowtable *flowtable;
|
||||
bool update;
|
||||
struct list_head hook_list;
|
||||
u32 flags;
|
||||
};
|
||||
|
||||
#define nft_trans_flowtable(trans) \
|
||||
@@ -1547,6 +1548,8 @@ struct nft_trans_flowtable {
|
||||
(((struct nft_trans_flowtable *)trans->data)->update)
|
||||
#define nft_trans_flowtable_hooks(trans) \
|
||||
(((struct nft_trans_flowtable *)trans->data)->hook_list)
|
||||
#define nft_trans_flowtable_flags(trans) \
|
||||
(((struct nft_trans_flowtable *)trans->data)->flags)
|
||||
|
||||
int __init nft_chain_filter_init(void);
|
||||
void nft_chain_filter_fini(void);
|
||||
|
||||
@@ -476,6 +476,7 @@ static inline struct fib_nh *fib_info_nh(struct fib_info *fi, int nhsel)
|
||||
int fib6_check_nexthop(struct nexthop *nh, struct fib6_config *cfg,
|
||||
struct netlink_ext_ack *extack);
|
||||
|
||||
/* Caller should either hold rcu_read_lock(), or RTNL. */
|
||||
static inline struct fib6_nh *nexthop_fib6_nh(struct nexthop *nh)
|
||||
{
|
||||
struct nh_info *nhi;
|
||||
@@ -496,6 +497,29 @@ static inline struct fib6_nh *nexthop_fib6_nh(struct nexthop *nh)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Variant of nexthop_fib6_nh().
|
||||
* Caller should either hold rcu_read_lock_bh(), or RTNL.
|
||||
*/
|
||||
static inline struct fib6_nh *nexthop_fib6_nh_bh(struct nexthop *nh)
|
||||
{
|
||||
struct nh_info *nhi;
|
||||
|
||||
if (nh->is_group) {
|
||||
struct nh_group *nh_grp;
|
||||
|
||||
nh_grp = rcu_dereference_bh_rtnl(nh->nh_grp);
|
||||
nh = nexthop_mpath_select(nh_grp, 0);
|
||||
if (!nh)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
nhi = rcu_dereference_bh_rtnl(nh->nh_info);
|
||||
if (nhi->family == AF_INET6)
|
||||
return &nhi->fib6_nh;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline struct net_device *fib6_info_nh_dev(struct fib6_info *f6i)
|
||||
{
|
||||
struct fib6_nh *fib6_nh;
|
||||
|
||||
@@ -168,7 +168,8 @@ 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, u8 Scell_log)
|
||||
static inline bool red_check_params(u32 qth_min, u32 qth_max, u8 Wlog,
|
||||
u8 Scell_log, u8 *stab)
|
||||
{
|
||||
if (fls(qth_min) + Wlog > 32)
|
||||
return false;
|
||||
@@ -178,6 +179,13 @@ static inline bool red_check_params(u32 qth_min, u32 qth_max, u8 Wlog, u8 Scell_
|
||||
return false;
|
||||
if (qth_max < qth_min)
|
||||
return false;
|
||||
if (stab) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < RED_STAB_SIZE; i++)
|
||||
if (stab[i] >= 32)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -287,7 +295,7 @@ static inline unsigned long red_calc_qavg_from_idle_time(const struct red_parms
|
||||
int shift;
|
||||
|
||||
/*
|
||||
* The problem: ideally, average length queue recalcultion should
|
||||
* The problem: ideally, average length queue recalculation should
|
||||
* be done over constant clock intervals. This is too expensive, so
|
||||
* that the calculation is driven by outgoing packets.
|
||||
* When the queue is idle we have to model this clock by hand.
|
||||
|
||||
@@ -33,6 +33,7 @@ static inline int rtnl_msg_family(const struct nlmsghdr *nlh)
|
||||
*
|
||||
* @list: Used internally
|
||||
* @kind: Identifier
|
||||
* @netns_refund: Physical device, move to init_net on netns exit
|
||||
* @maxtype: Highest device specific netlink attribute number
|
||||
* @policy: Netlink policy for device specific attribute validation
|
||||
* @validate: Optional validation function for netlink/changelink parameters
|
||||
@@ -64,6 +65,7 @@ struct rtnl_link_ops {
|
||||
size_t priv_size;
|
||||
void (*setup)(struct net_device *dev);
|
||||
|
||||
bool netns_refund;
|
||||
unsigned int maxtype;
|
||||
const struct nla_policy *policy;
|
||||
int (*validate)(struct nlattr *tb[],
|
||||
|
||||
@@ -936,7 +936,7 @@ static inline void sk_acceptq_added(struct sock *sk)
|
||||
|
||||
static inline bool sk_acceptq_is_full(const struct sock *sk)
|
||||
{
|
||||
return READ_ONCE(sk->sk_ack_backlog) > READ_ONCE(sk->sk_max_ack_backlog);
|
||||
return READ_ONCE(sk->sk_ack_backlog) >= READ_ONCE(sk->sk_max_ack_backlog);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user