From: David S. Miller Date: Wed, 24 Jun 2015 09:58:51 +0000 (-0700) Subject: Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net X-Git-Tag: v4.9.8~4072^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3a07bd6fead4f00f67b1bf5f551e686661c4f52c;p=platform%2Fkernel%2Flinux-rpi3.git Merge git://git./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 --- 3a07bd6fead4f00f67b1bf5f551e686661c4f52c diff --cc drivers/net/ethernet/mellanox/mlx4/main.c index 4e69cf5,68b5a55..33e68b1 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c @@@ -479,7 -479,15 +479,15 @@@ static int mlx4_dev_cap(struct mlx4_de } } + if (mlx4_is_master(dev) && (dev->caps.num_ports == 2) && + (port_type_array[0] == MLX4_PORT_TYPE_IB) && + (port_type_array[1] == MLX4_PORT_TYPE_ETH)) { + mlx4_warn(dev, + "Granular QoS per VF not supported with IB/Eth configuration\n"); + dev->caps.flags2 &= ~MLX4_DEV_CAP_FLAG2_QOS_VPP; + } + - dev->caps.max_counters = 1 << ilog2(dev_cap->max_counters); + dev->caps.max_counters = dev_cap->max_counters; dev->caps.reserved_qps_cnt[MLX4_QP_REGION_FW] = dev_cap->reserved_qps; dev->caps.reserved_qps_cnt[MLX4_QP_REGION_ETH_ADDR] = diff --cc net/packet/af_packet.c index f5c8703,fe1610d..c9e8741 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@@ -1322,30 -1272,6 +1322,20 @@@ static void packet_sock_destruct(struc 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; + int i, count = 0; + + rxhash = skb_get_hash(skb); + for (i = 0; i < ROLLOVER_HLEN; i++) + if (po->rollover->history[i] == rxhash) + count++; + + po->rollover->history[prandom_u32() % ROLLOVER_HLEN] = rxhash; + return count > (ROLLOVER_HLEN >> 1); +} + static unsigned int fanout_demux_hash(struct packet_fanout *f, struct sk_buff *skb, unsigned int num)