Skip to content

Commit

Permalink
Merge tag 'net-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/netdev/net

Pull networking fixes from Paolo Abeni:
 "Including fixes from bluetooth, bpf and wireless.

  Current release - regressions:

   - bpf:
      - fix wrong last sg check in sk_msg_recvmsg()
      - fix kernel BUG in purge_effective_progs()

   - mac80211:
      - fix possible leak in ieee80211_tx_control_port()
      - potential NULL dereference in ieee80211_tx_control_port()

  Current release - new code bugs:

   - nfp: fix the access to management firmware hanging

  Previous releases - regressions:

   - ip: fix triggering of 'icmp redirect'

   - sched: tbf: don't call qdisc_put() while holding tree lock

   - bpf: fix corrupted packets for XDP_SHARED_UMEM

   - bluetooth: hci_sync: fix suspend performance regression

   - micrel: fix probe failure

  Previous releases - always broken:

   - tcp: make global challenge ack rate limitation per net-ns and
     default disabled

   - tg3: fix potential hang-up on system reboot

   - mac802154: fix reception for no-daddr packets

  Misc:

   - r8152: add PID for the lenovo onelink+ dock"

* tag 'net-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (56 commits)
  net/smc: Remove redundant refcount increase
  Revert "sch_cake: Return __NET_XMIT_STOLEN when consuming enqueued skb"
  tcp: make global challenge ack rate limitation per net-ns and default disabled
  tcp: annotate data-race around challenge_timestamp
  net: dsa: hellcreek: Print warning only once
  ip: fix triggering of 'icmp redirect'
  sch_cake: Return __NET_XMIT_STOLEN when consuming enqueued skb
  selftests: net: sort .gitignore file
  Documentation: networking: correct possessive "its"
  kcm: fix strp_init() order and cleanup
  mlxbf_gige: compute MDIO period based on i1clk
  ethernet: rocker: fix sleep in atomic context bug in neigh_timer_handler
  net: lan966x: improve error handle in lan966x_fdma_rx_get_frame()
  nfp: fix the access to management firmware hanging
  net: phy: micrel: Make the GPIO to be non-exclusive
  net: virtio_net: fix notification coalescing comments
  net/sched: fix netdevice reference leaks in attach_default_qdiscs()
  net: sched: tbf: don't call qdisc_put() while holding tree lock
  net: Use u64_stats_fetch_begin_irq() for stats fetch.
  net: dsa: xrs700x: Use irqsave variant for u64 stats update
  ...
  • Loading branch information
Linus Torvalds committed Sep 1, 2022
2 parents d330076 + a8424a9 commit 42e66b1
Show file tree
Hide file tree
Showing 70 changed files with 478 additions and 249 deletions.
2 changes: 1 addition & 1 deletion Documentation/networking/devlink/netdevsim.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ The ``netdevsim`` driver supports rate objects management, which includes:
- setting tx_share and tx_max rate values for any rate object type;
- setting parent node for any rate object type.

Rate nodes and it's parameters are exposed in ``netdevsim`` debugfs in RO mode.
Rate nodes and their parameters are exposed in ``netdevsim`` debugfs in RO mode.
For example created rate node with name ``some_group``:

.. code:: shell
Expand Down
2 changes: 1 addition & 1 deletion Documentation/networking/driver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Transmit path guidelines:

1) The ndo_start_xmit method must not return NETDEV_TX_BUSY under
any normal circumstances. It is considered a hard error unless
there is no way your device can tell ahead of time when it's
there is no way your device can tell ahead of time when its
transmit function will become busy.

Instead it must maintain the queue properly. For example,
Expand Down
5 changes: 4 additions & 1 deletion Documentation/networking/ip-sysctl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,10 @@ tcp_limit_output_bytes - INTEGER
tcp_challenge_ack_limit - INTEGER
Limits number of Challenge ACK sent per second, as recommended
in RFC 5961 (Improving TCP's Robustness to Blind In-Window Attacks)
Default: 1000
Note that this per netns rate limit can allow some side channel
attacks and probably should not be enabled.
TCP stack implements per TCP socket limits anyway.
Default: INT_MAX (unlimited)

UDP variables
=============
Expand Down
2 changes: 1 addition & 1 deletion Documentation/networking/ipvlan.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Initial Release:
================
This is conceptually very similar to the macvlan driver with one major
exception of using L3 for mux-ing /demux-ing among slaves. This property makes
the master device share the L2 with it's slave devices. I have developed this
the master device share the L2 with its slave devices. I have developed this
driver in conjunction with network namespaces and not sure if there is use case
outside of it.

Expand Down
2 changes: 1 addition & 1 deletion Documentation/networking/l2tp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ its tunnel close actions. For L2TPIP sockets, the socket's close
handler initiates the same tunnel close actions. All sessions are
first closed. Each session drops its tunnel ref. When the tunnel ref
reaches zero, the tunnel puts its socket ref. When the socket is
eventually destroyed, it's sk_destruct finally frees the L2TP tunnel
eventually destroyed, its sk_destruct finally frees the L2TP tunnel
context.

Sessions
Expand Down
2 changes: 1 addition & 1 deletion Documentation/networking/switchdev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ tools such as iproute2.

The switchdev driver can know a particular port's position in the topology by
monitoring NETDEV_CHANGEUPPER notifications. For example, a port moved into a
bond will see it's upper master change. If that bond is moved into a bridge,
bond will see its upper master change. If that bond is moved into a bridge,
the bond's upper master will change. And so on. The driver will track such
movements to know what position a port is in in the overall topology by
registering for netdevice events and acting on NETDEV_CHANGEUPPER.
Expand Down
5 changes: 3 additions & 2 deletions drivers/net/dsa/xrs700x/xrs700x.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ static void xrs700x_read_port_counters(struct xrs700x *priv, int port)
{
struct xrs700x_port *p = &priv->ports[port];
struct rtnl_link_stats64 stats;
unsigned long flags;
int i;

memset(&stats, 0, sizeof(stats));
Expand Down Expand Up @@ -138,9 +139,9 @@ static void xrs700x_read_port_counters(struct xrs700x *priv, int port)
*/
stats.rx_packets += stats.multicast;

u64_stats_update_begin(&p->syncp);
flags = u64_stats_update_begin_irqsave(&p->syncp);
p->stats64 = stats;
u64_stats_update_end(&p->syncp);
u64_stats_update_end_irqrestore(&p->syncp, flags);

mutex_unlock(&p->mib_mutex);
}
Expand Down
8 changes: 6 additions & 2 deletions drivers/net/ethernet/broadcom/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -18076,16 +18076,20 @@ static void tg3_shutdown(struct pci_dev *pdev)
struct net_device *dev = pci_get_drvdata(pdev);
struct tg3 *tp = netdev_priv(dev);

tg3_reset_task_cancel(tp);

rtnl_lock();

netif_device_detach(dev);

if (netif_running(dev))
dev_close(dev);

if (system_state == SYSTEM_POWER_OFF)
tg3_power_down(tp);
tg3_power_down(tp);

rtnl_unlock();

pci_disable_device(pdev);
}

/**
Expand Down
24 changes: 12 additions & 12 deletions drivers/net/ethernet/cortina/gemini.c
Original file line number Diff line number Diff line change
Expand Up @@ -1919,7 +1919,7 @@ static void gmac_get_stats64(struct net_device *netdev,

/* Racing with RX NAPI */
do {
start = u64_stats_fetch_begin(&port->rx_stats_syncp);
start = u64_stats_fetch_begin_irq(&port->rx_stats_syncp);

stats->rx_packets = port->stats.rx_packets;
stats->rx_bytes = port->stats.rx_bytes;
Expand All @@ -1931,11 +1931,11 @@ static void gmac_get_stats64(struct net_device *netdev,
stats->rx_crc_errors = port->stats.rx_crc_errors;
stats->rx_frame_errors = port->stats.rx_frame_errors;

} while (u64_stats_fetch_retry(&port->rx_stats_syncp, start));
} while (u64_stats_fetch_retry_irq(&port->rx_stats_syncp, start));

/* Racing with MIB and TX completion interrupts */
do {
start = u64_stats_fetch_begin(&port->ir_stats_syncp);
start = u64_stats_fetch_begin_irq(&port->ir_stats_syncp);

stats->tx_errors = port->stats.tx_errors;
stats->tx_packets = port->stats.tx_packets;
Expand All @@ -1945,15 +1945,15 @@ static void gmac_get_stats64(struct net_device *netdev,
stats->rx_missed_errors = port->stats.rx_missed_errors;
stats->rx_fifo_errors = port->stats.rx_fifo_errors;

} while (u64_stats_fetch_retry(&port->ir_stats_syncp, start));
} while (u64_stats_fetch_retry_irq(&port->ir_stats_syncp, start));

/* Racing with hard_start_xmit */
do {
start = u64_stats_fetch_begin(&port->tx_stats_syncp);
start = u64_stats_fetch_begin_irq(&port->tx_stats_syncp);

stats->tx_dropped = port->stats.tx_dropped;

} while (u64_stats_fetch_retry(&port->tx_stats_syncp, start));
} while (u64_stats_fetch_retry_irq(&port->tx_stats_syncp, start));

stats->rx_dropped += stats->rx_missed_errors;
}
Expand Down Expand Up @@ -2031,32 +2031,32 @@ static void gmac_get_ethtool_stats(struct net_device *netdev,
/* Racing with MIB interrupt */
do {
p = values;
start = u64_stats_fetch_begin(&port->ir_stats_syncp);
start = u64_stats_fetch_begin_irq(&port->ir_stats_syncp);

for (i = 0; i < RX_STATS_NUM; i++)
*p++ = port->hw_stats[i];

} while (u64_stats_fetch_retry(&port->ir_stats_syncp, start));
} while (u64_stats_fetch_retry_irq(&port->ir_stats_syncp, start));
values = p;

/* Racing with RX NAPI */
do {
p = values;
start = u64_stats_fetch_begin(&port->rx_stats_syncp);
start = u64_stats_fetch_begin_irq(&port->rx_stats_syncp);

for (i = 0; i < RX_STATUS_NUM; i++)
*p++ = port->rx_stats[i];
for (i = 0; i < RX_CHKSUM_NUM; i++)
*p++ = port->rx_csum_stats[i];
*p++ = port->rx_napi_exits;

} while (u64_stats_fetch_retry(&port->rx_stats_syncp, start));
} while (u64_stats_fetch_retry_irq(&port->rx_stats_syncp, start));
values = p;

/* Racing with TX start_xmit */
do {
p = values;
start = u64_stats_fetch_begin(&port->tx_stats_syncp);
start = u64_stats_fetch_begin_irq(&port->tx_stats_syncp);

for (i = 0; i < TX_MAX_FRAGS; i++) {
*values++ = port->tx_frag_stats[i];
Expand All @@ -2065,7 +2065,7 @@ static void gmac_get_ethtool_stats(struct net_device *netdev,
*values++ = port->tx_frags_linearized;
*values++ = port->tx_hw_csummed;

} while (u64_stats_fetch_retry(&port->tx_stats_syncp, start));
} while (u64_stats_fetch_retry_irq(&port->tx_stats_syncp, start));
}

static int gmac_get_ksettings(struct net_device *netdev,
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/fungible/funeth/funeth_txrx.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ struct funeth_rxq {

#define FUN_QSTAT_READ(q, seq, stats_copy) \
do { \
seq = u64_stats_fetch_begin(&(q)->syncp); \
seq = u64_stats_fetch_begin_irq(&(q)->syncp); \
stats_copy = (q)->stats; \
} while (u64_stats_fetch_retry(&(q)->syncp, (seq)))
} while (u64_stats_fetch_retry_irq(&(q)->syncp, (seq)))

#define FUN_INT_NAME_LEN (IFNAMSIZ + 16)

Expand Down
16 changes: 8 additions & 8 deletions drivers/net/ethernet/google/gve/gve_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,14 @@ gve_get_ethtool_stats(struct net_device *netdev,
struct gve_rx_ring *rx = &priv->rx[ring];

start =
u64_stats_fetch_begin(&priv->rx[ring].statss);
u64_stats_fetch_begin_irq(&priv->rx[ring].statss);
tmp_rx_pkts = rx->rpackets;
tmp_rx_bytes = rx->rbytes;
tmp_rx_skb_alloc_fail = rx->rx_skb_alloc_fail;
tmp_rx_buf_alloc_fail = rx->rx_buf_alloc_fail;
tmp_rx_desc_err_dropped_pkt =
rx->rx_desc_err_dropped_pkt;
} while (u64_stats_fetch_retry(&priv->rx[ring].statss,
} while (u64_stats_fetch_retry_irq(&priv->rx[ring].statss,
start));
rx_pkts += tmp_rx_pkts;
rx_bytes += tmp_rx_bytes;
Expand All @@ -198,10 +198,10 @@ gve_get_ethtool_stats(struct net_device *netdev,
if (priv->tx) {
do {
start =
u64_stats_fetch_begin(&priv->tx[ring].statss);
u64_stats_fetch_begin_irq(&priv->tx[ring].statss);
tmp_tx_pkts = priv->tx[ring].pkt_done;
tmp_tx_bytes = priv->tx[ring].bytes_done;
} while (u64_stats_fetch_retry(&priv->tx[ring].statss,
} while (u64_stats_fetch_retry_irq(&priv->tx[ring].statss,
start));
tx_pkts += tmp_tx_pkts;
tx_bytes += tmp_tx_bytes;
Expand Down Expand Up @@ -259,13 +259,13 @@ gve_get_ethtool_stats(struct net_device *netdev,
data[i++] = rx->fill_cnt - rx->cnt;
do {
start =
u64_stats_fetch_begin(&priv->rx[ring].statss);
u64_stats_fetch_begin_irq(&priv->rx[ring].statss);
tmp_rx_bytes = rx->rbytes;
tmp_rx_skb_alloc_fail = rx->rx_skb_alloc_fail;
tmp_rx_buf_alloc_fail = rx->rx_buf_alloc_fail;
tmp_rx_desc_err_dropped_pkt =
rx->rx_desc_err_dropped_pkt;
} while (u64_stats_fetch_retry(&priv->rx[ring].statss,
} while (u64_stats_fetch_retry_irq(&priv->rx[ring].statss,
start));
data[i++] = tmp_rx_bytes;
data[i++] = rx->rx_cont_packet_cnt;
Expand Down Expand Up @@ -331,9 +331,9 @@ gve_get_ethtool_stats(struct net_device *netdev,
}
do {
start =
u64_stats_fetch_begin(&priv->tx[ring].statss);
u64_stats_fetch_begin_irq(&priv->tx[ring].statss);
tmp_tx_bytes = tx->bytes_done;
} while (u64_stats_fetch_retry(&priv->tx[ring].statss,
} while (u64_stats_fetch_retry_irq(&priv->tx[ring].statss,
start));
data[i++] = tmp_tx_bytes;
data[i++] = tx->wake_queue;
Expand Down
12 changes: 6 additions & 6 deletions drivers/net/ethernet/google/gve/gve_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ static void gve_get_stats(struct net_device *dev, struct rtnl_link_stats64 *s)
for (ring = 0; ring < priv->rx_cfg.num_queues; ring++) {
do {
start =
u64_stats_fetch_begin(&priv->rx[ring].statss);
u64_stats_fetch_begin_irq(&priv->rx[ring].statss);
packets = priv->rx[ring].rpackets;
bytes = priv->rx[ring].rbytes;
} while (u64_stats_fetch_retry(&priv->rx[ring].statss,
} while (u64_stats_fetch_retry_irq(&priv->rx[ring].statss,
start));
s->rx_packets += packets;
s->rx_bytes += bytes;
Expand All @@ -64,10 +64,10 @@ static void gve_get_stats(struct net_device *dev, struct rtnl_link_stats64 *s)
for (ring = 0; ring < priv->tx_cfg.num_queues; ring++) {
do {
start =
u64_stats_fetch_begin(&priv->tx[ring].statss);
u64_stats_fetch_begin_irq(&priv->tx[ring].statss);
packets = priv->tx[ring].pkt_done;
bytes = priv->tx[ring].bytes_done;
} while (u64_stats_fetch_retry(&priv->tx[ring].statss,
} while (u64_stats_fetch_retry_irq(&priv->tx[ring].statss,
start));
s->tx_packets += packets;
s->tx_bytes += bytes;
Expand Down Expand Up @@ -1274,9 +1274,9 @@ void gve_handle_report_stats(struct gve_priv *priv)
}

do {
start = u64_stats_fetch_begin(&priv->tx[idx].statss);
start = u64_stats_fetch_begin_irq(&priv->tx[idx].statss);
tx_bytes = priv->tx[idx].bytes_done;
} while (u64_stats_fetch_retry(&priv->tx[idx].statss, start));
} while (u64_stats_fetch_retry_irq(&priv->tx[idx].statss, start));
stats[stats_idx++] = (struct stats) {
.stat_name = cpu_to_be32(TX_WAKE_CNT),
.value = cpu_to_be64(priv->tx[idx].wake_queue),
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/huawei/hinic/hinic_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ void hinic_rxq_get_stats(struct hinic_rxq *rxq, struct hinic_rxq_stats *stats)
unsigned int start;

do {
start = u64_stats_fetch_begin(&rxq_stats->syncp);
start = u64_stats_fetch_begin_irq(&rxq_stats->syncp);
stats->pkts = rxq_stats->pkts;
stats->bytes = rxq_stats->bytes;
stats->errors = rxq_stats->csum_errors +
rxq_stats->other_errors;
stats->csum_errors = rxq_stats->csum_errors;
stats->other_errors = rxq_stats->other_errors;
} while (u64_stats_fetch_retry(&rxq_stats->syncp, start));
} while (u64_stats_fetch_retry_irq(&rxq_stats->syncp, start));
}

/**
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/huawei/hinic/hinic_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ void hinic_txq_get_stats(struct hinic_txq *txq, struct hinic_txq_stats *stats)
unsigned int start;

do {
start = u64_stats_fetch_begin(&txq_stats->syncp);
start = u64_stats_fetch_begin_irq(&txq_stats->syncp);
stats->pkts = txq_stats->pkts;
stats->bytes = txq_stats->bytes;
stats->tx_busy = txq_stats->tx_busy;
stats->tx_wake = txq_stats->tx_wake;
stats->tx_dropped = txq_stats->tx_dropped;
stats->big_frags_pkts = txq_stats->big_frags_pkts;
} while (u64_stats_fetch_retry(&txq_stats->syncp, start));
} while (u64_stats_fetch_retry_irq(&txq_stats->syncp, start));
}

/**
Expand Down
4 changes: 3 additions & 1 deletion drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ struct mlxbf_gige {
struct net_device *netdev;
struct platform_device *pdev;
void __iomem *mdio_io;
void __iomem *clk_io;
struct mii_bus *mdiobus;
spinlock_t lock; /* for packet processing indices */
u16 rx_q_entries;
Expand Down Expand Up @@ -137,7 +138,8 @@ enum mlxbf_gige_res {
MLXBF_GIGE_RES_MDIO9,
MLXBF_GIGE_RES_GPIO0,
MLXBF_GIGE_RES_LLU,
MLXBF_GIGE_RES_PLU
MLXBF_GIGE_RES_PLU,
MLXBF_GIGE_RES_CLK
};

/* Version of register data returned by mlxbf_gige_get_regs() */
Expand Down
Loading

0 comments on commit 42e66b1

Please sign in to comment.