projects/linux·commit 050cdc6c

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

050cdc6c · Linus Torvalds <[email protected]> · 2018-08-27 11:59:39 -07:00

Pull networking fixes from David Miller:

 1) ICE, E1000, IGB, IXGBE, and I40E bug fixes from the Intel folks.

 2) Better fix for AB-BA deadlock in packet scheduler code, from Cong
    Wang.

 3) bpf sockmap fixes (zero sized key handling, etc.) from Daniel
    Borkmann.

 4) Send zero IPID in TCP resets and SYN-RECV state ACKs, to prevent
    attackers using it as a side-channel. From Eric Dumazet.

 5) Memory leak in mediatek bluetooth driver, from Gustavo A. R. Silva.

 6) Hook up rt->dst.input of ipv6 anycast routes properly, from Hangbin
    Liu.

 7) hns and hns3 bug fixes from Huazhong Tan.

 8) Fix RIF leak in mlxsw driver, from Ido Schimmel.

 9) iova range check fix in vhost, from Jason Wang.

10) Fix hang in do_tcp_sendpages() with tls, from John Fastabend.

11) More r8152 chips need to disable RX aggregation, from Kai-Heng Feng.

12) Memory exposure in TCA_U32_SEL handling, from Kees Cook.

13) TCP BBR congestion control fixes from Kevin Yang.

14) hv_netvsc, ignore non-PCI devices, from Stephen Hemminger.

15) qed driver fixes from Tomer Tayar.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (77 commits)
  net: sched: Fix memory exposure from short TCA_U32_SEL
  qed: fix spelling mistake "comparsion" -> "comparison"
  vhost: correctly check the iova range when waking virtqueue
  qlge: Fix netdev features configuration.
  net: macb: do not disable MDIO bus at open/close time
  Revert "net: stmmac: fix build failure due to missing COMMON_CLK dependency"
  net: macb: Fix regression breaking non-MDIO fixed-link PHYs
  mlxsw: spectrum_switchdev: Do not leak RIFs when removing bridge
  i40e: fix condition of WARN_ONCE for stat strings
  i40e: Fix for Tx timeouts when interface is brought up if DCB is enabled
  ixgbe: fix driver behaviour after issuing VFLR
  ixgbe: Prevent unsupported configurations with XDP
  ixgbe: Replace GFP_ATOMIC with GFP_KERNEL
  igb: Replace mdelay() with msleep() in igb_integrated_phy_loopback()
  igb: Replace GFP_ATOMIC with GFP_KERNEL in igb_sw_init()
  igb: Use an advanced ctx descriptor for launchtime
  e1000: ensure to free old tx/rx rings in set_ringparam()
  e1000: check on netif_running() before calling e1000_up()
  ixgb: use dma_zalloc_coherent instead of allocator/memset
  ice: Trivial formatting fixes
  ...
Commit
050cdc6c9501abcd64720b8cc3e7941efee9547d
Parents
908946c4 · 98c8f125

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

Changes

92 files changed · +754 −711

FileStatusAddDelContent
drivers/bluetooth/Kconfigmodified+1−0View file
drivers/bluetooth/btmtkuart.cmodified+5−3View file
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.cmodified+2−4View file
drivers/net/ethernet/cadence/macb_main.cmodified+23−13View file
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.cmodified+4−6View file
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.cmodified+2−3View file
drivers/net/ethernet/hisilicon/hns/hnae.hmodified+3−3View file
drivers/net/ethernet/hisilicon/hns/hns_enet.cmodified+4−104View file
drivers/net/ethernet/hisilicon/hns3/hns3_enet.cmodified+2−1View file
drivers/net/ethernet/hisilicon/hns3/hns3_enet.hmodified+3−3View file
drivers/net/ethernet/intel/e1000/e1000_ethtool.cmodified+4−3View file
drivers/net/ethernet/intel/i40e/i40e_ethtool.cmodified+1−1View file
drivers/net/ethernet/intel/i40e/i40e_main.cmodified+8−7View file
drivers/net/ethernet/intel/ice/ice.hmodified+11−4View file
drivers/net/ethernet/intel/ice/ice_adminq_cmd.hmodified+13−12View file
drivers/net/ethernet/intel/ice/ice_common.cmodified+18−12View file
drivers/net/ethernet/intel/ice/ice_controlq.cmodified+20−9View file
drivers/net/ethernet/intel/ice/ice_ethtool.cmodified+39−13View file
drivers/net/ethernet/intel/ice/ice_hw_autogen.hmodified+0−8View file
drivers/net/ethernet/intel/ice/ice_lan_tx_rx.hmodified+1−0View file
drivers/net/ethernet/intel/ice/ice_main.cmodified+66−49View file
drivers/net/ethernet/intel/ice/ice_nvm.cmodified+2−3View file
drivers/net/ethernet/intel/ice/ice_sched.cmodified+1−2View file
drivers/net/ethernet/intel/ice/ice_switch.cmodified+2−2View file
drivers/net/ethernet/intel/ice/ice_switch.hmodified+3−3View file
drivers/net/ethernet/intel/ice/ice_txrx.hmodified+1−1View file
drivers/net/ethernet/intel/ice/ice_type.hmodified+8−8View file
drivers/net/ethernet/intel/igb/igb_ethtool.cmodified+1−1View file
drivers/net/ethernet/intel/igb/igb_main.cmodified+4−3View file
drivers/net/ethernet/intel/ixgb/ixgb_main.cmodified+2−3View file
drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.cmodified+2−2View file
drivers/net/ethernet/intel/ixgbe/ixgbe_main.cmodified+29−7View file
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.cmodified+31−0View file
drivers/net/ethernet/intel/ixgbe/ixgbe_type.hmodified+1−0View file
drivers/net/ethernet/mellanox/mlx5/core/en_tc.cmodified+9−10View file
drivers/net/ethernet/mellanox/mlxsw/spectrum.cmodified+1−2View file
drivers/net/ethernet/mellanox/mlxsw/spectrum.hmodified+2−0View file
drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.cmodified+2−4View file
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.cmodified+11−0View file
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.cmodified+20−0View file
drivers/net/ethernet/netronome/nfp/flower/action.cmodified+2−4View file
drivers/net/ethernet/qlogic/qed/qed_init_ops.cmodified+1−1View file
drivers/net/ethernet/qlogic/qed/qed_mcp.cmodified+158−29View file
drivers/net/ethernet/qlogic/qed/qed_mcp.hmodified+18−9View file
drivers/net/ethernet/qlogic/qed/qed_reg_addr.hmodified+2−0View file
drivers/net/ethernet/qlogic/qede/qede_filter.cmodified+2−4View file
drivers/net/ethernet/qlogic/qlge/qlge_main.cmodified+8−15View file
drivers/net/ethernet/renesas/ravb.hmodified+1−4View file
drivers/net/ethernet/renesas/ravb_main.cmodified+1−4View file
drivers/net/ethernet/renesas/sh_eth.cmodified+1−12View file
drivers/net/ethernet/renesas/sh_eth.hmodified+1−12View file
drivers/net/ethernet/stmicro/stmmac/Kconfigmodified+5−5View file
drivers/net/ethernet/stmicro/stmmac/stmmac_tc.cmodified+2−3View file
drivers/net/hyperv/netvsc_drv.cmodified+5−0View file
drivers/net/usb/r8152.cmodified+2−2View file
drivers/vhost/vhost.cmodified+1−1View file
include/net/act_api.hmodified+0−7View file
include/net/pkt_cls.hmodified+14−11View file
kernel/bpf/hashtab.cmodified+13−10View file
kernel/bpf/sockmap.cmodified+9−2View file
lib/rhashtable.cmodified+0−1View file
net/dsa/slave.cmodified+1−3View file
net/ipv4/tcp_bbr.cmodified+24−18View file
net/ipv4/tcp_ipv4.cmodified+6−0View file
net/ipv6/addrconf.cmodified+3−3View file
net/ipv6/ip6_fib.cmodified+2−0View file
net/ipv6/ip6_vti.cmodified+2−1View file
net/ipv6/route.cmodified+1−1View file
net/ncsi/ncsi-netlink.cmodified+2−2View file
net/rds/tcp.cmodified+0−1View file
net/sched/act_api.cmodified+25−45View file
net/sched/act_bpf.cmodified+0−8View file
net/sched/act_connmark.cmodified+0−8View file
net/sched/act_csum.cmodified+0−8View file
net/sched/act_gact.cmodified+0−8View file
net/sched/act_ife.cmodified+40−52View file
net/sched/act_ipt.cmodified+0−16View file
net/sched/act_mirred.cmodified+0−8View file
net/sched/act_nat.cmodified+0−8View file
net/sched/act_pedit.cmodified+0−8View file
net/sched/act_police.cmodified+0−8View file
net/sched/act_sample.cmodified+0−8View file
net/sched/act_simple.cmodified+0−8View file
net/sched/act_skbedit.cmodified+0−8View file
net/sched/act_skbmod.cmodified+0−8View file
net/sched/act_tunnel_key.cmodified+0−8View file
net/sched/act_vlan.cmodified+0−8View file
net/sched/cls_u32.cmodified+8−2View file
net/sched/sch_cake.cmodified+19−5View file
net/tls/tls_main.cmodified+7−2View file
net/xdp/xdp_umem.cmodified+2−2View file
tools/bpf/bpftool/map_perf_ring.cmodified+4−1View file

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

drivers/bluetooth/Kconfig

View file
diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig
index 2df11cc..845b031 100644
--- a/drivers/bluetooth/Kconfig
+++ b/drivers/bluetooth/Kconfig
@@ -200,6 +200,7 @@ config BT_HCIUART_RTL
depends on BT_HCIUART
depends on BT_HCIUART_SERDEV
depends on GPIOLIB
+ depends on ACPI
select BT_HCIUART_3WIRE
select BT_RTL
help

drivers/bluetooth/btmtkuart.c

View file
diff --git a/drivers/bluetooth/btmtkuart.c b/drivers/bluetooth/btmtkuart.c
index ed2a5c7..4593baf 100644
--- a/drivers/bluetooth/btmtkuart.c
+++ b/drivers/bluetooth/btmtkuart.c
@@ -144,8 +144,10 @@ static int mtk_setup_fw(struct hci_dev *hdev)
fw_size = fw->size;
/* The size of patch header is 30 bytes, should be skip */
- if (fw_size < 30)
- return -EINVAL;
+ if (fw_size < 30) {
+ err = -EINVAL;
+ goto free_fw;
+ }
fw_size -= 30;
fw_ptr += 30;
@@ -172,8 +174,8 @@ static int mtk_setup_fw(struct hci_dev *hdev)
fw_ptr += dlen;
}
+free_fw:
release_firmware(fw);
-
return err;
}

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

View file
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
index 139d96c..092c817 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
@@ -110,16 +110,14 @@ static int bnxt_tc_parse_actions(struct bnxt *bp,
struct tcf_exts *tc_exts)
{
const struct tc_action *tc_act;
- LIST_HEAD(tc_actions);
- int rc;
+ int i, rc;
if (!tcf_exts_has_actions(tc_exts)) {
netdev_info(bp->dev, "no actions");
return -EINVAL;
}
- tcf_exts_to_list(tc_exts, &tc_actions);
- list_for_each_entry(tc_act, &tc_actions, list) {
+ tcf_exts_for_each_action(i, tc_act, tc_exts) {
/* Drop action */
if (is_tcf_gact_shot(tc_act)) {
actions->flags |= BNXT_TC_ACTION_FLAG_DROP;

drivers/net/ethernet/cadence/macb_main.c

View file
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index dc09f9a..c6707ea 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -482,11 +482,6 @@ static int macb_mii_probe(struct net_device *dev)
if (np) {
if (of_phy_is_fixed_link(np)) {
- if (of_phy_register_fixed_link(np) < 0) {
- dev_err(&bp->pdev->dev,
- "broken fixed-link specification\n");
- return -ENODEV;
- }
bp->phy_node = of_node_get(np);
} else {
bp->phy_node = of_parse_phandle(np, "phy-handle", 0);
@@ -569,7 +564,7 @@ static int macb_mii_init(struct macb *bp)
{
struct macb_platform_data *pdata;
struct device_node *np;
- int err;
+ int err = -ENXIO;
/* Enable management port */
macb_writel(bp, NCR, MACB_BIT(MPE));
@@ -592,12 +587,23 @@ static int macb_mii_init(struct macb *bp)
dev_set_drvdata(&bp->dev->dev, bp->mii_bus);
np = bp->pdev->dev.of_node;
- if (pdata)
- bp->mii_bus->phy_mask = pdata->phy_mask;
+ if (np && of_phy_is_fixed_link(np)) {
+ if (of_phy_register_fixed_link(np) < 0) {
+ dev_err(&bp->pdev->dev,
+ "broken fixed-link specification %pOF\n", np);
+ goto err_out_free_mdiobus;
+ }
+
+ err = mdiobus_register(bp->mii_bus);
+ } else {
+ if (pdata)
+ bp->mii_bus->phy_mask = pdata->phy_mask;
+
+ err = of_mdiobus_register(bp->mii_bus, np);
+ }
- err = of_mdiobus_register(bp->mii_bus, np);
if (err)
- goto err_out_free_mdiobus;
+ goto err_out_free_fixed_link;
err = macb_mii_probe(bp->dev);
if (err)
@@ -607,6 +613,7 @@ static int macb_mii_init(struct macb *bp)
err_out_unregister_bus:
mdiobus_unregister(bp->mii_bus);
+err_out_free_fixed_link:
if (np && of_phy_is_fixed_link(np))
of_phy_deregister_fixed_link(np);
err_out_free_mdiobus:
@@ -2028,14 +2035,17 @@ static void macb_reset_hw(struct macb *bp)
{
struct macb_queue *queue;
unsigned int q;
+ u32 ctrl = macb_readl(bp, NCR);
/* Disable RX and TX (XXX: Should we halt the transmission
* more gracefully?)
*/
- macb_writel(bp, NCR, 0);
+ ctrl &= ~(MACB_BIT(RE) | MACB_BIT(TE));
/* Clear the stats registers (XXX: Update stats first?) */
- macb_writel(bp, NCR, MACB_BIT(CLRSTAT));
+ ctrl |= MACB_BIT(CLRSTAT);
+
+ macb_writel(bp, NCR, ctrl);
/* Clear all status flags */
macb_writel(bp, TSR, -1);
@@ -2223,7 +2233,7 @@ static void macb_init_hw(struct macb *bp)
}
/* Enable TX and RX */
- macb_writel(bp, NCR, MACB_BIT(RE) | MACB_BIT(TE) | MACB_BIT(MPE));
+ macb_writel(bp, NCR, macb_readl(bp, NCR) | MACB_BIT(RE) | MACB_BIT(TE));
}
/* The hash address register is 64 bits long and takes up two

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

View file
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c
index 623f73d..c116f96 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c
@@ -417,10 +417,9 @@ static void cxgb4_process_flow_actions(struct net_device *in,
struct ch_filter_specification *fs)
{
const struct tc_action *a;
- LIST_HEAD(actions);
+ int i;
- tcf_exts_to_list(cls->exts, &actions);
- list_for_each_entry(a, &actions, list) {
+ tcf_exts_for_each_action(i, a, cls->exts) {
if (is_tcf_gact_ok(a)) {
fs->action = FILTER_PASS;
} else if (is_tcf_gact_shot(a)) {
@@ -591,10 +590,9 @@ static int cxgb4_validate_flow_actions(struct net_device *dev,
bool act_redir = false;
bool act_pedit = false;
bool act_vlan = false;
- LIST_HEAD(actions);
+ int i;
- tcf_exts_to_list(cls->exts, &actions);
- list_for_each_entry(a, &actions, list) {
+ tcf_exts_for_each_action(i, a, cls->exts) {
if (is_tcf_gact_ok(a)) {
/* Do nothing */
} else if (is_tcf_gact_shot(a)) {

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

View file
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c
index 18eb2ae..c7d2b4d 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c
@@ -93,14 +93,13 @@ static int fill_action_fields(struct adapter *adap,
unsigned int num_actions = 0;
const struct tc_action *a;
struct tcf_exts *exts;
- LIST_HEAD(actions);
+ int i;
exts = cls->knode.exts;
if (!tcf_exts_has_actions(exts))
return -EINVAL;
- tcf_exts_to_list(exts, &actions);
- list_for_each_entry(a, &actions, list) {
+ tcf_exts_for_each_action(i, a, exts) {
/* Don't allow more than one action per rule. */
if (num_actions)
return -EINVAL;

drivers/net/ethernet/hisilicon/hns/hnae.h

View file
diff --git a/drivers/net/ethernet/hisilicon/hns/hnae.h b/drivers/net/ethernet/hisilicon/hns/hnae.h
index fa5b30f..cad52bd 100644
--- a/drivers/net/ethernet/hisilicon/hns/hnae.h
+++ b/drivers/net/ethernet/hisilicon/hns/hnae.h
@@ -220,10 +220,10 @@ struct hnae_desc_cb {
/* priv data for the desc, e.g. skb when use with ip stack*/
void *priv;
- u16 page_offset;
- u16 reuse_flag;
+ u32 page_offset;
+ u32 length; /* length of the buffer */
- u16 length; /* length of the buffer */
+ u16 reuse_flag;
/* desc type, used by the ring user to mark the type of the priv data */
u16 type;

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

View file
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
index 9f2b552..02a0ba2 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
@@ -406,113 +406,13 @@ out_net_tx_busy:
return NETDEV_TX_BUSY;
}
-/**
- * hns_nic_get_headlen - determine size of header for RSC/LRO/GRO/FCOE
- * @data: pointer to the start of the headers
- * @max: total length of section to find headers in
- *
- * This function is meant to determine the length of headers that will
- * be recognized by hardware for LRO, GRO, and RSC offloads. The main
- * motivation of doing this is to only perform one pull for IPv4 TCP
- * packets so that we can do basic things like calculating the gso_size
- * based on the average data per packet.
- **/
-static unsigned int hns_nic_get_headlen(unsigned char *data, u32 flag,
- unsigned int max_size)
-{
- unsigned char *network;
- u8 hlen;
-
- /* this should never happen, but better safe than sorry */
- if (max_size < ETH_HLEN)
- return max_size;
-
- /* initialize network frame pointer */
- network = data;
-
- /* set first protocol and move network header forward */
- network += ETH_HLEN;
-
- /* handle any vlan tag if present */
- if (hnae_get_field(flag, HNS_RXD_VLAN_M, HNS_RXD_VLAN_S)
- == HNS_RX_FLAG_VLAN_PRESENT) {
- if ((typeof(max_size))(network - data) > (max_size - VLAN_HLEN))
- return max_size;
-
- network += VLAN_HLEN;
- }
-
- /* handle L3 protocols */
- if (hnae_get_field(flag, HNS_RXD_L3ID_M, HNS_RXD_L3ID_S)
- == HNS_RX_FLAG_L3ID_IPV4) {
- if ((typeof(max_size))(network - data) >
- (max_size - sizeof(struct iphdr)))
- return max_size;
-
- /* access ihl as a u8 to avoid unaligned access on ia64 */
- hlen = (network[0] & 0x0F) << 2;
-
- /* verify hlen meets minimum size requirements */
- if (hlen < sizeof(struct iphdr))
- return network - data;
-
- /* record next protocol if header is present */
- } else if (hnae_get_field(flag, HNS_RXD_L3ID_M, HNS_RXD_L3ID_S)
- == HNS_RX_FLAG_L3ID_IPV6) {
- if ((typeof(max_size))(network - data) >
- (max_size - sizeof(struct ipv6hdr)))
- return max_size;
-
- /* record next protocol */
- hlen = sizeof(struct ipv6hdr);
- } else {
- return network - data;
- }
-
- /* relocate pointer to start of L4 header */
- network += hlen;
-
- /* finally sort out TCP/UDP */
- if (hnae_get_field(flag, HNS_RXD_L4ID_M, HNS_RXD_L4ID_S)
- == HNS_RX_FLAG_L4ID_TCP) {
- if ((typeof(max_size))(network - data) >
- (max_size - sizeof(struct tcphdr)))
- return max_size;
-
- /* access doff as a u8 to avoid unaligned access on ia64 */
- hlen = (network[12] & 0xF0) >> 2;
-
- /* verify hlen meets minimum size requirements */
- if (hlen < sizeof(struct tcphdr))
- return network - data;
-
- network += hlen;
- } else if (hnae_get_field(flag, HNS_RXD_L4ID_M, HNS_RXD_L4ID_S)
- == HNS_RX_FLAG_L4ID_UDP) {
- if ((typeof(max_size))(network - data) >
- (max_size - sizeof(struct udphdr)))
- return max_size;
-
- network += sizeof(struct udphdr);
- }
-
- /* If everything has gone correctly network should be the
- * data section of the packet and will be the end of the header.
- * If not then it probably represents the end of the last recognized
- * header.
- */
- if ((typeof(max_size))(network - data) < max_size)
- return network - data;
- else
- return max_size;
-}
-
static void hns_nic_reuse_page(struct sk_buff *skb, int i,
struct hnae_ring *ring, int pull_len,
struct hnae_desc_cb *desc_cb)
{
struct hnae_desc *desc;
- int truesize, size;
+ u32 truesize;
+ int size;
int last_offset;
bool twobufs;
@@ -530,7 +430,7 @@ static void hns_nic_reuse_page(struct sk_buff *skb, int i,
}
skb_add_rx_frag(skb, i, desc_cb->priv, desc_cb->page_offset + pull_len,
- size - pull_len, truesize - pull_len);
+ size - pull_len, truesize);
/* avoid re-using remote pages,flag default unreuse */
if (unlikely(page_to_nid(desc_cb->priv) != numa_node_id()))
@@ -695,7 +595,7 @@ static int hns_nic_poll_rx_skb(struct hns_nic_ring_data *ring_data,
} else {
ring->stats.seg_pkt_cnt++;
- pull_len = hns_nic_get_headlen(va, bnum_flag, HNS_RX_HEAD_SIZE);
+ pull_len = eth_get_headlen(va, HNS_RX_HEAD_SIZE);
memcpy(__skb_put(skb, pull_len), va,
ALIGN(pull_len, sizeof(long)));

drivers/net/ethernet/hisilicon/hns3/hns3_enet.c

View file
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
index 3554dca..955c4ab 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
@@ -2019,7 +2019,8 @@ static void hns3_nic_reuse_page(struct sk_buff *skb, int i,
struct hns3_desc_cb *desc_cb)
{
struct hns3_desc *desc;
- int truesize, size;
+ u32 truesize;
+ int size;
int last_offset;
bool twobufs;

drivers/net/ethernet/hisilicon/hns3/hns3_enet.h

View file
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
index a02a96a..cb450d7 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
@@ -284,11 +284,11 @@ struct hns3_desc_cb {
/* priv data for the desc, e.g. skb when use with ip stack*/
void *priv;
- u16 page_offset;
- u16 reuse_flag;
-
+ u32 page_offset;
u32 length; /* length of the buffer */
+ u16 reuse_flag;
+
/* desc type, used by the ring user to mark the type of the priv data */
u16 type;
};

drivers/net/ethernet/intel/e1000/e1000_ethtool.c

View file
diff --git a/drivers/net/ethernet/intel/e1000/e1000_ethtool.c b/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
index bdb3f8e..2569a16 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
@@ -624,14 +624,14 @@ static int e1000_set_ringparam(struct net_device *netdev,
adapter->tx_ring = tx_old;
e1000_free_all_rx_resources(adapter);
e1000_free_all_tx_resources(adapter);
- kfree(tx_old);
- kfree(rx_old);
adapter->rx_ring = rxdr;
adapter->tx_ring = txdr;
err = e1000_up(adapter);
if (err)
goto err_setup;
}
+ kfree(tx_old);
+ kfree(rx_old);
clear_bit(__E1000_RESETTING, &adapter->flags);
return 0;
@@ -644,7 +644,8 @@ err_setup_rx:
err_alloc_rx:
kfree(txdr);
err_alloc_tx:
- e1000_up(adapter);
+ if (netif_running(adapter->netdev))
+ e1000_up(adapter);
err_setup:
clear_bit(__E1000_RESETTING, &adapter->flags);
return err;

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

View file
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index abcd096..5ff6caa 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -2013,7 +2013,7 @@ static void i40e_get_stat_strings(struct net_device *netdev, u8 *data)
for (i = 0; i < I40E_MAX_USER_PRIORITY; i++)
i40e_add_stat_strings(&data, i40e_gstrings_pfc_stats, i);
- WARN_ONCE(p - data != i40e_get_stats_count(netdev) * ETH_GSTRING_LEN,
+ WARN_ONCE(data - p != i40e_get_stats_count(netdev) * ETH_GSTRING_LEN,
"stat strings count mismatch!");
}

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 f2c622e..ac685ad 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -5122,15 +5122,17 @@ static int i40e_vsi_configure_bw_alloc(struct i40e_vsi *vsi, u8 enabled_tc,
u8 *bw_share)
{
struct i40e_aqc_configure_vsi_tc_bw_data bw_data;
+ struct i40e_pf *pf = vsi->back;
i40e_status ret;
int i;
- if (vsi->back->flags & I40E_FLAG_TC_MQPRIO)
+ /* There is no need to reset BW when mqprio mode is on. */
+ if (pf->flags & I40E_FLAG_TC_MQPRIO)
return 0;
- if (!vsi->mqprio_qopt.qopt.hw) {
+ if (!vsi->mqprio_qopt.qopt.hw && !(pf->flags & I40E_FLAG_DCB_ENABLED)) {
ret = i40e_set_bw_limit(vsi, vsi->seid, 0);
if (ret)
- dev_info(&vsi->back->pdev->dev,
+ dev_info(&pf->pdev->dev,
"Failed to reset tx rate for vsi->seid %u\n",
vsi->seid);
return ret;
@@ -5139,12 +5141,11 @@ static int i40e_vsi_configure_bw_alloc(struct i40e_vsi *vsi, u8 enabled_tc,
for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++)
bw_data.tc_bw_credits[i] = bw_share[i];
- ret = i40e_aq_config_vsi_tc_bw(&vsi->back->hw, vsi->seid, &bw_data,
- NULL);
+ ret = i40e_aq_config_vsi_tc_bw(&pf->hw, vsi->seid, &bw_data, NULL);
if (ret) {
- dev_info(&vsi->back->pdev->dev,
+ dev_info(&pf->pdev->dev,
"AQ command Config VSI BW allocation per TC failed = %d\n",
- vsi->back->hw.aq.asq_last_status);
+ pf->hw.aq.asq_last_status);
return -EINVAL;
}

drivers/net/ethernet/intel/ice/ice.h

View file
diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h
index d8b5fff..868f4a1 100644
--- a/drivers/net/ethernet/intel/ice/ice.h
+++ b/drivers/net/ethernet/intel/ice/ice.h
@@ -89,6 +89,13 @@ extern const char ice_drv_ver[];
#define ice_for_each_rxq(vsi, i) \
for ((i) = 0; (i) < (vsi)->num_rxq; (i)++)
+/* Macros for each allocated tx/rx ring whether used or not in a VSI */
+#define ice_for_each_alloc_txq(vsi, i) \
+ for ((i) = 0; (i) < (vsi)->alloc_txq; (i)++)
+
+#define ice_for_each_alloc_rxq(vsi, i) \
+ for ((i) = 0; (i) < (vsi)->alloc_rxq; (i)++)
+
struct ice_tc_info {
u16 qoffset;
u16 qcount;
@@ -189,9 +196,9 @@ struct ice_vsi {
struct list_head tmp_sync_list; /* MAC filters to be synced */
struct list_head tmp_unsync_list; /* MAC filters to be unsynced */
- bool irqs_ready;
- bool current_isup; /* Sync 'link up' logging */
- bool stat_offsets_loaded;
+ u8 irqs_ready;
+ u8 current_isup; /* Sync 'link up' logging */
+ u8 stat_offsets_loaded;
/* queue information */
u8 tx_mapping_mode; /* ICE_MAP_MODE_[CONTIG|SCATTER] */
@@ -262,7 +269,7 @@ struct ice_pf {
struct ice_hw_port_stats stats;
struct ice_hw_port_stats stats_prev;
struct ice_hw hw;
- bool stat_prev_loaded; /* has previous stats been loaded */
+ u8 stat_prev_loaded; /* has previous stats been loaded */
char int_name[ICE_INT_NAME_STR_LEN];
};

drivers/net/ethernet/intel/ice/ice_adminq_cmd.h

View file
diff --git a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
index 7541ec2..a0614f4 100644
--- a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
@@ -329,19 +329,19 @@ struct ice_aqc_vsi_props {
/* VLAN section */
__le16 pvid; /* VLANS include priority bits */
u8 pvlan_reserved[2];
- u8 port_vlan_flags;
-#define ICE_AQ_VSI_PVLAN_MODE_S 0
-#define ICE_AQ_VSI_PVLAN_MODE_M (0x3 << ICE_AQ_VSI_PVLAN_MODE_S)
-#define ICE_AQ_VSI_PVLAN_MODE_UNTAGGED 0x1
-#define ICE_AQ_VSI_PVLAN_MODE_TAGGED 0x2
-#define ICE_AQ_VSI_PVLAN_MODE_ALL 0x3
+ u8 vlan_flags;
+#define ICE_AQ_VSI_VLAN_MODE_S 0
+#define ICE_AQ_VSI_VLAN_MODE_M (0x3 << ICE_AQ_VSI_VLAN_MODE_S)
+#define ICE_AQ_VSI_VLAN_MODE_UNTAGGED 0x1
+#define ICE_AQ_VSI_VLAN_MODE_TAGGED 0x2
+#define ICE_AQ_VSI_VLAN_MODE_ALL 0x3
#define ICE_AQ_VSI_PVLAN_INSERT_PVID BIT(2)
-#define ICE_AQ_VSI_PVLAN_EMOD_S 3
-#define ICE_AQ_VSI_PVLAN_EMOD_M (0x3 << ICE_AQ_VSI_PVLAN_EMOD_S)
-#define ICE_AQ_VSI_PVLAN_EMOD_STR_BOTH (0x0 << ICE_AQ_VSI_PVLAN_EMOD_S)
-#define ICE_AQ_VSI_PVLAN_EMOD_STR_UP (0x1 << ICE_AQ_VSI_PVLAN_EMOD_S)
-#define ICE_AQ_VSI_PVLAN_EMOD_STR (0x2 << ICE_AQ_VSI_PVLAN_EMOD_S)
-#define ICE_AQ_VSI_PVLAN_EMOD_NOTHING (0x3 << ICE_AQ_VSI_PVLAN_EMOD_S)
+#define ICE_AQ_VSI_VLAN_EMOD_S 3
+#define ICE_AQ_VSI_VLAN_EMOD_M (0x3 << ICE_AQ_VSI_VLAN_EMOD_S)
+#define ICE_AQ_VSI_VLAN_EMOD_STR_BOTH (0x0 << ICE_AQ_VSI_VLAN_EMOD_S)
+#define ICE_AQ_VSI_VLAN_EMOD_STR_UP (0x1 << ICE_AQ_VSI_VLAN_EMOD_S)
+#define ICE_AQ_VSI_VLAN_EMOD_STR (0x2 << ICE_AQ_VSI_VLAN_EMOD_S)
+#define ICE_AQ_VSI_VLAN_EMOD_NOTHING (0x3 << ICE_AQ_VSI_VLAN_EMOD_S)
u8 pvlan_reserved2[3];
/* ingress egress up sections */
__le32 ingress_table; /* bitmap, 3 bits per up */
@@ -594,6 +594,7 @@ struct ice_sw_rule_lg_act {
#define ICE_LG_ACT_GENERIC_OFFSET_M (0x7 << ICE_LG_ACT_GENERIC_OFFSET_S)
#define ICE_LG_ACT_GENERIC_PRIORITY_S 22
#define ICE_LG_ACT_GENERIC_PRIORITY_M (0x7 << ICE_LG_ACT_GENERIC_PRIORITY_S)
+#define ICE_LG_ACT_GENERIC_OFF_RX_DESC_PROF_IDX 7
/* Action = 7 - Set Stat count */
#define ICE_LG_ACT_STAT_COUNT 0x7

drivers/net/ethernet/intel/ice/ice_common.c

View file
diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c
index 71d032c..661beea 100644
--- a/drivers/net/ethernet/intel/ice/ice_common.c
+++ b/drivers/net/ethernet/intel/ice/ice_common.c
@@ -45,6 +45,9 @@ static enum ice_status ice_set_mac_type(struct ice_hw *hw)
/**
* ice_clear_pf_cfg - Clear PF configuration
* @hw: pointer to the hardware structure
+ *
+ * Clears any existing PF configuration (VSIs, VSI lists, switch rules, port
+ * configuration, flow director filters, etc.).
*/
enum ice_status ice_clear_pf_cfg(struct ice_hw *hw)
{
@@ -1483,7 +1486,7 @@ enum ice_status ice_get_link_status(struct ice_port_info *pi, bool *link_up)
struct ice_phy_info *phy_info;
enum ice_status status = 0;
- if (!pi)
+ if (!pi || !link_up)
return ICE_ERR_PARAM;
phy_info = &pi->phy;
@@ -1619,20 +1622,23 @@ __ice_aq_get_set_rss_lut(struct ice_hw *hw, u16 vsi_id, u8 lut_type, u8 *lut,
}
/* LUT size is only valid for Global and PF table types */
- if (lut_size == ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_128) {
- flags |= (ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_128_FLAG <<
- ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) &
- ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M;
- } else if (lut_size == ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512) {
+ switch (lut_size) {
+ case ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_128:
+ break;
+ case ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512:
flags |= (ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512_FLAG <<
ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) &
ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M;

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/intel/ice/ice_controlq.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/intel/ice/ice_ethtool.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/intel/ice/ice_hw_autogen.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/intel/ice/ice_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/intel/ice/ice_nvm.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/intel/ice/ice_sched.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/intel/ice/ice_switch.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/intel/ice/ice_switch.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/intel/ice/ice_txrx.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/intel/ice/ice_type.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/intel/igb/igb_ethtool.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/intel/igb/igb_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/intel/ixgb/ixgb_main.c

View file

This diff is incomplete. Download the complete patch.

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

View file

This diff is incomplete. Download the complete patch.

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

View file

This diff is incomplete. Download the complete patch.

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

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/intel/ixgbe/ixgbe_type.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/mlxsw/spectrum.c

View file

This diff is incomplete. Download the complete patch.

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

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.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/mellanox/mlxsw/spectrum_switchdev.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/netronome/nfp/flower/action.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/qlogic/qed/qed_init_ops.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/qlogic/qed/qed_mcp.c

View file

This diff is incomplete. Download the complete patch.

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

View file

This diff is incomplete. Download the complete patch.

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

View file

This diff is incomplete. Download the complete patch.

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

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/qlogic/qlge/qlge_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/renesas/ravb.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/renesas/ravb_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/renesas/sh_eth.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/renesas/sh_eth.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/stmicro/stmmac/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/hyperv/netvsc_drv.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/usb/r8152.c

View file

This diff is incomplete. Download the complete patch.

drivers/vhost/vhost.c

View file

This diff is incomplete. Download the complete patch.

include/net/act_api.h

View file

This diff is incomplete. Download the complete patch.

include/net/pkt_cls.h

View file

This diff is incomplete. Download the complete patch.

kernel/bpf/hashtab.c

View file

This diff is incomplete. Download the complete patch.

kernel/bpf/sockmap.c

View file

This diff is incomplete. Download the complete patch.

lib/rhashtable.c

View file

This diff is incomplete. Download the complete patch.

net/dsa/slave.c

View file

This diff is incomplete. Download the complete patch.

net/ipv4/tcp_bbr.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/ipv6/addrconf.c

View file

This diff is incomplete. Download the complete patch.

net/ipv6/ip6_fib.c

View file

This diff is incomplete. Download the complete patch.

net/ipv6/ip6_vti.c

View file

This diff is incomplete. Download the complete patch.

net/ipv6/route.c

View file

This diff is incomplete. Download the complete patch.

net/ncsi/ncsi-netlink.c

View file

This diff is incomplete. Download the complete patch.

net/rds/tcp.c

View file

This diff is incomplete. Download the complete patch.

net/sched/act_api.c

View file

This diff is incomplete. Download the complete patch.

net/sched/act_bpf.c

View file

This diff is incomplete. Download the complete patch.

net/sched/act_connmark.c

View file

This diff is incomplete. Download the complete patch.

net/sched/act_csum.c

View file

This diff is incomplete. Download the complete patch.

net/sched/act_gact.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/act_ipt.c

View file

This diff is incomplete. Download the complete patch.

net/sched/act_mirred.c

View file

This diff is incomplete. Download the complete patch.

net/sched/act_nat.c

View file

This diff is incomplete. Download the complete patch.

net/sched/act_pedit.c

View file

This diff is incomplete. Download the complete patch.

net/sched/act_police.c

View file

This diff is incomplete. Download the complete patch.

net/sched/act_sample.c

View file

This diff is incomplete. Download the complete patch.

net/sched/act_simple.c

View file

This diff is incomplete. Download the complete patch.

net/sched/act_skbedit.c

View file

This diff is incomplete. Download the complete patch.

net/sched/act_skbmod.c

View file

This diff is incomplete. Download the complete patch.

net/sched/act_tunnel_key.c

View file

This diff is incomplete. Download the complete patch.

net/sched/act_vlan.c

View file

This diff is incomplete. Download the complete patch.

net/sched/cls_u32.c

View file

This diff is incomplete. Download the complete patch.

net/sched/sch_cake.c

View file

This diff is incomplete. Download the complete patch.

net/tls/tls_main.c

View file

This diff is incomplete. Download the complete patch.

net/xdp/xdp_umem.c

View file

This diff is incomplete. Download the complete patch.

tools/bpf/bpftool/map_perf_ring.c

View file

This diff is incomplete. Download the complete patch.