Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/ethernet/mellanox/mlx4/main.c net/packet/af_packet.c Both conflicts were cases of simple overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -1322,16 +1322,6 @@ static void packet_sock_destruct(struct sock *sk)
|
||||
sk_refcnt_debug_dec(sk);
|
||||
}
|
||||
|
||||
static int fanout_rr_next(struct packet_fanout *f, unsigned int num)
|
||||
{
|
||||
int x = atomic_read(&f->rr_cur) + 1;
|
||||
|
||||
if (x >= num)
|
||||
x = 0;
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
static bool fanout_flow_is_huge(struct packet_sock *po, struct sk_buff *skb)
|
||||
{
|
||||
u32 rxhash;
|
||||
@@ -1357,13 +1347,9 @@ static unsigned int fanout_demux_lb(struct packet_fanout *f,
|
||||
struct sk_buff *skb,
|
||||
unsigned int num)
|
||||
{
|
||||
int cur, old;
|
||||
unsigned int val = atomic_inc_return(&f->rr_cur);
|
||||
|
||||
cur = atomic_read(&f->rr_cur);
|
||||
while ((old = atomic_cmpxchg(&f->rr_cur, cur,
|
||||
fanout_rr_next(f, num))) != cur)
|
||||
cur = old;
|
||||
return cur;
|
||||
return val % num;
|
||||
}
|
||||
|
||||
static unsigned int fanout_demux_cpu(struct packet_fanout *f,
|
||||
@@ -1435,7 +1421,7 @@ static int packet_rcv_fanout(struct sk_buff *skb, struct net_device *dev,
|
||||
struct packet_type *pt, struct net_device *orig_dev)
|
||||
{
|
||||
struct packet_fanout *f = pt->af_packet_priv;
|
||||
unsigned int num = f->num_members;
|
||||
unsigned int num = READ_ONCE(f->num_members);
|
||||
struct packet_sock *po;
|
||||
unsigned int idx;
|
||||
|
||||
|
Reference in New Issue
Block a user