Skip to content

Commit 5f4fc6d

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Fix AF_XDP cq entry leak, from Ilya Maximets. 2) Fix handling of PHY power-down on RTL8411B, from Heiner Kallweit. 3) Add some new PCI IDs to iwlwifi, from Ihab Zhaika. 4) Fix handling of neigh timers wrt. entries added by userspace, from Lorenzo Bianconi. 5) Various cases of missing of_node_put(), from Nishka Dasgupta. 6) The new NET_ACT_CT needs to depend upon NF_NAT, from Yue Haibing. 7) Various RDS layer fixes, from Gerd Rausch. 8) Fix some more fallout from TCQ_F_CAN_BYPASS generalization, from Cong Wang. 9) Fix FIB source validation checks over loopback, also from Cong Wang. 10) Use promisc for unsupported number of filters, from Justin Chen. 11) Missing sibling route unlink on failure in ipv6, from Ido Schimmel. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (90 commits) tcp: fix tcp_set_congestion_control() use from bpf hook ag71xx: fix return value check in ag71xx_probe() ag71xx: fix error return code in ag71xx_probe() usb: qmi_wwan: add D-Link DWM-222 A2 device ID bnxt_en: Fix VNIC accounting when enabling aRFS on 57500 chips. net: dsa: sja1105: Fix missing unlock on error in sk_buff() gve: replace kfree with kvfree selftests/bpf: fix test_xdp_noinline on s390 selftests/bpf: fix "valid read map access into a read-only array 1" on s390 net/mlx5: Replace kfree with kvfree MAINTAINERS: update netsec driver ipv6: Unlink sibling route in case of failure liquidio: Replace vmalloc + memset with vzalloc udp: Fix typo in net/ipv4/udp.c net: bcmgenet: use promisc for unsupported filters ipv6: rt6_check should return NULL if 'from' is NULL tipc: initialize 'validated' field of received packets selftests: add a test case for rp_filter fib: relax source validation check for loopback packets mlxsw: spectrum: Do not process learned records with a dummy FID ...
2 parents 249be85 + 8d650cd commit 5f4fc6d

102 files changed

Lines changed: 965 additions & 400 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/networking/bonding.txt‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -706,9 +706,9 @@ num_unsol_na
706706
unsolicited IPv6 Neighbor Advertisements) to be issued after a
707707
failover event. As soon as the link is up on the new slave
708708
(possibly immediately) a peer notification is sent on the
709-
bonding device and each VLAN sub-device. This is repeated at
710-
each link monitor interval (arp_interval or miimon, whichever
711-
is active) if the number is greater than 1.
709+
bonding device and each VLAN sub-device. This is repeated at
710+
the rate specified by peer_notif_delay if the number is
711+
greater than 1.
712712

713713
The valid range is 0 - 255; the default value is 1. These options
714714
affect only the active-backup mode. These options were added for
@@ -727,6 +727,16 @@ packets_per_slave
727727
The valid range is 0 - 65535; the default value is 1. This option
728728
has effect only in balance-rr mode.
729729

730+
peer_notif_delay
731+
732+
Specify the delay, in milliseconds, between each peer
733+
notification (gratuitous ARP and unsolicited IPv6 Neighbor
734+
Advertisement) when they are issued after a failover event.
735+
This delay should be a multiple of the link monitor interval
736+
(arp_interval or miimon, whichever is active). The default
737+
value is 0 which means to match the value of the link monitor
738+
interval.
739+
730740
primary
731741

732742
A string (eth0, eth2, etc) specifying which slave is the

‎MAINTAINERS‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3108,9 +3108,9 @@ S: Maintained
31083108
F: arch/riscv/net/
31093109

31103110
BPF JIT for S390
3111+
M: Ilya Leoshkevich <iii@linux.ibm.com>
31113112
M: Heiko Carstens <heiko.carstens@de.ibm.com>
31123113
M: Vasily Gorbik <gor@linux.ibm.com>
3113-
M: Christian Borntraeger <borntraeger@de.ibm.com>
31143114
L: netdev@vger.kernel.org
31153115
L: bpf@vger.kernel.org
31163116
S: Maintained
@@ -14873,6 +14873,7 @@ F: Documentation/devicetree/bindings/net/socionext,uniphier-ave4.txt
1487314873

1487414874
SOCIONEXT (SNI) NETSEC NETWORK DRIVER
1487514875
M: Jassi Brar <jaswinder.singh@linaro.org>
14876+
M: Ilias Apalodimas <ilias.apalodimas@linaro.org>
1487614877
L: netdev@vger.kernel.org
1487714878
S: Maintained
1487814879
F: drivers/net/ethernet/socionext/netsec.c

‎drivers/atm/idt77252.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1379,7 +1379,6 @@ init_tsq(struct idt77252_dev *card)
13791379
printk("%s: can't allocate TSQ.\n", card->name);
13801380
return -1;
13811381
}
1382-
memset(card->tsq.base, 0, TSQSIZE);
13831382

13841383
card->tsq.last = card->tsq.base + TSQ_NUM_ENTRIES - 1;
13851384
card->tsq.next = card->tsq.last;

‎drivers/isdn/hardware/mISDN/hfcsusb.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1955,6 +1955,9 @@ hfcsusb_probe(struct usb_interface *intf, const struct usb_device_id *id)
19551955

19561956
/* get endpoint base */
19571957
idx = ((ep_addr & 0x7f) - 1) * 2;
1958+
if (idx > 15)
1959+
return -EIO;
1960+
19581961
if (ep_addr & 0x80)
19591962
idx++;
19601963
attr = ep->desc.bmAttributes;

‎drivers/net/caif/caif_hsi.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,7 @@ static void __exit cfhsi_exit_module(void)
14551455
rtnl_lock();
14561456
list_for_each_safe(list_node, n, &cfhsi_list) {
14571457
cfhsi = list_entry(list_node, struct cfhsi, list);
1458-
unregister_netdev(cfhsi->ndev);
1458+
unregister_netdevice(cfhsi->ndev);
14591459
}
14601460
rtnl_unlock();
14611461
}

‎drivers/net/ethernet/atheros/ag71xx.c‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include <linux/regmap.h>
3636
#include <linux/reset.h>
3737
#include <linux/clk.h>
38+
#include <linux/io.h>
3839

3940
/* For our NAPI weight bigger does *NOT* mean better - it means more
4041
* D-cache misses and lots more wasted cycles than we'll ever
@@ -1724,17 +1725,19 @@ static int ag71xx_probe(struct platform_device *pdev)
17241725
ag->stop_desc = dmam_alloc_coherent(&pdev->dev,
17251726
sizeof(struct ag71xx_desc),
17261727
&ag->stop_desc_dma, GFP_KERNEL);
1727-
if (!ag->stop_desc)
1728+
if (!ag->stop_desc) {
1729+
err = -ENOMEM;
17281730
goto err_free;
1731+
}
17291732

17301733
ag->stop_desc->data = 0;
17311734
ag->stop_desc->ctrl = 0;
17321735
ag->stop_desc->next = (u32)ag->stop_desc_dma;
17331736

17341737
mac_addr = of_get_mac_address(np);
1735-
if (mac_addr)
1738+
if (!IS_ERR(mac_addr))
17361739
memcpy(ndev->dev_addr, mac_addr, ETH_ALEN);
1737-
if (!mac_addr || !is_valid_ether_addr(ndev->dev_addr)) {
1740+
if (IS_ERR(mac_addr) || !is_valid_ether_addr(ndev->dev_addr)) {
17381741
netif_err(ag, probe, ndev, "invalid MAC address, using random address\n");
17391742
eth_random_addr(ndev->dev_addr);
17401743
}

‎drivers/net/ethernet/atheros/atlx/atl1.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,8 +1060,6 @@ static s32 atl1_setup_ring_resources(struct atl1_adapter *adapter)
10601060
goto err_nomem;
10611061
}
10621062

1063-
memset(ring_header->desc, 0, ring_header->size);
1064-
10651063
/* init TPD ring */
10661064
tpd_ring->dma = ring_header->dma;
10671065
offset = (tpd_ring->dma & 0x7) ? (8 - (ring_header->dma & 0x7)) : 0;

‎drivers/net/ethernet/atheros/atlx/atl2.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ static s32 atl2_setup_ring_resources(struct atl2_adapter *adapter)
291291
&adapter->ring_dma);
292292
if (!adapter->ring_vir_addr)
293293
return -ENOMEM;
294-
memset(adapter->ring_vir_addr, 0, adapter->ring_size);
295294

296295
/* Init TXD Ring */
297296
adapter->txd_dma = adapter->ring_dma ;

‎drivers/net/ethernet/broadcom/bnxt/bnxt.c‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2677,8 +2677,6 @@ static int bnxt_alloc_tx_rings(struct bnxt *bp)
26772677
mapping = txr->tx_push_mapping +
26782678
sizeof(struct tx_push_bd);
26792679
txr->data_mapping = cpu_to_le64(mapping);
2680-
2681-
memset(txr->tx_push, 0, sizeof(struct tx_push_bd));
26822680
}
26832681
qidx = bp->tc_to_qidx[j];
26842682
ring->queue_id = bp->q_info[qidx].queue_id;
@@ -3077,7 +3075,7 @@ static int bnxt_alloc_vnics(struct bnxt *bp)
30773075
int num_vnics = 1;
30783076

30793077
#ifdef CONFIG_RFS_ACCEL
3080-
if (bp->flags & BNXT_FLAG_RFS)
3078+
if ((bp->flags & (BNXT_FLAG_RFS | BNXT_FLAG_CHIP_P5)) == BNXT_FLAG_RFS)
30813079
num_vnics += bp->rx_nr_rings;
30823080
#endif
30833081

@@ -7188,6 +7186,9 @@ static int bnxt_alloc_rfs_vnics(struct bnxt *bp)
71887186
#ifdef CONFIG_RFS_ACCEL
71897187
int i, rc = 0;
71907188

7189+
if (bp->flags & BNXT_FLAG_CHIP_P5)
7190+
return 0;
7191+
71917192
for (i = 0; i < bp->rx_nr_rings; i++) {
71927193
struct bnxt_vnic_info *vnic;
71937194
u16 vnic_id = i + 1;
@@ -9647,7 +9648,7 @@ int bnxt_check_rings(struct bnxt *bp, int tx, int rx, bool sh, int tcs,
96479648
return -ENOMEM;
96489649

96499650
vnics = 1;
9650-
if (bp->flags & BNXT_FLAG_RFS)
9651+
if ((bp->flags & (BNXT_FLAG_RFS | BNXT_FLAG_CHIP_P5)) == BNXT_FLAG_RFS)
96519652
vnics += rx_rings;
96529653

96539654
if (bp->flags & BNXT_FLAG_AGG_RINGS)

‎drivers/net/ethernet/broadcom/genet/bcmgenet.c‎

Lines changed: 26 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3083,39 +3083,42 @@ static void bcmgenet_timeout(struct net_device *dev)
30833083
netif_tx_wake_all_queues(dev);
30843084
}
30853085

3086-
#define MAX_MC_COUNT 16
3086+
#define MAX_MDF_FILTER 17
30873087

30883088
static inline void bcmgenet_set_mdf_addr(struct bcmgenet_priv *priv,
30893089
unsigned char *addr,
3090-
int *i,
3091-
int *mc)
3090+
int *i)
30923091
{
3093-
u32 reg;
3094-
30953092
bcmgenet_umac_writel(priv, addr[0] << 8 | addr[1],
30963093
UMAC_MDF_ADDR + (*i * 4));
30973094
bcmgenet_umac_writel(priv, addr[2] << 24 | addr[3] << 16 |
30983095
addr[4] << 8 | addr[5],
30993096
UMAC_MDF_ADDR + ((*i + 1) * 4));
3100-
reg = bcmgenet_umac_readl(priv, UMAC_MDF_CTRL);
3101-
reg |= (1 << (MAX_MC_COUNT - *mc));
3102-
bcmgenet_umac_writel(priv, reg, UMAC_MDF_CTRL);
31033097
*i += 2;
3104-
(*mc)++;
31053098
}
31063099

31073100
static void bcmgenet_set_rx_mode(struct net_device *dev)
31083101
{
31093102
struct bcmgenet_priv *priv = netdev_priv(dev);
31103103
struct netdev_hw_addr *ha;
3111-
int i, mc;
3104+
int i, nfilter;
31123105
u32 reg;
31133106

31143107
netif_dbg(priv, hw, dev, "%s: %08X\n", __func__, dev->flags);
31153108

3116-
/* Promiscuous mode */
3109+
/* Number of filters needed */
3110+
nfilter = netdev_uc_count(dev) + netdev_mc_count(dev) + 2;
3111+
3112+
/*
3113+
* Turn on promicuous mode for three scenarios
3114+
* 1. IFF_PROMISC flag is set
3115+
* 2. IFF_ALLMULTI flag is set
3116+
* 3. The number of filters needed exceeds the number filters
3117+
* supported by the hardware.
3118+
*/
31173119
reg = bcmgenet_umac_readl(priv, UMAC_CMD);
3118-
if (dev->flags & IFF_PROMISC) {
3120+
if ((dev->flags & (IFF_PROMISC | IFF_ALLMULTI)) ||
3121+
(nfilter > MAX_MDF_FILTER)) {
31193122
reg |= CMD_PROMISC;
31203123
bcmgenet_umac_writel(priv, reg, UMAC_CMD);
31213124
bcmgenet_umac_writel(priv, 0, UMAC_MDF_CTRL);
@@ -3125,32 +3128,24 @@ static void bcmgenet_set_rx_mode(struct net_device *dev)
31253128
bcmgenet_umac_writel(priv, reg, UMAC_CMD);
31263129
}
31273130

3128-
/* UniMac doesn't support ALLMULTI */
3129-
if (dev->flags & IFF_ALLMULTI) {
3130-
netdev_warn(dev, "ALLMULTI is not supported\n");
3131-
return;
3132-
}
3133-
31343131
/* update MDF filter */
31353132
i = 0;
3136-
mc = 0;
31373133
/* Broadcast */
3138-
bcmgenet_set_mdf_addr(priv, dev->broadcast, &i, &mc);
3134+
bcmgenet_set_mdf_addr(priv, dev->broadcast, &i);
31393135
/* my own address.*/
3140-
bcmgenet_set_mdf_addr(priv, dev->dev_addr, &i, &mc);
3141-
/* Unicast list*/
3142-
if (netdev_uc_count(dev) > (MAX_MC_COUNT - mc))
3143-
return;
3136+
bcmgenet_set_mdf_addr(priv, dev->dev_addr, &i);
31443137

3145-
if (!netdev_uc_empty(dev))
3146-
netdev_for_each_uc_addr(ha, dev)
3147-
bcmgenet_set_mdf_addr(priv, ha->addr, &i, &mc);
3148-
/* Multicast */
3149-
if (netdev_mc_empty(dev) || netdev_mc_count(dev) >= (MAX_MC_COUNT - mc))
3150-
return;
3138+
/* Unicast */
3139+
netdev_for_each_uc_addr(ha, dev)
3140+
bcmgenet_set_mdf_addr(priv, ha->addr, &i);
31513141

3142+
/* Multicast */
31523143
netdev_for_each_mc_addr(ha, dev)
3153-
bcmgenet_set_mdf_addr(priv, ha->addr, &i, &mc);
3144+
bcmgenet_set_mdf_addr(priv, ha->addr, &i);
3145+
3146+
/* Enable filters */
3147+
reg = GENMASK(MAX_MDF_FILTER - 1, MAX_MDF_FILTER - nfilter);
3148+
bcmgenet_umac_writel(priv, reg, UMAC_MDF_CTRL);
31543149
}
31553150

31563151
/* Set the hardware MAC address. */

0 commit comments

Comments
 (0)