mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
Merge tag 'net-7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski:
"Including fixes from Netfilter.
Current release - new code bugs:
- net: fix backlog_unlock_irq_restore() vs CONFIG_PREEMPT_RT
- eth: mlx5e: XSK, Fix unintended ICOSQ change
- phy_port: correctly recompute the port's linkmodes
- vsock: prevent child netns mode switch from local to global
- couple of kconfig fixes for new symbols
Previous releases - regressions:
- nfc: nci: fix false-positive parameter validation for packet data
- net: do not delay zero-copy skbs in skb_attempt_defer_free()
Previous releases - always broken:
- mctp: ensure our nlmsg responses to user space are zero-initialised
- ipv6: ioam: fix heap buffer overflow in __ioam6_fill_trace_data()
- fixes for ICMP rate limiting
Misc:
- intel: fix PCI device ID conflict between i40e and ipw2200"
* tag 'net-7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (85 commits)
net: nfc: nci: Fix parameter validation for packet data
net/mlx5e: Use unsigned for mlx5e_get_max_num_channels
net/mlx5e: Fix deadlocks between devlink and netdev instance locks
net/mlx5e: MACsec, add ASO poll loop in macsec_aso_set_arm_event
net/mlx5: Fix misidentification of write combining CQE during poll loop
net/mlx5e: Fix misidentification of ASO CQE during poll loop
net/mlx5: Fix multiport device check over light SFs
bonding: alb: fix UAF in rlb_arp_recv during bond up/down
bnge: fix reserving resources from FW
eth: fbnic: Advertise supported XDP features.
rds: tcp: fix uninit-value in __inet_bind
net/rds: Fix NULL pointer dereference in rds_tcp_accept_one
octeontx2-af: Fix default entries mcam entry action
net/mlx5e: XSK, Fix unintended ICOSQ change
ipv6: icmp: icmpv6_xrlim_allow() optimization if net.ipv6.icmp.ratelimit is zero
ipv4: icmp: icmpv4_xrlim_allow() optimization if net.ipv4.icmp_ratelimit is zero
ipv6: icmp: remove obsolete code in icmpv6_xrlim_allow()
inet: move icmp_global_{credit,stamp} to a separate cache line
icmp: prevent possible overflow in icmp_global_allow()
selftests/net: packetdrill: add ipv4-mapped-ipv6 tests
...
This commit is contained in:
@@ -40,8 +40,8 @@ Table : Subdirectories in /proc/sys/net
|
||||
bridge Bridging rose X.25 PLP layer
|
||||
core General parameter tipc TIPC
|
||||
ethernet Ethernet protocol unix Unix domain sockets
|
||||
ipv4 IP version 4 x25 X.25 protocol
|
||||
ipv6 IP version 6
|
||||
ipv4 IP version 4 vsock VSOCK sockets
|
||||
ipv6 IP version 6 x25 X.25 protocol
|
||||
========= =================== = ========== ===================
|
||||
|
||||
1. /proc/sys/net/core - Network core options
|
||||
@@ -551,3 +551,51 @@ originally may have been issued in the correct sequential order.
|
||||
If named_timeout is nonzero, failed topology updates will be placed on a defer
|
||||
queue until another event arrives that clears the error, or until the timeout
|
||||
expires. Value is in milliseconds.
|
||||
|
||||
6. /proc/sys/net/vsock - VSOCK sockets
|
||||
--------------------------------------
|
||||
|
||||
VSOCK sockets (AF_VSOCK) provide communication between virtual machines and
|
||||
their hosts. The behavior of VSOCK sockets in a network namespace is determined
|
||||
by the namespace's mode (``global`` or ``local``), which controls how CIDs
|
||||
(Context IDs) are allocated and how sockets interact across namespaces.
|
||||
|
||||
ns_mode
|
||||
-------
|
||||
|
||||
Read-only. Reports the current namespace's mode, set at namespace creation
|
||||
and immutable thereafter.
|
||||
|
||||
Values:
|
||||
|
||||
- ``global`` - the namespace shares system-wide CID allocation and
|
||||
its sockets can reach any VM or socket in any global namespace.
|
||||
Sockets in this namespace cannot reach sockets in local
|
||||
namespaces.
|
||||
- ``local`` - the namespace has private CID allocation and its
|
||||
sockets can only connect to VMs or sockets within the same
|
||||
namespace.
|
||||
|
||||
The init_net mode is always ``global``.
|
||||
|
||||
child_ns_mode
|
||||
-------------
|
||||
|
||||
Controls what mode newly created child namespaces will inherit. At namespace
|
||||
creation, ``ns_mode`` is inherited from the parent's ``child_ns_mode``. The
|
||||
initial value matches the namespace's own ``ns_mode``.
|
||||
|
||||
Values:
|
||||
|
||||
- ``global`` - child namespaces will share system-wide CID allocation
|
||||
and their sockets will be able to reach any VM or socket in any
|
||||
global namespace.
|
||||
- ``local`` - child namespaces will have private CID allocation and
|
||||
their sockets will only be able to connect within their own
|
||||
namespace.
|
||||
|
||||
Changing ``child_ns_mode`` only affects namespaces created after the change;
|
||||
it does not modify the current namespace or any existing children.
|
||||
|
||||
A namespace with ``ns_mode`` set to ``local`` cannot change
|
||||
``child_ns_mode`` to ``global`` (returns ``-EPERM``).
|
||||
|
||||
@@ -3234,12 +3234,13 @@ enhanced_dad - BOOLEAN
|
||||
===========
|
||||
|
||||
ratelimit - INTEGER
|
||||
Limit the maximal rates for sending ICMPv6 messages.
|
||||
Limit the maximal rates for sending ICMPv6 messages to a particular
|
||||
peer.
|
||||
|
||||
0 to disable any limiting,
|
||||
otherwise the minimal space between responses in milliseconds.
|
||||
otherwise the space between responses in milliseconds.
|
||||
|
||||
Default: 1000
|
||||
Default: 100
|
||||
|
||||
ratemask - list of comma separated ranges
|
||||
For ICMPv6 message types matching the ranges in the ratemask, limit
|
||||
|
||||
@@ -373,6 +373,10 @@ fore200e_shutdown(struct fore200e* fore200e)
|
||||
fallthrough;
|
||||
case FORE200E_STATE_IRQ:
|
||||
free_irq(fore200e->irq, fore200e->atm_dev);
|
||||
#ifdef FORE200E_USE_TASKLET
|
||||
tasklet_kill(&fore200e->tx_tasklet);
|
||||
tasklet_kill(&fore200e->rx_tasklet);
|
||||
#endif
|
||||
|
||||
fallthrough;
|
||||
case FORE200E_STATE_ALLOC_BUF:
|
||||
|
||||
@@ -91,6 +91,8 @@ zl3073x_ref_freq_set(struct zl3073x_ref *ref, u32 freq)
|
||||
|
||||
ref->freq_base = base;
|
||||
ref->freq_mult = mult;
|
||||
ref->freq_ratio_m = 1;
|
||||
ref->freq_ratio_n = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -333,6 +333,7 @@ config MACSEC
|
||||
|
||||
config NETCONSOLE
|
||||
tristate "Network console logging support"
|
||||
depends on PRINTK
|
||||
help
|
||||
If you want to log kernel messages over the network, enable this.
|
||||
See <file:Documentation/networking/netconsole.rst> for details.
|
||||
|
||||
@@ -115,6 +115,8 @@ static const struct attribute_group com20020_state_group = {
|
||||
.attrs = com20020_state_attrs,
|
||||
};
|
||||
|
||||
static struct com20020_pci_card_info card_info_2p5mbit;
|
||||
|
||||
static void com20020pci_remove(struct pci_dev *pdev);
|
||||
|
||||
static int com20020pci_probe(struct pci_dev *pdev,
|
||||
@@ -140,7 +142,7 @@ static int com20020pci_probe(struct pci_dev *pdev,
|
||||
|
||||
ci = (struct com20020_pci_card_info *)id->driver_data;
|
||||
if (!ci)
|
||||
return -EINVAL;
|
||||
ci = &card_info_2p5mbit;
|
||||
|
||||
priv->ci = ci;
|
||||
mm = &ci->misc_map;
|
||||
@@ -347,6 +349,18 @@ static struct com20020_pci_card_info card_info_5mbit = {
|
||||
.flags = ARC_IS_5MBIT,
|
||||
};
|
||||
|
||||
static struct com20020_pci_card_info card_info_2p5mbit = {
|
||||
.name = "ARC-PCI",
|
||||
.devcount = 1,
|
||||
.chan_map_tbl = {
|
||||
{
|
||||
.bar = 2,
|
||||
.offset = 0x00,
|
||||
.size = 0x08,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct com20020_pci_card_info card_info_sohard = {
|
||||
.name = "SOHARD SH ARC-PCI",
|
||||
.devcount = 1,
|
||||
|
||||
@@ -4343,9 +4343,13 @@ static int bond_close(struct net_device *bond_dev)
|
||||
|
||||
bond_work_cancel_all(bond);
|
||||
bond->send_peer_notif = 0;
|
||||
WRITE_ONCE(bond->recv_probe, NULL);
|
||||
|
||||
/* Wait for any in-flight RX handlers */
|
||||
synchronize_net();
|
||||
|
||||
if (bond_is_lb(bond))
|
||||
bond_alb_deinitialize(bond);
|
||||
bond->recv_probe = NULL;
|
||||
|
||||
if (BOND_MODE(bond) == BOND_MODE_8023AD &&
|
||||
bond->params.broadcast_neighbor)
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
config NET_DSA_MXL862
|
||||
tristate "MaxLinear MxL862xx"
|
||||
depends on NET_DSA
|
||||
select MAXLINEAR_GPHY
|
||||
select NET_DSA_TAG_MXL_862XX
|
||||
help
|
||||
This enables support for the MaxLinear MxL862xx switch family.
|
||||
|
||||
@@ -442,7 +442,7 @@ __bnge_hwrm_reserve_pf_rings(struct bnge_dev *bd, struct bnge_hw_rings *hwr)
|
||||
struct hwrm_func_cfg_input *req;
|
||||
u32 enables = 0;
|
||||
|
||||
if (bnge_hwrm_req_init(bd, req, HWRM_FUNC_QCFG))
|
||||
if (bnge_hwrm_req_init(bd, req, HWRM_FUNC_CFG))
|
||||
return NULL;
|
||||
|
||||
req->fid = cpu_to_le16(0xffff);
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/if.h>
|
||||
#include <net/ip.h>
|
||||
#include <net/netdev_queues.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <net/page_pool/helpers.h>
|
||||
|
||||
|
||||
@@ -423,7 +423,7 @@ static int ec_bhf_open(struct net_device *net_dev)
|
||||
|
||||
error_rx_free:
|
||||
dma_free_coherent(dev, priv->rx_buf.alloc_len, priv->rx_buf.alloc,
|
||||
priv->rx_buf.alloc_len);
|
||||
priv->rx_buf.alloc_phys);
|
||||
out:
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,13 @@ static const struct pci_device_id i40e_pci_tbl[] = {
|
||||
{PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_BASE_T4), 0},
|
||||
{PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_BASE_T_BC), 0},
|
||||
{PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_SFP), 0},
|
||||
{PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_B), 0},
|
||||
/*
|
||||
* This ID conflicts with ipw2200, but the devices can be differentiated
|
||||
* because i40e devices use PCI_CLASS_NETWORK_ETHERNET and ipw2200
|
||||
* devices use PCI_CLASS_NETWORK_OTHER.
|
||||
*/
|
||||
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_10G_B),
|
||||
PCI_CLASS_NETWORK_ETHERNET << 8, 0xffff00, 0},
|
||||
{PCI_VDEVICE(INTEL, I40E_DEV_ID_KX_X722), 0},
|
||||
{PCI_VDEVICE(INTEL, I40E_DEV_ID_QSFP_X722), 0},
|
||||
{PCI_VDEVICE(INTEL, I40E_DEV_ID_SFP_X722), 0},
|
||||
|
||||
@@ -1042,32 +1042,35 @@ void rvu_npc_update_flowkey_alg_idx(struct rvu *rvu, u16 pcifunc, int nixlf,
|
||||
rvu_write64(rvu, blkaddr,
|
||||
NPC_AF_MCAMEX_BANKX_ACTION(index, bank), *(u64 *)&action);
|
||||
|
||||
/* update the VF flow rule action with the VF default entry action */
|
||||
if (mcam_index < 0)
|
||||
npc_update_vf_flow_entry(rvu, mcam, blkaddr, pcifunc,
|
||||
*(u64 *)&action);
|
||||
|
||||
/* update the action change in default rule */
|
||||
pfvf = rvu_get_pfvf(rvu, pcifunc);
|
||||
if (pfvf->def_ucast_rule)
|
||||
pfvf->def_ucast_rule->rx_action = action;
|
||||
|
||||
index = npc_get_nixlf_mcam_index(mcam, pcifunc,
|
||||
nixlf, NIXLF_PROMISC_ENTRY);
|
||||
if (mcam_index < 0) {
|
||||
/* update the VF flow rule action with the VF default
|
||||
* entry action
|
||||
*/
|
||||
npc_update_vf_flow_entry(rvu, mcam, blkaddr, pcifunc,
|
||||
*(u64 *)&action);
|
||||
|
||||
/* If PF's promiscuous entry is enabled,
|
||||
* Set RSS action for that entry as well
|
||||
*/
|
||||
npc_update_rx_action_with_alg_idx(rvu, action, pfvf, index, blkaddr,
|
||||
alg_idx);
|
||||
index = npc_get_nixlf_mcam_index(mcam, pcifunc,
|
||||
nixlf, NIXLF_PROMISC_ENTRY);
|
||||
|
||||
index = npc_get_nixlf_mcam_index(mcam, pcifunc,
|
||||
nixlf, NIXLF_ALLMULTI_ENTRY);
|
||||
/* If PF's allmulti entry is enabled,
|
||||
* Set RSS action for that entry as well
|
||||
*/
|
||||
npc_update_rx_action_with_alg_idx(rvu, action, pfvf, index, blkaddr,
|
||||
alg_idx);
|
||||
/* If PF's promiscuous entry is enabled,
|
||||
* Set RSS action for that entry as well
|
||||
*/
|
||||
npc_update_rx_action_with_alg_idx(rvu, action, pfvf, index,
|
||||
blkaddr, alg_idx);
|
||||
|
||||
index = npc_get_nixlf_mcam_index(mcam, pcifunc,
|
||||
nixlf, NIXLF_ALLMULTI_ENTRY);
|
||||
/* If PF's allmulti entry is enabled,
|
||||
* Set RSS action for that entry as well
|
||||
*/
|
||||
npc_update_rx_action_with_alg_idx(rvu, action, pfvf, index,
|
||||
blkaddr, alg_idx);
|
||||
}
|
||||
}
|
||||
|
||||
void npc_enadis_default_mce_entry(struct rvu *rvu, u16 pcifunc,
|
||||
|
||||
@@ -180,7 +180,8 @@ static inline u16 mlx5_min_rx_wqes(int wq_type, u32 wq_size)
|
||||
}
|
||||
|
||||
/* Use this function to get max num channels (rxqs/txqs) only to create netdev */
|
||||
static inline int mlx5e_get_max_num_channels(struct mlx5_core_dev *mdev)
|
||||
static inline unsigned int
|
||||
mlx5e_get_max_num_channels(struct mlx5_core_dev *mdev)
|
||||
{
|
||||
return is_kdump_kernel() ?
|
||||
MLX5E_MIN_NUM_CHANNELS :
|
||||
@@ -1103,6 +1104,7 @@ int mlx5e_open_locked(struct net_device *netdev);
|
||||
int mlx5e_close_locked(struct net_device *netdev);
|
||||
|
||||
void mlx5e_trigger_napi_icosq(struct mlx5e_channel *c);
|
||||
void mlx5e_trigger_napi_async_icosq(struct mlx5e_channel *c);
|
||||
void mlx5e_trigger_napi_sched(struct napi_struct *napi);
|
||||
|
||||
int mlx5e_open_channels(struct mlx5e_priv *priv,
|
||||
|
||||
@@ -457,22 +457,8 @@ static void mlx5e_ptpsq_unhealthy_work(struct work_struct *work)
|
||||
{
|
||||
struct mlx5e_ptpsq *ptpsq =
|
||||
container_of(work, struct mlx5e_ptpsq, report_unhealthy_work);
|
||||
struct mlx5e_txqsq *sq = &ptpsq->txqsq;
|
||||
|
||||
/* Recovering the PTP SQ means re-enabling NAPI, which requires the
|
||||
* netdev instance lock. However, SQ closing has to wait for this work
|
||||
* task to finish while also holding the same lock. So either get the
|
||||
* lock or find that the SQ is no longer enabled and thus this work is
|
||||
* not relevant anymore.
|
||||
*/
|
||||
while (!netdev_trylock(sq->netdev)) {
|
||||
if (!test_bit(MLX5E_SQ_STATE_ENABLED, &sq->state))
|
||||
return;
|
||||
msleep(20);
|
||||
}
|
||||
|
||||
mlx5e_reporter_tx_ptpsq_unhealthy(ptpsq);
|
||||
netdev_unlock(sq->netdev);
|
||||
}
|
||||
|
||||
static int mlx5e_ptp_open_txqsq(struct mlx5e_ptp *c, u32 tisn,
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
// Copyright (c) 2019 Mellanox Technologies.
|
||||
|
||||
#include <net/netdev_lock.h>
|
||||
|
||||
#include "health.h"
|
||||
#include "params.h"
|
||||
#include "txrx.h"
|
||||
@@ -177,6 +179,16 @@ static int mlx5e_rx_reporter_timeout_recover(void *ctx)
|
||||
rq = ctx;
|
||||
priv = rq->priv;
|
||||
|
||||
/* Acquire netdev instance lock to synchronize with channel close and
|
||||
* reopen flows. Either successfully obtain the lock, or detect that
|
||||
* channels are closing for another reason, making this work no longer
|
||||
* necessary.
|
||||
*/
|
||||
while (!netdev_trylock(rq->netdev)) {
|
||||
if (!test_bit(MLX5E_STATE_CHANNELS_ACTIVE, &rq->priv->state))
|
||||
return 0;
|
||||
msleep(20);
|
||||
}
|
||||
mutex_lock(&priv->state_lock);
|
||||
|
||||
eq = rq->cq.mcq.eq;
|
||||
@@ -186,6 +198,7 @@ static int mlx5e_rx_reporter_timeout_recover(void *ctx)
|
||||
clear_bit(MLX5E_SQ_STATE_ENABLED, &rq->icosq->state);
|
||||
|
||||
mutex_unlock(&priv->state_lock);
|
||||
netdev_unlock(rq->netdev);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/* Copyright (c) 2019 Mellanox Technologies. */
|
||||
|
||||
#include <net/netdev_lock.h>
|
||||
|
||||
#include "health.h"
|
||||
#include "en/ptp.h"
|
||||
#include "en/devlink.h"
|
||||
@@ -79,6 +81,18 @@ static int mlx5e_tx_reporter_err_cqe_recover(void *ctx)
|
||||
if (!test_bit(MLX5E_SQ_STATE_RECOVERING, &sq->state))
|
||||
return 0;
|
||||
|
||||
/* Recovering queues means re-enabling NAPI, which requires the netdev
|
||||
* instance lock. However, SQ closing flows have to wait for work tasks
|
||||
* to finish while also holding the netdev instance lock. So either get
|
||||
* the lock or find that the SQ is no longer enabled and thus this work
|
||||
* is not relevant anymore.
|
||||
*/
|
||||
while (!netdev_trylock(dev)) {
|
||||
if (!test_bit(MLX5E_SQ_STATE_ENABLED, &sq->state))
|
||||
return 0;
|
||||
msleep(20);
|
||||
}
|
||||
|
||||
err = mlx5_core_query_sq_state(mdev, sq->sqn, &state);
|
||||
if (err) {
|
||||
netdev_err(dev, "Failed to query SQ 0x%x state. err = %d\n",
|
||||
@@ -114,9 +128,11 @@ static int mlx5e_tx_reporter_err_cqe_recover(void *ctx)
|
||||
else
|
||||
mlx5e_trigger_napi_sched(sq->cq.napi);
|
||||
|
||||
netdev_unlock(dev);
|
||||
return 0;
|
||||
out:
|
||||
clear_bit(MLX5E_SQ_STATE_RECOVERING, &sq->state);
|
||||
netdev_unlock(dev);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -137,10 +153,24 @@ static int mlx5e_tx_reporter_timeout_recover(void *ctx)
|
||||
sq = to_ctx->sq;
|
||||
eq = sq->cq.mcq.eq;
|
||||
priv = sq->priv;
|
||||
|
||||
/* Recovering the TX queues implies re-enabling NAPI, which requires
|
||||
* the netdev instance lock.
|
||||
* However, channel closing flows have to wait for this work to finish
|
||||
* while holding the same lock. So either get the lock or find that
|
||||
* channels are being closed for other reason and this work is not
|
||||
* relevant anymore.
|
||||
*/
|
||||
while (!netdev_trylock(sq->netdev)) {
|
||||
if (!test_bit(MLX5E_STATE_CHANNELS_ACTIVE, &priv->state))
|
||||
return 0;
|
||||
msleep(20);
|
||||
}
|
||||
|
||||
err = mlx5e_health_channel_eq_recover(sq->netdev, eq, sq->cq.ch_stats);
|
||||
if (!err) {
|
||||
to_ctx->status = 0; /* this sq recovered */
|
||||
return err;
|
||||
goto out;
|
||||
}
|
||||
|
||||
mutex_lock(&priv->state_lock);
|
||||
@@ -148,7 +178,7 @@ static int mlx5e_tx_reporter_timeout_recover(void *ctx)
|
||||
mutex_unlock(&priv->state_lock);
|
||||
if (!err) {
|
||||
to_ctx->status = 1; /* all channels recovered */
|
||||
return err;
|
||||
goto out;
|
||||
}
|
||||
|
||||
to_ctx->status = err;
|
||||
@@ -156,7 +186,8 @@ static int mlx5e_tx_reporter_timeout_recover(void *ctx)
|
||||
netdev_err(priv->netdev,
|
||||
"mlx5e_safe_reopen_channels failed recovering from a tx_timeout, err(%d).\n",
|
||||
err);
|
||||
|
||||
out:
|
||||
netdev_unlock(sq->netdev);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -173,10 +204,22 @@ static int mlx5e_tx_reporter_ptpsq_unhealthy_recover(void *ctx)
|
||||
return 0;
|
||||
|
||||
priv = ptpsq->txqsq.priv;
|
||||
netdev = priv->netdev;
|
||||
|
||||
/* Recovering the PTP SQ means re-enabling NAPI, which requires the
|
||||
* netdev instance lock. However, SQ closing has to wait for this work
|
||||
* task to finish while also holding the same lock. So either get the
|
||||
* lock or find that the SQ is no longer enabled and thus this work is
|
||||
* not relevant anymore.
|
||||
*/
|
||||
while (!netdev_trylock(netdev)) {
|
||||
if (!test_bit(MLX5E_SQ_STATE_ENABLED, &ptpsq->txqsq.state))
|
||||
return 0;
|
||||
msleep(20);
|
||||
}
|
||||
|
||||
mutex_lock(&priv->state_lock);
|
||||
chs = &priv->channels;
|
||||
netdev = priv->netdev;
|
||||
|
||||
carrier_ok = netif_carrier_ok(netdev);
|
||||
netif_carrier_off(netdev);
|
||||
@@ -193,6 +236,7 @@ static int mlx5e_tx_reporter_ptpsq_unhealthy_recover(void *ctx)
|
||||
netif_carrier_on(netdev);
|
||||
|
||||
mutex_unlock(&priv->state_lock);
|
||||
netdev_unlock(netdev);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
|
||||
// Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
|
||||
#include <linux/iopoll.h>
|
||||
#include <linux/math64.h>
|
||||
#include "lib/aso.h"
|
||||
#include "en/tc/post_act.h"
|
||||
@@ -115,7 +116,6 @@ mlx5e_tc_meter_modify(struct mlx5_core_dev *mdev,
|
||||
struct mlx5e_flow_meters *flow_meters;
|
||||
u8 cir_man, cir_exp, cbs_man, cbs_exp;
|
||||
struct mlx5_aso_wqe *aso_wqe;
|
||||
unsigned long expires;
|
||||
struct mlx5_aso *aso;
|
||||
u64 rate, burst;
|
||||
u8 ds_cnt;
|
||||
@@ -187,12 +187,8 @@ mlx5e_tc_meter_modify(struct mlx5_core_dev *mdev,
|
||||
mlx5_aso_post_wqe(aso, true, &aso_wqe->ctrl);
|
||||
|
||||
/* With newer FW, the wait for the first ASO WQE is more than 2us, put the wait 10ms. */
|
||||
expires = jiffies + msecs_to_jiffies(10);
|
||||
do {
|
||||
err = mlx5_aso_poll_cq(aso, true);
|
||||
if (err)
|
||||
usleep_range(2, 10);
|
||||
} while (err && time_is_after_jiffies(expires));
|
||||
read_poll_timeout(mlx5_aso_poll_cq, err, !err, 10, 10 * USEC_PER_MSEC,
|
||||
false, aso, true);
|
||||
mutex_unlock(&flow_meters->aso_lock);
|
||||
|
||||
return err;
|
||||
|
||||
@@ -127,7 +127,7 @@ static int mlx5e_xsk_enable_locked(struct mlx5e_priv *priv,
|
||||
goto err_remove_pool;
|
||||
|
||||
mlx5e_activate_xsk(c);
|
||||
mlx5e_trigger_napi_icosq(c);
|
||||
mlx5e_trigger_napi_async_icosq(c);
|
||||
|
||||
/* Don't wait for WQEs, because the newer xdpsock sample doesn't provide
|
||||
* any Fill Ring entries at the setup stage.
|
||||
@@ -179,7 +179,7 @@ static int mlx5e_xsk_disable_locked(struct mlx5e_priv *priv, u16 ix)
|
||||
c = priv->channels.c[ix];
|
||||
|
||||
mlx5e_activate_rq(&c->rq);
|
||||
mlx5e_trigger_napi_icosq(c);
|
||||
mlx5e_trigger_napi_async_icosq(c);
|
||||
mlx5e_wait_for_min_rx_wqes(&c->rq, MLX5E_RQ_WQES_TIMEOUT);
|
||||
|
||||
mlx5e_rx_res_xsk_update(priv->rx_res, &priv->channels, ix, false);
|
||||
|
||||
@@ -34,7 +34,7 @@ int mlx5e_xsk_wakeup(struct net_device *dev, u32 qid, u32 flags)
|
||||
&c->async_icosq->state))
|
||||
return 0;
|
||||
|
||||
mlx5e_trigger_napi_icosq(c);
|
||||
mlx5e_trigger_napi_async_icosq(c);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user