Skip to content

Commit 1b51f69

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from David Miller: "It looks like a decent sized set of fixes, but a lot of these are one liner off-by-one and similar type changes: 1) Fix netlink header pointer to calcular bad attribute offset reported to user. From Pablo Neira Ayuso. 2) Don't double clear PHY interrupts when ->did_interrupt is set, from Heiner Kallweit. 3) Add missing validation of various (devlink, nl802154, fib, etc.) attributes, from Jakub Kicinski. 4) Missing *pos increments in various netfilter seq_next ops, from Vasily Averin. 5) Missing break in of_mdiobus_register() loop, from Dajun Jin. 6) Don't double bump tx_dropped in veth driver, from Jiang Lidong. 7) Work around FMAN erratum A050385, from Madalin Bucur. 8) Make sure ARP header is pulled early enough in bonding driver, from Eric Dumazet. 9) Do a cond_resched() during multicast processing of ipvlan and macvlan, from Mahesh Bandewar. 10) Don't attach cgroups to unrelated sockets when in interrupt context, from Shakeel Butt. 11) Fix tpacket ring state management when encountering unknown GSO types. From Willem de Bruijn. 12) Fix MDIO bus PHY resume by checking mdio_bus_phy_may_suspend() only in the suspend context. From Heiner Kallweit" * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (112 commits) net: systemport: fix index check to avoid an array out of bounds access tc-testing: add ETS scheduler to tdc build configuration net: phy: fix MDIO bus PM PHY resuming net: hns3: clear port base VLAN when unload PF net: hns3: fix RMW issue for VLAN filter switch net: hns3: fix VF VLAN table entries inconsistent issue net: hns3: fix "tc qdisc del" failed issue taprio: Fix sending packets without dequeueing them net: mvmdio: avoid error message for optional IRQ net: dsa: mv88e6xxx: Add missing mask of ATU occupancy register net: memcg: fix lockdep splat in inet_csk_accept() s390/qeth: implement smarter resizing of the RX buffer pool s390/qeth: refactor buffer pool code s390/qeth: use page pointers to manage RX buffer pool seg6: fix SRv6 L2 tunnels to use IANA-assigned protocol number net: dsa: Don't instantiate phylink for CPU/DSA ports unless needed net/packet: tpacket_rcv: do not increment ring index on drop sxgbe: Fix off by one in samsung driver strncpy size arg net: caif: Add lockdep expression to RCU traversal primitive MAINTAINERS: remove Sathya Perla as Emulex NIC maintainer ...
2 parents 807f030 + c036859 commit 1b51f69

File tree

110 files changed

+993
-370
lines changed

Some content is hidden

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

110 files changed

+993
-370
lines changed

Documentation/devicetree/bindings/net/fsl-fman.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,13 @@ PROPERTIES
110110
Usage: required
111111
Definition: See soc/fsl/qman.txt and soc/fsl/bman.txt
112112

113+
- fsl,erratum-a050385
114+
Usage: optional
115+
Value type: boolean
116+
Definition: A boolean property. Indicates the presence of the
117+
erratum A050385 which indicates that DMA transactions that are
118+
split can result in a FMan lock.
119+
113120
=============================================================================
114121
FMan MURAM Node
115122

Documentation/networking/devlink/devlink-region.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ example usage
4040
# Delete a snapshot using:
4141
$ devlink region del pci/0000:00:05.0/cr-space snapshot 1
4242
43-
# Trigger (request) a snapshot be taken:
44-
$ devlink region trigger pci/0000:00:05.0/cr-space
45-
4643
# Dump a snapshot:
4744
$ devlink region dump pci/0000:00:05.0/fw-health snapshot 1
4845
0000000000000000 0014 95dc 0014 9514 0035 1670 0034 db30

Documentation/networking/net_failover.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ Overview
88
========
99

1010
The net_failover driver provides an automated failover mechanism via APIs
11-
to create and destroy a failover master netdev and mananges a primary and
11+
to create and destroy a failover master netdev and manages a primary and
1212
standby slave netdevs that get registered via the generic failover
13-
infrastructrure.
13+
infrastructure.
1414

1515
The failover netdev acts a master device and controls 2 slave devices. The
1616
original paravirtual interface is registered as 'standby' slave netdev and
@@ -29,7 +29,7 @@ virtio-net accelerated datapath: STANDBY mode
2929
=============================================
3030

3131
net_failover enables hypervisor controlled accelerated datapath to virtio-net
32-
enabled VMs in a transparent manner with no/minimal guest userspace chanages.
32+
enabled VMs in a transparent manner with no/minimal guest userspace changes.
3333

3434
To support this, the hypervisor needs to enable VIRTIO_NET_F_STANDBY
3535
feature on the virtio-net interface and assign the same MAC address to both

Documentation/networking/rds.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ Socket Interface
159159
set SO_RDS_TRANSPORT on a socket for which the transport has
160160
been previously attached explicitly (by SO_RDS_TRANSPORT) or
161161
implicitly (via bind(2)) will return an error of EOPNOTSUPP.
162-
An attempt to set SO_RDS_TRANSPPORT to RDS_TRANS_NONE will
162+
An attempt to set SO_RDS_TRANSPORT to RDS_TRANS_NONE will
163163
always return EINVAL.
164164

165165
RDMA for RDS

MAINTAINERS

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4073,7 +4073,6 @@ F: drivers/scsi/snic/
40734073
CISCO VIC ETHERNET NIC DRIVER
40744074
M: Christian Benvenuti <[email protected]>
40754075
M: Govindarajulu Varadarajan <[email protected]>
4076-
M: Parvi Kaustubhi <[email protected]>
40774076
S: Supported
40784077
F: drivers/net/ethernet/cisco/enic/
40794078

@@ -4572,7 +4571,7 @@ F: drivers/infiniband/hw/cxgb4/
45724571
F: include/uapi/rdma/cxgb4-abi.h
45734572

45744573
CXGB4VF ETHERNET DRIVER (CXGB4VF)
4575-
M: Casey Leedom <leedom@chelsio.com>
4574+
M: Vishal Kulkarni <vishal@gmail.com>
45764575
45774576
W: http://www.chelsio.com
45784577
S: Supported
@@ -6198,7 +6197,6 @@ S: Supported
61986197
F: drivers/scsi/be2iscsi/
61996198

62006199
Emulex 10Gbps NIC BE2, BE3-R, Lancer, Skyhawk-R DRIVER (be2net)
6201-
M: Sathya Perla <[email protected]>
62026200
M: Ajit Khaparde <[email protected]>
62036201
M: Sriharsha Basavapatna <[email protected]>
62046202
M: Somnath Kotur <[email protected]>

arch/arm64/boot/dts/freescale/fsl-ls1043-post.dtsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
};
2121

2222
&fman0 {
23+
fsl,erratum-a050385;
24+
2325
/* these aliases provide the FMan ports mapping */
2426
enet0: ethernet@e0000 {
2527
};

drivers/atm/nicstar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
#ifdef GENERAL_DEBUG
9292
#define PRINTK(args...) printk(args)
9393
#else
94-
#define PRINTK(args...)
94+
#define PRINTK(args...) do {} while (0)
9595
#endif /* GENERAL_DEBUG */
9696

9797
#ifdef EXTRA_DEBUG

drivers/net/bonding/bond_alb.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,6 @@ struct arp_pkt {
5050
};
5151
#pragma pack()
5252

53-
static inline struct arp_pkt *arp_pkt(const struct sk_buff *skb)
54-
{
55-
return (struct arp_pkt *)skb_network_header(skb);
56-
}
57-
5853
/* Forward declaration */
5954
static void alb_send_learning_packets(struct slave *slave, u8 mac_addr[],
6055
bool strict_match);
@@ -553,10 +548,11 @@ static void rlb_req_update_subnet_clients(struct bonding *bond, __be32 src_ip)
553548
spin_unlock(&bond->mode_lock);
554549
}
555550

556-
static struct slave *rlb_choose_channel(struct sk_buff *skb, struct bonding *bond)
551+
static struct slave *rlb_choose_channel(struct sk_buff *skb,
552+
struct bonding *bond,
553+
const struct arp_pkt *arp)
557554
{
558555
struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond));
559-
struct arp_pkt *arp = arp_pkt(skb);
560556
struct slave *assigned_slave, *curr_active_slave;
561557
struct rlb_client_info *client_info;
562558
u32 hash_index = 0;
@@ -653,8 +649,12 @@ static struct slave *rlb_choose_channel(struct sk_buff *skb, struct bonding *bon
653649
*/
654650
static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
655651
{
656-
struct arp_pkt *arp = arp_pkt(skb);
657652
struct slave *tx_slave = NULL;
653+
struct arp_pkt *arp;
654+
655+
if (!pskb_network_may_pull(skb, sizeof(*arp)))
656+
return NULL;
657+
arp = (struct arp_pkt *)skb_network_header(skb);
658658

659659
/* Don't modify or load balance ARPs that do not originate locally
660660
* (e.g.,arrive via a bridge).
@@ -664,7 +664,7 @@ static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
664664

665665
if (arp->op_code == htons(ARPOP_REPLY)) {
666666
/* the arp must be sent on the selected rx channel */
667-
tx_slave = rlb_choose_channel(skb, bond);
667+
tx_slave = rlb_choose_channel(skb, bond, arp);
668668
if (tx_slave)
669669
bond_hw_addr_copy(arp->mac_src, tx_slave->dev->dev_addr,
670670
tx_slave->dev->addr_len);
@@ -676,7 +676,7 @@ static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
676676
* When the arp reply is received the entry will be updated
677677
* with the correct unicast address of the client.
678678
*/
679-
tx_slave = rlb_choose_channel(skb, bond);
679+
tx_slave = rlb_choose_channel(skb, bond, arp);
680680

681681
/* The ARP reply packets must be delayed so that
682682
* they can cancel out the influence of the ARP request.

drivers/net/can/dev.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -883,6 +883,7 @@ static const struct nla_policy can_policy[IFLA_CAN_MAX + 1] = {
883883
= { .len = sizeof(struct can_bittiming) },
884884
[IFLA_CAN_DATA_BITTIMING_CONST]
885885
= { .len = sizeof(struct can_bittiming_const) },
886+
[IFLA_CAN_TERMINATION] = { .type = NLA_U16 },
886887
};
887888

888889
static int can_validate(struct nlattr *tb[], struct nlattr *data[],

drivers/net/dsa/mv88e6xxx/chip.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2769,6 +2769,8 @@ static u64 mv88e6xxx_devlink_atu_bin_get(struct mv88e6xxx_chip *chip,
27692769
goto unlock;
27702770
}
27712771

2772+
occupancy &= MV88E6XXX_G2_ATU_STATS_MASK;
2773+
27722774
unlock:
27732775
mv88e6xxx_reg_unlock(chip);
27742776

drivers/net/dsa/mv88e6xxx/global2.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1099,6 +1099,13 @@ int mv88e6xxx_g2_irq_setup(struct mv88e6xxx_chip *chip)
10991099
{
11001100
int err, irq, virq;
11011101

1102+
chip->g2_irq.masked = ~0;
1103+
mv88e6xxx_reg_lock(chip);
1104+
err = mv88e6xxx_g2_int_mask(chip, ~chip->g2_irq.masked);
1105+
mv88e6xxx_reg_unlock(chip);
1106+
if (err)
1107+
return err;
1108+
11021109
chip->g2_irq.domain = irq_domain_add_simple(
11031110
chip->dev->of_node, 16, 0, &mv88e6xxx_g2_irq_domain_ops, chip);
11041111
if (!chip->g2_irq.domain)
@@ -1108,7 +1115,6 @@ int mv88e6xxx_g2_irq_setup(struct mv88e6xxx_chip *chip)
11081115
irq_create_mapping(chip->g2_irq.domain, irq);
11091116

11101117
chip->g2_irq.chip = mv88e6xxx_g2_irq_chip;
1111-
chip->g2_irq.masked = ~0;
11121118

11131119
chip->device_irq = irq_find_mapping(chip->g1_irq.domain,
11141120
MV88E6XXX_G1_STS_IRQ_DEVICE);

drivers/net/dsa/sja1105/sja1105_main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1741,7 +1741,8 @@ static void sja1105_teardown(struct dsa_switch *ds)
17411741
if (!dsa_is_user_port(ds, port))
17421742
continue;
17431743

1744-
kthread_destroy_worker(sp->xmit_worker);
1744+
if (sp->xmit_worker)
1745+
kthread_destroy_worker(sp->xmit_worker);
17451746
}
17461747

17471748
sja1105_tas_teardown(ds);

drivers/net/ethernet/broadcom/bcmsysport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2135,7 +2135,7 @@ static int bcm_sysport_rule_set(struct bcm_sysport_priv *priv,
21352135
return -ENOSPC;
21362136

21372137
index = find_first_zero_bit(priv->filters, RXCHK_BRCM_TAG_MAX);
2138-
if (index > RXCHK_BRCM_TAG_MAX)
2138+
if (index >= RXCHK_BRCM_TAG_MAX)
21392139
return -ENOSPC;
21402140

21412141
/* Location is the classification ID, and index is the position

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10982,13 +10982,13 @@ static int bnxt_change_mtu(struct net_device *dev, int new_mtu)
1098210982
struct bnxt *bp = netdev_priv(dev);
1098310983

1098410984
if (netif_running(dev))
10985-
bnxt_close_nic(bp, false, false);
10985+
bnxt_close_nic(bp, true, false);
1098610986

1098710987
dev->mtu = new_mtu;
1098810988
bnxt_set_ring_params(bp);
1098910989

1099010990
if (netif_running(dev))
10991-
return bnxt_open_nic(bp, false, false);
10991+
return bnxt_open_nic(bp, true, false);
1099210992

1099310993
return 0;
1099410994
}

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

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2007,8 +2007,8 @@ int bnxt_flash_package_from_file(struct net_device *dev, const char *filename,
20072007
struct hwrm_nvm_install_update_output *resp = bp->hwrm_cmd_resp_addr;
20082008
struct hwrm_nvm_install_update_input install = {0};
20092009
const struct firmware *fw;
2010-
int rc, hwrm_err = 0;
20112010
u32 item_len;
2011+
int rc = 0;
20122012
u16 index;
20132013

20142014
bnxt_hwrm_fw_set_time(bp);
@@ -2052,15 +2052,14 @@ int bnxt_flash_package_from_file(struct net_device *dev, const char *filename,
20522052
memcpy(kmem, fw->data, fw->size);
20532053
modify.host_src_addr = cpu_to_le64(dma_handle);
20542054

2055-
hwrm_err = hwrm_send_message(bp, &modify,
2056-
sizeof(modify),
2057-
FLASH_PACKAGE_TIMEOUT);
2055+
rc = hwrm_send_message(bp, &modify, sizeof(modify),
2056+
FLASH_PACKAGE_TIMEOUT);
20582057
dma_free_coherent(&bp->pdev->dev, fw->size, kmem,
20592058
dma_handle);
20602059
}
20612060
}
20622061
release_firmware(fw);
2063-
if (rc || hwrm_err)
2062+
if (rc)
20642063
goto err_exit;
20652064

20662065
if ((install_type & 0xffff) == 0)
@@ -2069,20 +2068,19 @@ int bnxt_flash_package_from_file(struct net_device *dev, const char *filename,
20692068
install.install_type = cpu_to_le32(install_type);
20702069

20712070
mutex_lock(&bp->hwrm_cmd_lock);
2072-
hwrm_err = _hwrm_send_message(bp, &install, sizeof(install),
2073-
INSTALL_PACKAGE_TIMEOUT);
2074-
if (hwrm_err) {
2071+
rc = _hwrm_send_message(bp, &install, sizeof(install),
2072+
INSTALL_PACKAGE_TIMEOUT);
2073+
if (rc) {
20752074
u8 error_code = ((struct hwrm_err_output *)resp)->cmd_err;
20762075

20772076
if (resp->error_code && error_code ==
20782077
NVM_INSTALL_UPDATE_CMD_ERR_CODE_FRAG_ERR) {
20792078
install.flags |= cpu_to_le16(
20802079
NVM_INSTALL_UPDATE_REQ_FLAGS_ALLOWED_TO_DEFRAG);
2081-
hwrm_err = _hwrm_send_message(bp, &install,
2082-
sizeof(install),
2083-
INSTALL_PACKAGE_TIMEOUT);
2080+
rc = _hwrm_send_message(bp, &install, sizeof(install),
2081+
INSTALL_PACKAGE_TIMEOUT);
20842082
}
2085-
if (hwrm_err)
2083+
if (rc)
20862084
goto flash_pkg_exit;
20872085
}
20882086

@@ -2094,7 +2092,7 @@ int bnxt_flash_package_from_file(struct net_device *dev, const char *filename,
20942092
flash_pkg_exit:
20952093
mutex_unlock(&bp->hwrm_cmd_lock);
20962094
err_exit:
2097-
if (hwrm_err == -EACCES)
2095+
if (rc == -EACCES)
20982096
bnxt_print_admin_err(bp);
20992097
return rc;
21002098
}

drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5381,12 +5381,11 @@ static inline bool is_x_10g_port(const struct link_config *lc)
53815381
static int cfg_queues(struct adapter *adap)
53825382
{
53835383
u32 avail_qsets, avail_eth_qsets, avail_uld_qsets;
5384+
u32 i, n10g = 0, qidx = 0, n1g = 0;
5385+
u32 ncpus = num_online_cpus();
53845386
u32 niqflint, neq, num_ulds;
53855387
struct sge *s = &adap->sge;
5386-
u32 i, n10g = 0, qidx = 0;
5387-
#ifndef CONFIG_CHELSIO_T4_DCB
5388-
int q10g = 0;
5389-
#endif
5388+
u32 q10g = 0, q1g;
53905389

53915390
/* Reduce memory usage in kdump environment, disable all offload. */
53925391
if (is_kdump_kernel() || (is_uld(adap) && t4_uld_mem_alloc(adap))) {
@@ -5424,44 +5423,50 @@ static int cfg_queues(struct adapter *adap)
54245423
n10g += is_x_10g_port(&adap2pinfo(adap, i)->link_cfg);
54255424

54265425
avail_eth_qsets = min_t(u32, avail_qsets, MAX_ETH_QSETS);
5426+
5427+
/* We default to 1 queue per non-10G port and up to # of cores queues
5428+
* per 10G port.
5429+
*/
5430+
if (n10g)
5431+
q10g = (avail_eth_qsets - (adap->params.nports - n10g)) / n10g;
5432+
5433+
n1g = adap->params.nports - n10g;
54275434
#ifdef CONFIG_CHELSIO_T4_DCB
54285435
/* For Data Center Bridging support we need to be able to support up
54295436
* to 8 Traffic Priorities; each of which will be assigned to its
54305437
* own TX Queue in order to prevent Head-Of-Line Blocking.
54315438
*/
5439+
q1g = 8;
54325440
if (adap->params.nports * 8 > avail_eth_qsets) {
54335441
dev_err(adap->pdev_dev, "DCB avail_eth_qsets=%d < %d!\n",
54345442
avail_eth_qsets, adap->params.nports * 8);
54355443
return -ENOMEM;
54365444
}
54375445

5438-
for_each_port(adap, i) {
5439-
struct port_info *pi = adap2pinfo(adap, i);
5446+
if (adap->params.nports * ncpus < avail_eth_qsets)
5447+
q10g = max(8U, ncpus);
5448+
else
5449+
q10g = max(8U, q10g);
54405450

5441-
pi->first_qset = qidx;
5442-
pi->nqsets = is_kdump_kernel() ? 1 : 8;
5443-
qidx += pi->nqsets;
5444-
}
5445-
#else /* !CONFIG_CHELSIO_T4_DCB */
5446-
/* We default to 1 queue per non-10G port and up to # of cores queues
5447-
* per 10G port.
5448-
*/
5449-
if (n10g)
5450-
q10g = (avail_eth_qsets - (adap->params.nports - n10g)) / n10g;
5451-
if (q10g > netif_get_num_default_rss_queues())
5452-
q10g = netif_get_num_default_rss_queues();
5451+
while ((q10g * n10g) > (avail_eth_qsets - n1g * q1g))
5452+
q10g--;
54535453

5454-
if (is_kdump_kernel())
5454+
#else /* !CONFIG_CHELSIO_T4_DCB */
5455+
q1g = 1;
5456+
q10g = min(q10g, ncpus);
5457+
#endif /* !CONFIG_CHELSIO_T4_DCB */
5458+
if (is_kdump_kernel()) {
54555459
q10g = 1;
5460+
q1g = 1;
5461+
}
54565462

54575463
for_each_port(adap, i) {
54585464
struct port_info *pi = adap2pinfo(adap, i);
54595465

54605466
pi->first_qset = qidx;
5461-
pi->nqsets = is_x_10g_port(&pi->link_cfg) ? q10g : 1;
5467+
pi->nqsets = is_x_10g_port(&pi->link_cfg) ? q10g : q1g;
54625468
qidx += pi->nqsets;
54635469
}
5464-
#endif /* !CONFIG_CHELSIO_T4_DCB */
54655470

54665471
s->ethqsets = qidx;
54675472
s->max_ethqsets = qidx; /* MSI-X may lower it later */
@@ -5473,7 +5478,7 @@ static int cfg_queues(struct adapter *adap)
54735478
* capped by the number of available cores.
54745479
*/
54755480
num_ulds = adap->num_uld + adap->num_ofld_uld;
5476-
i = min_t(u32, MAX_OFLD_QSETS, num_online_cpus());
5481+
i = min_t(u32, MAX_OFLD_QSETS, ncpus);
54775482
avail_uld_qsets = roundup(i, adap->params.nports);
54785483
if (avail_qsets < num_ulds * adap->params.nports) {
54795484
adap->params.offload = 0;

0 commit comments

Comments
 (0)