projects/linux·commit 1f6a563e

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

1f6a563e · Linus Torvalds <[email protected]> · 2016-08-29 12:29:13 -07:00

Pull networking fixes from David Miller:

 1) Segregate namespaces properly in conntrack dumps, from Liping Zhang.

 2) tcp listener refcount fix in netfilter tproxy, from Eric Dumazet.

 3) Fix timeouts in qed driver due to xmit_more, from Yuval Mintz.

 4) Fix use-after-free in tcp_xmit_retransmit_queue().

 5) Userspace header fixups (use of __u32, missing includes, etc.) from
    Mikko Rapeli.

 6) Further refinements to fragmentation wrt gso and tunnels, from
    Shmulik Ladkani.

 7) Trigger poll correctly for zero length UDP packets, from Eric
    Dumazet.

 8) TCP window scaling fix, also from Eric Dumazet.

 9) SLAB_DESTROY_BY_RCU is not relevant any more for UDP sockets.

10) Module refcount leak in qdisc_create_dflt(), from Eric Dumazet.

11) Fix deadlock in cp_rx_poll() of 8139cp driver, from Gao Feng.

12) Memory leak in rhashtable's alloc_bucket_locks(), from Eric Dumazet.

13) Add new device ID to alx driver, from Owen Lin.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (83 commits)
  Add Killer E2500 device ID in alx driver.
  net: smc91x: fix SMC accesses
  Documentation: networking: dsa: Remove platform device TODO
  net/mlx5: Increase number of ethtool steering priorities
  net/mlx5: Add error prints when validate ETS failed
  net/mlx5e: Fix memory leak if refreshing TIRs fails
  net/mlx5e: Add ethtool counter for TX xmit_more
  net/mlx5e: Fix ethtool -g/G rx ring parameter report with striding RQ
  net/mlx5e: Don't wait for SQ completions on close
  net/mlx5e: Don't post fragmented MPWQE when RQ is disabled
  net/mlx5e: Don't wait for RQ completions on close
  net/mlx5e: Limit UMR length to the device's limitation
  rhashtable: fix a memory leak in alloc_bucket_locks()
  sfc: fix potential stack corruption from running past stat bitmask
  team: loadbalance: push lacpdus to exact delivery
  net: hns: dereference ppe_cb->ppe_common_cb if it is non-null
  8139cp: Fix one possible deadloop in cp_rx_poll
  i40e: Change some init flow for the client
  Revert "phy: IRQ cannot be shared"
  net: dsa: bcm_sf2: Fix race condition while unmasking interrupts
  ...
Commit
1f6a563ee0cd577a9292940eee389482db306765
Parents
cf4d3779 · b99b43bb

Merge commit. Changes below are compared with the first parent: cf4d3779.

Changes

100 files changed · +813 −453

FileStatusAddDelContent
Documentation/networking/dsa/dsa.txtmodified+0−20View file
arch/arm/mach-pxa/idp.cmodified+2−1View file
arch/arm/mach-pxa/xcep.cmodified+2−1View file
arch/arm/mach-realview/core.cmodified+2−1View file
arch/arm/mach-sa1100/pleb.cmodified+1−1View file
arch/blackfin/mach-bf561/boards/cm_bf561.cmodified+2−1View file
arch/blackfin/mach-bf561/boards/ezkit.cmodified+2−1View file
drivers/net/dsa/bcm_sf2.hmodified+1−1View file
drivers/net/dsa/mv88e6xxx/chip.cmodified+6−2View file
drivers/net/ethernet/atheros/alx/main.cmodified+2−0View file
drivers/net/ethernet/atheros/alx/reg.hmodified+1−0View file
drivers/net/ethernet/broadcom/bgmac-bcma.cmodified+1−1View file
drivers/net/ethernet/cavium/thunder/nic_reg.hmodified+0−1View file
drivers/net/ethernet/cavium/thunder/nicvf_ethtool.cmodified+4−1View file
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.cmodified+5−5View file
drivers/net/ethernet/freescale/gianfar.cmodified+14−6View file
drivers/net/ethernet/freescale/gianfar.hmodified+2−1View file
drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.cmodified+2−1View file
drivers/net/ethernet/intel/i40e/i40e_client.cmodified+30−11View file
drivers/net/ethernet/intel/i40e/i40e_main.cmodified+0−1View file
drivers/net/ethernet/intel/ixgbe/ixgbe_common.cmodified+3−1View file
drivers/net/ethernet/mellanox/mlx5/core/cmd.cmodified+54−31View file
drivers/net/ethernet/mellanox/mlx5/core/en.hmodified+9−12View file
drivers/net/ethernet/mellanox/mlx5/core/en_common.cmodified+4−3View file
drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.cmodified+16−5View file
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.cmodified+85−8View file
drivers/net/ethernet/mellanox/mlx5/core/en_main.cmodified+52−60View file
drivers/net/ethernet/mellanox/mlx5/core/en_rep.cmodified+2−3View file
drivers/net/ethernet/mellanox/mlx5/core/en_rx.cmodified+15−26View file
drivers/net/ethernet/mellanox/mlx5/core/en_stats.hmodified+4−0View file
drivers/net/ethernet/mellanox/mlx5/core/en_tc.cmodified+1−1View file
drivers/net/ethernet/mellanox/mlx5/core/en_tx.cmodified+34−34View file
drivers/net/ethernet/mellanox/mlx5/core/en_txrx.cmodified+4−2View file
drivers/net/ethernet/mellanox/mlx5/core/eswitch.cmodified+9−7View file
drivers/net/ethernet/mellanox/mlx5/core/eswitch.hmodified+1−0View file
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.cmodified+20−6View file
drivers/net/ethernet/mellanox/mlx5/core/fs_core.cmodified+1−1View file
drivers/net/ethernet/mellanox/mlx5/core/fs_counters.cmodified+10−1View file
drivers/net/ethernet/mellanox/mlx5/core/main.cmodified+29−30View file
drivers/net/ethernet/mellanox/mlxsw/port.hmodified+1−0View file
drivers/net/ethernet/mellanox/mlxsw/spectrum.cmodified+42−1View file
drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.cmodified+4−8View file
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.cmodified+1−1View file
drivers/net/ethernet/nxp/lpc_eth.cmodified+9−11View file
drivers/net/ethernet/qlogic/qed/qed.hmodified+10−1View file
drivers/net/ethernet/qlogic/qede/qede_main.cmodified+4−1View file
drivers/net/ethernet/realtek/8139cp.cmodified+1−1View file
drivers/net/ethernet/sfc/ef10.cmodified+2−1View file
drivers/net/ethernet/smsc/smc91x.cmodified+7−0View file
drivers/net/ethernet/smsc/smc91x.hmodified+45−20View file
drivers/net/ethernet/synopsys/dwc_eth_qos.cmodified+10−7View file
drivers/net/ethernet/tehuti/tehuti.cmodified+1−1View file
drivers/net/ethernet/xilinx/xilinx_emaclite.cmodified+5−3View file
drivers/net/phy/micrel.cmodified+1−1View file
drivers/net/phy/phy.cmodified+4−2View file
drivers/net/team/team_mode_loadbalance.cmodified+15−0View file
drivers/net/tun.cmodified+1−5View file
drivers/net/usb/kaweth.cmodified+7−3View file
drivers/net/vmxnet3/vmxnet3_drv.cmodified+3−1View file
drivers/net/vmxnet3/vmxnet3_int.hmodified+2−2View file
include/linux/netfilter/nfnetlink_acct.hmodified+2−2View file
include/linux/smc91x.hmodified+10−0View file
include/net/tcp.hmodified+2−0View file
include/uapi/linux/atm_zatm.hmodified+1−0View file
include/uapi/linux/if_pppol2tp.hmodified+2−1View file
include/uapi/linux/if_pppox.hmodified+3−0View file
include/uapi/linux/if_tunnel.hmodified+3−0View file
include/uapi/linux/ipx.hmodified+12−1View file
include/uapi/linux/libc-compat.hmodified+26−0View file
include/uapi/linux/openvswitch.hmodified+3−3View file
lib/rhashtable.cmodified+4−3View file
net/bluetooth/af_bluetooth.cmodified+1−1View file
net/bluetooth/hci_request.cmodified+2−0View file
net/bluetooth/hci_sock.cmodified+1−1View file
net/bluetooth/l2cap_core.cmodified+8−0View file
net/bluetooth/l2cap_sock.cmodified+12−2View file
net/ipv4/fib_trie.cmodified+2−2View file
net/ipv4/ip_tunnel_core.cmodified+5−3View file
net/ipv4/tcp.cmodified+0−2View file
net/ipv4/tcp_diag.cmodified+6−1View file
net/ipv4/tcp_ipv4.cmodified+7−1View file
net/ipv4/udp.cmodified+6−7View file
net/ipv4/udplite.cmodified+0−1View file
net/ipv6/addrconf.cmodified+21−13View file
net/ipv6/tcp_ipv6.cmodified+7−1View file
net/ipv6/udp.cmodified+0−1View file
net/ipv6/udplite.cmodified+0−1View file
net/l2tp/l2tp_ppp.cmodified+1−1View file
net/netfilter/nf_conntrack_standalone.cmodified+4−0View file
net/netfilter/nfnetlink_acct.cmodified+9−8View file
net/netfilter/nfnetlink_cttimeout.cmodified+10−6View file
net/netfilter/nfnetlink_log.cmodified+1−0View file
net/netfilter/xt_TPROXY.cmodified+4−0View file
net/netfilter/xt_nfacct.cmodified+1−1View file
net/sched/act_ife.cmodified+10−8View file
net/sched/sch_generic.cmodified+5−4View file
net/sctp/input.cmodified+7−4View file
net/sctp/inqueue.cmodified+0−13View file
net/sctp/sctp_diag.cmodified+4−2View file
net/tipc/udp_media.cmodified+4−1View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/networking/dsa/dsa.txt

View file
diff --git a/Documentation/networking/dsa/dsa.txt b/Documentation/networking/dsa/dsa.txt
index 9d05ed7..f20c884 100644
--- a/Documentation/networking/dsa/dsa.txt
+++ b/Documentation/networking/dsa/dsa.txt
@@ -587,26 +587,6 @@ of DSA, would be the its port-based VLAN, used by the associated bridge device.
TODO
====
-The platform device problem
----------------------------
-DSA is currently implemented as a platform device driver which is far from ideal
-as was discussed in this thread:
-
-http://permalink.gmane.org/gmane.linux.network/329848
-
-This basically prevents the device driver model to be properly used and applied,
-and support non-MDIO, non-MMIO Ethernet connected switches.
-
-Another problem with the platform device driver approach is that it prevents the
-use of a modular switch drivers build due to a circular dependency, illustrated
-here:
-
-http://comments.gmane.org/gmane.linux.network/345803
-
-Attempts of reworking this has been done here:
-
-https://lwn.net/Articles/643149/
-
Making SWITCHDEV and DSA converge towards an unified codebase
-------------------------------------------------------------

arch/arm/mach-pxa/idp.c

View file
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c
index c410d84..66070ac 100644
--- a/arch/arm/mach-pxa/idp.c
+++ b/arch/arm/mach-pxa/idp.c
@@ -83,7 +83,8 @@ static struct resource smc91x_resources[] = {
};
static struct smc91x_platdata smc91x_platdata = {
- .flags = SMC91X_USE_32BIT | SMC91X_USE_DMA | SMC91X_NOWAIT,
+ .flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT | SMC91X_USE_32BIT |
+ SMC91X_USE_DMA | SMC91X_NOWAIT,
};
static struct platform_device smc91x_device = {

arch/arm/mach-pxa/xcep.c

View file
diff --git a/arch/arm/mach-pxa/xcep.c b/arch/arm/mach-pxa/xcep.c
index 3f06cd9..056369e 100644
--- a/arch/arm/mach-pxa/xcep.c
+++ b/arch/arm/mach-pxa/xcep.c
@@ -120,7 +120,8 @@ static struct resource smc91x_resources[] = {
};
static struct smc91x_platdata xcep_smc91x_info = {
- .flags = SMC91X_USE_32BIT | SMC91X_NOWAIT | SMC91X_USE_DMA,
+ .flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT | SMC91X_USE_32BIT |
+ SMC91X_NOWAIT | SMC91X_USE_DMA,
};
static struct platform_device smc91x_device = {

arch/arm/mach-realview/core.c

View file
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
index baf1745..a0ead0a 100644
--- a/arch/arm/mach-realview/core.c
+++ b/arch/arm/mach-realview/core.c
@@ -93,7 +93,8 @@ static struct smsc911x_platform_config smsc911x_config = {
};
static struct smc91x_platdata smc91x_platdata = {
- .flags = SMC91X_USE_32BIT | SMC91X_NOWAIT,
+ .flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT | SMC91X_USE_32BIT |
+ SMC91X_NOWAIT,
};
static struct platform_device realview_eth_device = {

arch/arm/mach-sa1100/pleb.c

View file
diff --git a/arch/arm/mach-sa1100/pleb.c b/arch/arm/mach-sa1100/pleb.c
index 1525d7b..88149f8 100644
--- a/arch/arm/mach-sa1100/pleb.c
+++ b/arch/arm/mach-sa1100/pleb.c
@@ -45,7 +45,7 @@ static struct resource smc91x_resources[] = {
};
static struct smc91x_platdata smc91x_platdata = {
- .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
+ .flags = SMC91X_USE_16BIT | SMC91X_USE_8BIT | SMC91X_NOWAIT,
};
static struct platform_device smc91x_device = {

arch/blackfin/mach-bf561/boards/cm_bf561.c

View file
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c
index c6db52b..10c5777 100644
--- a/arch/blackfin/mach-bf561/boards/cm_bf561.c
+++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c
@@ -146,7 +146,8 @@ static struct platform_device hitachi_fb_device = {
#include <linux/smc91x.h>
static struct smc91x_platdata smc91x_info = {
- .flags = SMC91X_USE_32BIT | SMC91X_NOWAIT,
+ .flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT | SMC91X_USE_32BIT |
+ SMC91X_NOWAIT,
.leda = RPC_LED_100_10,
.ledb = RPC_LED_TX_RX,
};

arch/blackfin/mach-bf561/boards/ezkit.c

View file
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c
index f35525b..57d1c43 100644
--- a/arch/blackfin/mach-bf561/boards/ezkit.c
+++ b/arch/blackfin/mach-bf561/boards/ezkit.c
@@ -134,7 +134,8 @@ static struct platform_device net2272_bfin_device = {
#include <linux/smc91x.h>
static struct smc91x_platdata smc91x_info = {
- .flags = SMC91X_USE_32BIT | SMC91X_NOWAIT,
+ .flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT | SMC91X_USE_32BIT |
+ SMC91X_NOWAIT,
.leda = RPC_LED_100_10,
.ledb = RPC_LED_TX_RX,
};

drivers/net/dsa/bcm_sf2.h

View file
diff --git a/drivers/net/dsa/bcm_sf2.h b/drivers/net/dsa/bcm_sf2.h
index 463bed8..dd446e4 100644
--- a/drivers/net/dsa/bcm_sf2.h
+++ b/drivers/net/dsa/bcm_sf2.h
@@ -205,8 +205,8 @@ static inline void name##_writeq(struct bcm_sf2_priv *priv, u64 val, \
static inline void intrl2_##which##_mask_clear(struct bcm_sf2_priv *priv, \
u32 mask) \
{ \
- intrl2_##which##_writel(priv, mask, INTRL2_CPU_MASK_CLEAR); \
priv->irq##which##_mask &= ~(mask); \
+ intrl2_##which##_writel(priv, mask, INTRL2_CPU_MASK_CLEAR); \
} \
static inline void intrl2_##which##_mask_set(struct bcm_sf2_priv *priv, \
u32 mask) \

drivers/net/dsa/mv88e6xxx/chip.c

View file
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index d1d9d3c..7106790 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -2656,15 +2656,19 @@ static int mv88e6xxx_setup_port(struct mv88e6xxx_chip *chip, int port)
return ret;
}
+ /* Rate Control: disable ingress rate limiting. */
if (mv88e6xxx_6352_family(chip) || mv88e6xxx_6351_family(chip) ||
mv88e6xxx_6165_family(chip) || mv88e6xxx_6097_family(chip) ||
- mv88e6xxx_6185_family(chip) || mv88e6xxx_6095_family(chip) ||
mv88e6xxx_6320_family(chip)) {
- /* Rate Control: disable ingress rate limiting. */
ret = _mv88e6xxx_reg_write(chip, REG_PORT(port),
PORT_RATE_CONTROL, 0x0001);
if (ret)
return ret;
+ } else if (mv88e6xxx_6185_family(chip) || mv88e6xxx_6095_family(chip)) {
+ ret = _mv88e6xxx_reg_write(chip, REG_PORT(port),
+ PORT_RATE_CONTROL, 0x0000);
+ if (ret)
+ return ret;
}
/* Port Control 1: disable trunking, disable sending

drivers/net/ethernet/atheros/alx/main.c

View file
diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c
index 6453148..4eb17da 100644
--- a/drivers/net/ethernet/atheros/alx/main.c
+++ b/drivers/net/ethernet/atheros/alx/main.c
@@ -1545,6 +1545,8 @@ static const struct pci_device_id alx_pci_tbl[] = {
.driver_data = ALX_DEV_QUIRK_MSI_INTX_DISABLE_BUG },
{ PCI_VDEVICE(ATTANSIC, ALX_DEV_ID_E2400),
.driver_data = ALX_DEV_QUIRK_MSI_INTX_DISABLE_BUG },
+ { PCI_VDEVICE(ATTANSIC, ALX_DEV_ID_E2500),
+ .driver_data = ALX_DEV_QUIRK_MSI_INTX_DISABLE_BUG },
{ PCI_VDEVICE(ATTANSIC, ALX_DEV_ID_AR8162),
.driver_data = ALX_DEV_QUIRK_MSI_INTX_DISABLE_BUG },
{ PCI_VDEVICE(ATTANSIC, ALX_DEV_ID_AR8171) },

drivers/net/ethernet/atheros/alx/reg.h

View file
diff --git a/drivers/net/ethernet/atheros/alx/reg.h b/drivers/net/ethernet/atheros/alx/reg.h
index 0959e68..1fc2d85 100644
--- a/drivers/net/ethernet/atheros/alx/reg.h
+++ b/drivers/net/ethernet/atheros/alx/reg.h
@@ -38,6 +38,7 @@
#define ALX_DEV_ID_AR8161 0x1091
#define ALX_DEV_ID_E2200 0xe091
#define ALX_DEV_ID_E2400 0xe0a1
+#define ALX_DEV_ID_E2500 0xe0b1
#define ALX_DEV_ID_AR8162 0x1090
#define ALX_DEV_ID_AR8171 0x10A1
#define ALX_DEV_ID_AR8172 0x10A0

drivers/net/ethernet/broadcom/bgmac-bcma.c

View file
diff --git a/drivers/net/ethernet/broadcom/bgmac-bcma.c b/drivers/net/ethernet/broadcom/bgmac-bcma.c
index 9a9745c..625235d 100644
--- a/drivers/net/ethernet/broadcom/bgmac-bcma.c
+++ b/drivers/net/ethernet/broadcom/bgmac-bcma.c
@@ -159,7 +159,7 @@ static int bgmac_probe(struct bcma_device *core)
if (!bgmac_is_bcm4707_family(core)) {
mii_bus = bcma_mdio_mii_register(core, bgmac->phyaddr);
- if (!IS_ERR(mii_bus)) {
+ if (IS_ERR(mii_bus)) {
err = PTR_ERR(mii_bus);
goto err;
}

drivers/net/ethernet/cavium/thunder/nic_reg.h

View file
diff --git a/drivers/net/ethernet/cavium/thunder/nic_reg.h b/drivers/net/ethernet/cavium/thunder/nic_reg.h
index afb10e3..fab35a5 100644
--- a/drivers/net/ethernet/cavium/thunder/nic_reg.h
+++ b/drivers/net/ethernet/cavium/thunder/nic_reg.h
@@ -170,7 +170,6 @@
#define NIC_QSET_SQ_0_7_DOOR (0x010838)
#define NIC_QSET_SQ_0_7_STATUS (0x010840)
#define NIC_QSET_SQ_0_7_DEBUG (0x010848)
-#define NIC_QSET_SQ_0_7_CNM_CHG (0x010860)
#define NIC_QSET_SQ_0_7_STAT_0_1 (0x010900)
#define NIC_QSET_RBDR_0_1_CFG (0x010C00)

drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c

View file
diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c b/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
index d2d8ef2..ad4fddb 100644
--- a/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
@@ -382,7 +382,10 @@ static void nicvf_get_regs(struct net_device *dev,
p[i++] = nicvf_queue_reg_read(nic, NIC_QSET_SQ_0_7_DOOR, q);
p[i++] = nicvf_queue_reg_read(nic, NIC_QSET_SQ_0_7_STATUS, q);
p[i++] = nicvf_queue_reg_read(nic, NIC_QSET_SQ_0_7_DEBUG, q);
- p[i++] = nicvf_queue_reg_read(nic, NIC_QSET_SQ_0_7_CNM_CHG, q);
+ /* Padding, was NIC_QSET_SQ_0_7_CNM_CHG, which
+ * produces bus errors when read
+ */
+ p[i++] = 0;
p[i++] = nicvf_queue_reg_read(nic, NIC_QSET_SQ_0_7_STAT_0_1, q);
reg_offset = NIC_QSET_SQ_0_7_STAT_0_1 | (1 << 3);
p[i++] = nicvf_queue_reg_read(nic, reg_offset, q);

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

View file
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index c45de49..c762a8c 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -4335,6 +4335,11 @@ static void cfg_queues(struct adapter *adap)
#endif
int ciq_size;
+ /* Reduce memory usage in kdump environment, disable all offload.
+ */
+ if (is_kdump_kernel())
+ adap->params.offload = 0;
+
for_each_port(adap, i)
n10g += is_x_10g_port(&adap2pinfo(adap, i)->link_cfg);
#ifdef CONFIG_CHELSIO_T4_DCB
@@ -4365,11 +4370,6 @@ static void cfg_queues(struct adapter *adap)
if (q10g > netif_get_num_default_rss_queues())
q10g = netif_get_num_default_rss_queues();
- /* Reduce memory usage in kdump environment, disable all offload.
- */
- if (is_kdump_kernel())
- adap->params.offload = 0;
-
for_each_port(adap, i) {
struct port_info *pi = adap2pinfo(adap, i);

drivers/net/ethernet/freescale/gianfar.c

View file
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index d20935d..4b4f5bc 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -2922,17 +2922,25 @@ static bool gfar_add_rx_frag(struct gfar_rx_buff *rxb, u32 lstatus,
{
unsigned int size = lstatus & BD_LENGTH_MASK;
struct page *page = rxb->page;
+ bool last = !!(lstatus & BD_LFLAG(RXBD_LAST));
/* Remove the FCS from the packet length */
- if (likely(lstatus & BD_LFLAG(RXBD_LAST)))
+ if (last)
size -= ETH_FCS_LEN;
- if (likely(first))
+ if (likely(first)) {
skb_put(skb, size);
- else
- skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, page,
- rxb->page_offset + RXBUF_ALIGNMENT,
- size, GFAR_RXB_TRUESIZE);
+ } else {
+ /* the last fragments' length contains the full frame length */
+ if (last)
+ size -= skb->len;
+
+ /* in case the last fragment consisted only of the FCS */
+ if (size > 0)
+ skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, page,
+ rxb->page_offset + RXBUF_ALIGNMENT,
+ size, GFAR_RXB_TRUESIZE);
+ }
/* try reuse page */
if (unlikely(page_count(page) != 1))

drivers/net/ethernet/freescale/gianfar.h

View file
diff --git a/drivers/net/ethernet/freescale/gianfar.h b/drivers/net/ethernet/freescale/gianfar.h
index 373fd09..6e8a9c8 100644
--- a/drivers/net/ethernet/freescale/gianfar.h
+++ b/drivers/net/ethernet/freescale/gianfar.h
@@ -100,7 +100,8 @@ extern const char gfar_driver_version[];
#define DEFAULT_RX_LFC_THR 16
#define DEFAULT_LFC_PTVVAL 4
-#define GFAR_RXB_SIZE 1536
+/* prevent fragmenation by HW in DSA environments */
+#define GFAR_RXB_SIZE roundup(1536 + 8, 64)
#define GFAR_SKBFRAG_SIZE (RXBUF_ALIGNMENT + GFAR_RXB_SIZE \
+ SKB_DATA_ALIGN(sizeof(struct skb_shared_info)))
#define GFAR_RXB_TRUESIZE 2048

drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c

View file
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c
index ff8b6a4..6ea8722 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c
@@ -328,9 +328,10 @@ static void hns_ppe_init_hw(struct hns_ppe_cb *ppe_cb)
static void hns_ppe_uninit_hw(struct hns_ppe_cb *ppe_cb)
{
u32 port;
- struct dsaf_device *dsaf_dev = ppe_cb->ppe_common_cb->dsaf_dev;
if (ppe_cb->ppe_common_cb) {
+ struct dsaf_device *dsaf_dev = ppe_cb->ppe_common_cb->dsaf_dev;
+
port = ppe_cb->index;
dsaf_dev->misc_op->ppe_srst(dsaf_dev, port, 0);
}

drivers/net/ethernet/intel/i40e/i40e_client.c

View file
diff --git a/drivers/net/ethernet/intel/i40e/i40e_client.c b/drivers/net/ethernet/intel/i40e/i40e_client.c
index e1370c5..618f184 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_client.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_client.c
@@ -199,6 +199,7 @@ void i40e_notify_client_of_l2_param_changes(struct i40e_vsi *vsi)
void i40e_notify_client_of_netdev_open(struct i40e_vsi *vsi)
{
struct i40e_client_instance *cdev;
+ int ret = 0;
if (!vsi)
return;
@@ -211,7 +212,14 @@ void i40e_notify_client_of_netdev_open(struct i40e_vsi *vsi)
"Cannot locate client instance open routine\n");
continue;
}
- cdev->client->ops->open(&cdev->lan_info, cdev->client);
+ if (!(test_bit(__I40E_CLIENT_INSTANCE_OPENED,
+ &cdev->state))) {
+ ret = cdev->client->ops->open(&cdev->lan_info,
+ cdev->client);
+ if (!ret)
+ set_bit(__I40E_CLIENT_INSTANCE_OPENED,
+ &cdev->state);
+ }
}
}
mutex_unlock(&i40e_client_instance_mutex);
@@ -407,12 +415,14 @@ struct i40e_vsi *i40e_vsi_lookup(struct i40e_pf *pf,
* i40e_client_add_instance - add a client instance struct to the instance list
* @pf: pointer to the board struct
* @client: pointer to a client struct in the client list.
+ * @existing: if there was already an existing instance
*
- * Returns cdev ptr on success, NULL on failure
+ * Returns cdev ptr on success or if already exists, NULL on failure
**/
static
struct i40e_client_instance *i40e_client_add_instance(struct i40e_pf *pf,
- struct i40e_client *client)
+ struct i40e_client *client,
+ bool *existing)
{
struct i40e_client_instance *cdev;
struct netdev_hw_addr *mac = NULL;
@@ -421,7 +431,7 @@ struct i40e_client_instance *i40e_client_add_instance(struct i40e_pf *pf,
mutex_lock(&i40e_client_instance_mutex);
list_for_each_entry(cdev, &i40e_client_instances, list) {
if ((cdev->lan_info.pf == pf) && (cdev->client == client)) {
- cdev = NULL;
+ *existing = true;
goto out;
}
}
@@ -505,6 +515,7 @@ void i40e_client_subtask(struct i40e_pf *pf)
{
struct i40e_client_instance *cdev;
struct i40e_client *client;
+ bool existing = false;
int ret = 0;
if (!(pf->flags & I40E_FLAG_SERVICE_CLIENT_REQUESTED))
@@ -528,18 +539,25 @@ void i40e_client_subtask(struct i40e_pf *pf)
/* check if L2 VSI is up, if not we are not ready */
if (test_bit(__I40E_DOWN, &pf->vsi[pf->lan_vsi]->state))
continue;
+ } else {
+ dev_warn(&pf->pdev->dev, "This client %s is being instanciated at probe\n",
+ client->name);
}
/* Add the client instance to the instance list */
- cdev = i40e_client_add_instance(pf, client);
+ cdev = i40e_client_add_instance(pf, client, &existing);
if (!cdev)
continue;
- /* Also up the ref_cnt of no. of instances of this client */
- atomic_inc(&client->ref_cnt);
- dev_info(&pf->pdev->dev, "Added instance of Client %s to PF%d bus=0x%02x func=0x%02x\n",
- client->name, pf->hw.pf_id,
- pf->hw.bus.device, pf->hw.bus.func);
+ if (!existing) {
+ /* Also up the ref_cnt for no. of instances of this
+ * client.
+ */
+ atomic_inc(&client->ref_cnt);
+ dev_info(&pf->pdev->dev, "Added instance of Client %s to PF%d bus=0x%02x func=0x%02x\n",
+ client->name, pf->hw.pf_id,
+ pf->hw.bus.device, pf->hw.bus.func);
+ }
/* Send an Open request to the client */
atomic_inc(&cdev->ref_cnt);
@@ -588,7 +606,8 @@ int i40e_lan_add_device(struct i40e_pf *pf)
pf->hw.pf_id, pf->hw.bus.device, pf->hw.bus.func);
/* Since in some cases register may have happened before a device gets
- * added, we can schedule a subtask to go initiate the clients.
+ * added, we can schedule a subtask to go initiate the clients if
+ * they can be launched at probe time.
*/
pf->flags |= I40E_FLAG_SERVICE_CLIENT_REQUESTED;
i40e_service_event_schedule(pf);

drivers/net/ethernet/intel/i40e/i40e_main.c

View file
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index c6ac7a6..828ed28 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -5431,7 +5431,6 @@ int i40e_open(struct net_device *netdev)
wr32(&pf->hw, I40E_GLLAN_TSOMSK_L, be32_to_cpu(TCP_FLAG_CWR) >> 16);
udp_tunnel_get_rx_info(netdev);
- i40e_notify_client_of_netdev_open(vsi);
return 0;
}

drivers/net/ethernet/intel/ixgbe/ixgbe_common.c

View file
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
index b4217f3..c47b605 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
@@ -2958,8 +2958,10 @@ s32 ixgbe_clear_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq)
}
/* was that the last pool using this rar? */
- if (mpsar_lo == 0 && mpsar_hi == 0 && rar != 0)
+ if (mpsar_lo == 0 && mpsar_hi == 0 &&
+ rar != 0 && rar != hw->mac.san_mac_rar_index)
hw->mac.ops.clear_rar(hw, rar);
+
return 0;
}

drivers/net/ethernet/mellanox/mlx5/core/cmd.c

View file
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
index d6e2a1c..c2ec01a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
@@ -143,13 +143,14 @@ static struct mlx5_cmd_layout *get_inst(struct mlx5_cmd *cmd, int idx)
return cmd->cmd_buf + (idx << cmd->log_stride);
}
-static u8 xor8_buf(void *buf, int len)
+static u8 xor8_buf(void *buf, size_t offset, int len)
{
u8 *ptr = buf;
u8 sum = 0;
int i;
+ int end = len + offset;
- for (i = 0; i < len; i++)
+ for (i = offset; i < end; i++)
sum ^= ptr[i];
return sum;
@@ -157,41 +158,49 @@ static u8 xor8_buf(void *buf, int len)
static int verify_block_sig(struct mlx5_cmd_prot_block *block)
{
- if (xor8_buf(block->rsvd0, sizeof(*block) - sizeof(block->data) - 1) != 0xff)
+ size_t rsvd0_off = offsetof(struct mlx5_cmd_prot_block, rsvd0);
+ int xor_len = sizeof(*block) - sizeof(block->data) - 1;
+
+ if (xor8_buf(block, rsvd0_off, xor_len) != 0xff)
return -EINVAL;
- if (xor8_buf(block, sizeof(*block)) != 0xff)
+ if (xor8_buf(block, 0, sizeof(*block)) != 0xff)
return -EINVAL;
return 0;
}
-static void calc_block_sig(struct mlx5_cmd_prot_block *block, u8 token,
- int csum)
+static void calc_block_sig(struct mlx5_cmd_prot_block *block)
{
- block->token = token;
- if (csum) {
- block->ctrl_sig = ~xor8_buf(block->rsvd0, sizeof(*block) -
- sizeof(block->data) - 2);
- block->sig = ~xor8_buf(block, sizeof(*block) - 1);
- }
+ int ctrl_xor_len = sizeof(*block) - sizeof(block->data) - 2;
+ size_t rsvd0_off = offsetof(struct mlx5_cmd_prot_block, rsvd0);
+
+ block->ctrl_sig = ~xor8_buf(block, rsvd0_off, ctrl_xor_len);
+ block->sig = ~xor8_buf(block, 0, sizeof(*block) - 1);
}
-static void calc_chain_sig(struct mlx5_cmd_msg *msg, u8 token, int csum)
+static void calc_chain_sig(struct mlx5_cmd_msg *msg)
{
struct mlx5_cmd_mailbox *next = msg->next;
-
- while (next) {
- calc_block_sig(next->buf, token, csum);
+ int size = msg->len;
+ int blen = size - min_t(int, sizeof(msg->first.data), size);
+ int n = (blen + MLX5_CMD_DATA_BLOCK_SIZE - 1)
+ / MLX5_CMD_DATA_BLOCK_SIZE;
+ int i = 0;
+
+ for (i = 0; i < n && next; i++) {
+ calc_block_sig(next->buf);
next = next->next;
}
}
static void set_signature(struct mlx5_cmd_work_ent *ent, int csum)
{
- ent->lay->sig = ~xor8_buf(ent->lay, sizeof(*ent->lay));
- calc_chain_sig(ent->in, ent->token, csum);
- calc_chain_sig(ent->out, ent->token, csum);
+ ent->lay->sig = ~xor8_buf(ent->lay, 0, sizeof(*ent->lay));
+ if (csum) {
+ calc_chain_sig(ent->in);
+ calc_chain_sig(ent->out);
+ }
}
static void poll_timeout(struct mlx5_cmd_work_ent *ent)
@@ -222,12 +231,17 @@ static int verify_signature(struct mlx5_cmd_work_ent *ent)
struct mlx5_cmd_mailbox *next = ent->out->next;
int err;
u8 sig;
+ int size = ent->out->len;
+ int blen = size - min_t(int, sizeof(ent->out->first.data), size);
+ int n = (blen + MLX5_CMD_DATA_BLOCK_SIZE - 1)
+ / MLX5_CMD_DATA_BLOCK_SIZE;
+ int i = 0;
- sig = xor8_buf(ent->lay, sizeof(*ent->lay));
+ sig = xor8_buf(ent->lay, 0, sizeof(*ent->lay));
if (sig != 0xff)
return -EINVAL;
- while (next) {
+ for (i = 0; i < n && next; i++) {
err = verify_block_sig(next->buf);
if (err)
return err;
@@ -656,7 +670,6 @@ static void cmd_work_handler(struct work_struct *work)
spin_unlock_irqrestore(&cmd->alloc_lock, flags);
}
- ent->token = alloc_token(cmd);
cmd->ent_arr[ent->idx] = ent;
lay = get_inst(cmd, ent->idx);
ent->lay = lay;
@@ -766,7 +779,8 @@ static u8 *get_status_ptr(struct mlx5_outbox_hdr *out)
static int mlx5_cmd_invoke(struct mlx5_core_dev *dev, struct mlx5_cmd_msg *in,
struct mlx5_cmd_msg *out, void *uout, int uout_size,
mlx5_cmd_cbk_t callback,
- void *context, int page_queue, u8 *status)
+ void *context, int page_queue, u8 *status,
+ u8 token)
{
struct mlx5_cmd *cmd = &dev->cmd;
struct mlx5_cmd_work_ent *ent;
@@ -783,6 +797,8 @@ static int mlx5_cmd_invoke(struct mlx5_core_dev *dev, struct mlx5_cmd_msg *in,
if (IS_ERR(ent))
return PTR_ERR(ent);
+ ent->token = token;
+
if (!callback)
init_completion(&ent->done);
@@ -854,7 +870,8 @@ static const struct file_operations fops = {
.write = dbg_write,
};
-static int mlx5_copy_to_msg(struct mlx5_cmd_msg *to, void *from, int size)
+static int mlx5_copy_to_msg(struct mlx5_cmd_msg *to, void *from, int size,
+ u8 token)
{
struct mlx5_cmd_prot_block *block;
struct mlx5_cmd_mailbox *next;
@@ -880,6 +897,7 @@ static int mlx5_copy_to_msg(struct mlx5_cmd_msg *to, void *from, int size)
memcpy(block->data, from, copy);
from += copy;
size -= copy;
+ block->token = token;
next = next->next;
}
@@ -949,7 +967,8 @@ static void free_cmd_box(struct mlx5_core_dev *dev,

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/en.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/en_common.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/en_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/en_rep.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/en_rx.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/en_stats.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/en_tx.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/eswitch.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/eswitch.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/fs_core.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/main.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlxsw/port.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlxsw/spectrum.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/nxp/lpc_eth.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/qlogic/qed/qed.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/qlogic/qede/qede_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/realtek/8139cp.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/sfc/ef10.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/smsc/smc91x.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/smsc/smc91x.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/synopsys/dwc_eth_qos.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/tehuti/tehuti.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/xilinx/xilinx_emaclite.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/phy/micrel.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/phy/phy.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/team/team_mode_loadbalance.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/tun.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/usb/kaweth.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/vmxnet3/vmxnet3_drv.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/vmxnet3/vmxnet3_int.h

View file

This diff is incomplete. Download the complete patch.

include/linux/netfilter/nfnetlink_acct.h

View file

This diff is incomplete. Download the complete patch.

include/linux/smc91x.h

View file

This diff is incomplete. Download the complete patch.

include/net/tcp.h

View file

This diff is incomplete. Download the complete patch.

include/uapi/linux/atm_zatm.h

View file

This diff is incomplete. Download the complete patch.

include/uapi/linux/if_pppol2tp.h

View file

This diff is incomplete. Download the complete patch.

include/uapi/linux/if_pppox.h

View file

This diff is incomplete. Download the complete patch.

include/uapi/linux/if_tunnel.h

View file

This diff is incomplete. Download the complete patch.

include/uapi/linux/ipx.h

View file

This diff is incomplete. Download the complete patch.

include/uapi/linux/libc-compat.h

View file

This diff is incomplete. Download the complete patch.

include/uapi/linux/openvswitch.h

View file

This diff is incomplete. Download the complete patch.

lib/rhashtable.c

View file

This diff is incomplete. Download the complete patch.

net/bluetooth/af_bluetooth.c

View file

This diff is incomplete. Download the complete patch.

net/bluetooth/hci_request.c

View file

This diff is incomplete. Download the complete patch.

net/bluetooth/hci_sock.c

View file

This diff is incomplete. Download the complete patch.

net/bluetooth/l2cap_core.c

View file

This diff is incomplete. Download the complete patch.

net/bluetooth/l2cap_sock.c

View file

This diff is incomplete. Download the complete patch.

net/ipv4/fib_trie.c

View file

This diff is incomplete. Download the complete patch.

net/ipv4/ip_tunnel_core.c

View file

This diff is incomplete. Download the complete patch.

net/ipv4/tcp.c

View file

This diff is incomplete. Download the complete patch.

net/ipv4/tcp_diag.c

View file

This diff is incomplete. Download the complete patch.

net/ipv4/tcp_ipv4.c

View file

This diff is incomplete. Download the complete patch.

net/ipv4/udp.c

View file

This diff is incomplete. Download the complete patch.

net/ipv4/udplite.c

View file

This diff is incomplete. Download the complete patch.

net/ipv6/addrconf.c

View file

This diff is incomplete. Download the complete patch.

net/ipv6/tcp_ipv6.c

View file

This diff is incomplete. Download the complete patch.

net/ipv6/udp.c

View file

This diff is incomplete. Download the complete patch.

net/ipv6/udplite.c

View file

This diff is incomplete. Download the complete patch.

net/l2tp/l2tp_ppp.c

View file

This diff is incomplete. Download the complete patch.

net/netfilter/nf_conntrack_standalone.c

View file

This diff is incomplete. Download the complete patch.

net/netfilter/nfnetlink_acct.c

View file

This diff is incomplete. Download the complete patch.

net/netfilter/nfnetlink_cttimeout.c

View file

This diff is incomplete. Download the complete patch.

net/netfilter/nfnetlink_log.c

View file

This diff is incomplete. Download the complete patch.

net/netfilter/xt_TPROXY.c

View file

This diff is incomplete. Download the complete patch.

net/netfilter/xt_nfacct.c

View file

This diff is incomplete. Download the complete patch.

net/sched/act_ife.c

View file

This diff is incomplete. Download the complete patch.

net/sched/sch_generic.c

View file

This diff is incomplete. Download the complete patch.

net/sctp/input.c

View file

This diff is incomplete. Download the complete patch.

net/sctp/inqueue.c

View file

This diff is incomplete. Download the complete patch.

net/sctp/sctp_diag.c

View file

This diff is incomplete. Download the complete patch.

net/tipc/udp_media.c

View file

This diff is incomplete. Download the complete patch.