mirror of
https://github.com/Dasharo/linux.git
synced 2026-03-06 15:25:10 -08:00
Merge tag 'net-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Paolo Abeni:
"Including fixes from wireless, bleutooth, BPF and netfilter.
Current release - regressions:
- core: drop bad gso csum_start and offset in virtio_net_hdr
- wifi: mt76: fix null pointer access in mt792x_mac_link_bss_remove
- eth: tun: add missing bpf_net_ctx_clear() in do_xdp_generic()
- phy: aquantia: only poll GLOBAL_CFG regs on aqr113, aqr113c and
aqr115c
Current release - new code bugs:
- smc: prevent UAF in inet_create()
- bluetooth: btmtk: fix kernel crash when entering btmtk_usb_suspend
- eth: bnxt: reject unsupported hash functions
Previous releases - regressions:
- sched: act_ct: take care of padding in struct zones_ht_key
- netfilter: fix null-ptr-deref in iptable_nat_table_init().
- tcp: adjust clamping window for applications specifying SO_RCVBUF
Previous releases - always broken:
- ethtool: rss: small fixes to spec and GET
- mptcp:
- fix signal endpoint re-add
- pm: fix backup support in signal endpoints
- wifi: ath12k: fix soft lockup on suspend
- eth: bnxt_en: fix RSS logic in __bnxt_reserve_rings()
- eth: ice: fix AF_XDP ZC timeout and concurrency issues
- eth: mlx5:
- fix missing lock on sync reset reload
- fix error handling in irq_pool_request_irq"
* tag 'net-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (76 commits)
mptcp: fix duplicate data handling
mptcp: fix bad RCVPRUNED mib accounting
ipv6: fix ndisc_is_useropt() handling for PIO
igc: Fix double reset adapter triggered from a single taprio cmd
net: MAINTAINERS: Demote Qualcomm IPA to "maintained"
net: wan: fsl_qmc_hdlc: Discard received CRC
net: wan: fsl_qmc_hdlc: Convert carrier_lock spinlock to a mutex
net/mlx5e: Add a check for the return value from mlx5_port_set_eth_ptys
net/mlx5e: Fix CT entry update leaks of modify header context
net/mlx5e: Require mlx5 tc classifier action support for IPsec prio capability
net/mlx5: Fix missing lock on sync reset reload
net/mlx5: Lag, don't use the hardcoded value of the first port
net/mlx5: DR, Fix 'stack guard page was hit' error in dr_rule
net/mlx5: Fix error handling in irq_pool_request_irq
net/mlx5: Always drain health in shutdown callback
net: Add skbuff.h to MAINTAINERS
r8169: don't increment tx_dropped in case of NETDEV_TX_BUSY
netfilter: iptables: Fix potential null-ptr-deref in ip6table_nat_table_init().
netfilter: iptables: Fix null-ptr-deref in iptable_nat_table_init().
net: drop bad gso csum_start and offset in virtio_net_hdr
...
This commit is contained in:
@@ -1753,6 +1753,7 @@ operations:
|
||||
request:
|
||||
attributes:
|
||||
- header
|
||||
- context
|
||||
reply:
|
||||
attributes:
|
||||
- header
|
||||
@@ -1761,7 +1762,6 @@ operations:
|
||||
- indir
|
||||
- hkey
|
||||
- input_xfrm
|
||||
dump: *rss-get-op
|
||||
-
|
||||
name: plca-get-cfg
|
||||
doc: Get PLCA params.
|
||||
|
||||
@@ -1875,6 +1875,7 @@ Kernel response contents:
|
||||
|
||||
===================================== ====== ==========================
|
||||
``ETHTOOL_A_RSS_HEADER`` nested reply header
|
||||
``ETHTOOL_A_RSS_CONTEXT`` u32 context number
|
||||
``ETHTOOL_A_RSS_HFUNC`` u32 RSS hash func
|
||||
``ETHTOOL_A_RSS_INDIR`` binary Indir table bytes
|
||||
``ETHTOOL_A_RSS_HKEY`` binary Hash key bytes
|
||||
|
||||
@@ -15936,6 +15936,7 @@ F: include/linux/in.h
|
||||
F: include/linux/indirect_call_wrapper.h
|
||||
F: include/linux/net.h
|
||||
F: include/linux/netdevice.h
|
||||
F: include/linux/skbuff.h
|
||||
F: include/net/
|
||||
F: include/uapi/linux/in.h
|
||||
F: include/uapi/linux/net.h
|
||||
@@ -18556,7 +18557,7 @@ F: drivers/usb/misc/qcom_eud.c
|
||||
QCOM IPA DRIVER
|
||||
M: Alex Elder <elder@kernel.org>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: drivers/net/ipa/
|
||||
|
||||
QEMU MACHINE EMULATOR AND VIRTUALIZER SUPPORT
|
||||
|
||||
@@ -413,6 +413,7 @@ config BT_ATH3K
|
||||
config BT_MTKSDIO
|
||||
tristate "MediaTek HCI SDIO driver"
|
||||
depends on MMC
|
||||
depends on USB || !BT_HCIBTUSB_MTK
|
||||
select BT_MTK
|
||||
help
|
||||
MediaTek Bluetooth HCI SDIO driver.
|
||||
@@ -425,6 +426,7 @@ config BT_MTKSDIO
|
||||
config BT_MTKUART
|
||||
tristate "MediaTek HCI UART driver"
|
||||
depends on SERIAL_DEV_BUS
|
||||
depends on USB || !BT_HCIBTUSB_MTK
|
||||
select BT_MTK
|
||||
help
|
||||
MediaTek Bluetooth HCI UART driver.
|
||||
|
||||
@@ -3085,6 +3085,9 @@ static int btintel_setup_combined(struct hci_dev *hdev)
|
||||
btintel_set_dsm_reset_method(hdev, &ver_tlv);
|
||||
|
||||
err = btintel_bootloader_setup_tlv(hdev, &ver_tlv);
|
||||
if (err)
|
||||
goto exit_error;
|
||||
|
||||
btintel_register_devcoredump_support(hdev);
|
||||
btintel_print_fseq_info(hdev);
|
||||
break;
|
||||
|
||||
@@ -437,6 +437,7 @@ int btmtk_process_coredump(struct hci_dev *hdev, struct sk_buff *skb)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(btmtk_process_coredump);
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_HCIBTUSB_MTK)
|
||||
static void btmtk_usb_wmt_recv(struct urb *urb)
|
||||
{
|
||||
struct hci_dev *hdev = urb->context;
|
||||
@@ -1262,7 +1263,8 @@ int btmtk_usb_suspend(struct hci_dev *hdev)
|
||||
struct btmtk_data *btmtk_data = hci_get_priv(hdev);
|
||||
|
||||
/* Stop urb anchor for iso data transmission */
|
||||
usb_kill_anchored_urbs(&btmtk_data->isopkt_anchor);
|
||||
if (test_bit(BTMTK_ISOPKT_RUNNING, &btmtk_data->flags))
|
||||
usb_kill_anchored_urbs(&btmtk_data->isopkt_anchor);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1487,6 +1489,7 @@ int btmtk_usb_shutdown(struct hci_dev *hdev)
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(btmtk_usb_shutdown);
|
||||
#endif
|
||||
|
||||
MODULE_AUTHOR("Sean Wang <sean.wang@mediatek.com>");
|
||||
MODULE_AUTHOR("Mark Chen <mark-yw.chen@mediatek.com>");
|
||||
|
||||
@@ -7649,8 +7649,8 @@ static int bnxt_get_avail_msix(struct bnxt *bp, int num);
|
||||
static int __bnxt_reserve_rings(struct bnxt *bp)
|
||||
{
|
||||
struct bnxt_hw_rings hwr = {0};
|
||||
int rx_rings, old_rx_rings, rc;
|
||||
int cp = bp->cp_nr_rings;
|
||||
int rx_rings, rc;
|
||||
int ulp_msix = 0;
|
||||
bool sh = false;
|
||||
int tx_cp;
|
||||
@@ -7684,6 +7684,7 @@ static int __bnxt_reserve_rings(struct bnxt *bp)
|
||||
hwr.grp = bp->rx_nr_rings;
|
||||
hwr.rss_ctx = bnxt_get_total_rss_ctxs(bp, &hwr);
|
||||
hwr.stat = bnxt_get_func_stat_ctxs(bp);
|
||||
old_rx_rings = bp->hw_resc.resv_rx_rings;
|
||||
|
||||
rc = bnxt_hwrm_reserve_rings(bp, &hwr);
|
||||
if (rc)
|
||||
@@ -7738,7 +7739,8 @@ static int __bnxt_reserve_rings(struct bnxt *bp)
|
||||
if (!bnxt_rings_ok(bp, &hwr))
|
||||
return -ENOMEM;
|
||||
|
||||
if (!netif_is_rxfh_configured(bp->dev))
|
||||
if (old_rx_rings != bp->hw_resc.resv_rx_rings &&
|
||||
!netif_is_rxfh_configured(bp->dev))
|
||||
bnxt_set_dflt_rss_indir_tbl(bp, NULL);
|
||||
|
||||
if (!bnxt_ulp_registered(bp->edev) && BNXT_NEW_RM(bp)) {
|
||||
|
||||
@@ -1863,8 +1863,14 @@ static void bnxt_modify_rss(struct bnxt *bp, struct ethtool_rxfh_context *ctx,
|
||||
}
|
||||
|
||||
static int bnxt_rxfh_context_check(struct bnxt *bp,
|
||||
const struct ethtool_rxfh_param *rxfh,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
if (rxfh->hfunc && rxfh->hfunc != ETH_RSS_HASH_TOP) {
|
||||
NL_SET_ERR_MSG_MOD(extack, "RSS hash function not supported");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
if (!BNXT_SUPPORTS_MULTI_RSS_CTX(bp)) {
|
||||
NL_SET_ERR_MSG_MOD(extack, "RSS contexts not supported");
|
||||
return -EOPNOTSUPP;
|
||||
@@ -1888,7 +1894,7 @@ static int bnxt_create_rxfh_context(struct net_device *dev,
|
||||
struct bnxt_vnic_info *vnic;
|
||||
int rc;
|
||||
|
||||
rc = bnxt_rxfh_context_check(bp, extack);
|
||||
rc = bnxt_rxfh_context_check(bp, rxfh, extack);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
@@ -1915,8 +1921,12 @@ static int bnxt_create_rxfh_context(struct net_device *dev,
|
||||
if (rc)
|
||||
goto out;
|
||||
|
||||
/* Populate defaults in the context */
|
||||
bnxt_set_dflt_rss_indir_tbl(bp, ctx);
|
||||
ctx->hfunc = ETH_RSS_HASH_TOP;
|
||||
memcpy(vnic->rss_hash_key, bp->rss_hash_key, HW_HASH_KEY_SIZE);
|
||||
memcpy(ethtool_rxfh_context_key(ctx),
|
||||
bp->rss_hash_key, HW_HASH_KEY_SIZE);
|
||||
|
||||
rc = bnxt_hwrm_vnic_alloc(bp, vnic, 0, bp->rx_nr_rings);
|
||||
if (rc) {
|
||||
@@ -1953,7 +1963,7 @@ static int bnxt_modify_rxfh_context(struct net_device *dev,
|
||||
struct bnxt_rss_ctx *rss_ctx;
|
||||
int rc;
|
||||
|
||||
rc = bnxt_rxfh_context_check(bp, extack);
|
||||
rc = bnxt_rxfh_context_check(bp, rxfh, extack);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
|
||||
@@ -765,18 +765,17 @@ static inline struct xsk_buff_pool *ice_get_xp_from_qid(struct ice_vsi *vsi,
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_xsk_pool - get XSK buffer pool bound to a ring
|
||||
* ice_rx_xsk_pool - assign XSK buff pool to Rx ring
|
||||
* @ring: Rx ring to use
|
||||
*
|
||||
* Returns a pointer to xsk_buff_pool structure if there is a buffer pool
|
||||
* present, NULL otherwise.
|
||||
* Sets XSK buff pool pointer on Rx ring.
|
||||
*/
|
||||
static inline struct xsk_buff_pool *ice_xsk_pool(struct ice_rx_ring *ring)
|
||||
static inline void ice_rx_xsk_pool(struct ice_rx_ring *ring)
|
||||
{
|
||||
struct ice_vsi *vsi = ring->vsi;
|
||||
u16 qid = ring->q_index;
|
||||
|
||||
return ice_get_xp_from_qid(vsi, qid);
|
||||
WRITE_ONCE(ring->xsk_pool, ice_get_xp_from_qid(vsi, qid));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -801,7 +800,7 @@ static inline void ice_tx_xsk_pool(struct ice_vsi *vsi, u16 qid)
|
||||
if (!ring)
|
||||
return;
|
||||
|
||||
ring->xsk_pool = ice_get_xp_from_qid(vsi, qid);
|
||||
WRITE_ONCE(ring->xsk_pool, ice_get_xp_from_qid(vsi, qid));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -536,7 +536,7 @@ static int ice_vsi_cfg_rxq(struct ice_rx_ring *ring)
|
||||
return err;
|
||||
}
|
||||
|
||||
ring->xsk_pool = ice_xsk_pool(ring);
|
||||
ice_rx_xsk_pool(ring);
|
||||
if (ring->xsk_pool) {
|
||||
xdp_rxq_info_unreg(&ring->xdp_rxq);
|
||||
|
||||
@@ -597,7 +597,7 @@ static int ice_vsi_cfg_rxq(struct ice_rx_ring *ring)
|
||||
return 0;
|
||||
}
|
||||
|
||||
ok = ice_alloc_rx_bufs_zc(ring, num_bufs);
|
||||
ok = ice_alloc_rx_bufs_zc(ring, ring->xsk_pool, num_bufs);
|
||||
if (!ok) {
|
||||
u16 pf_q = ring->vsi->rxq_map[ring->q_index];
|
||||
|
||||
|
||||
@@ -2948,7 +2948,7 @@ static void ice_vsi_rx_napi_schedule(struct ice_vsi *vsi)
|
||||
ice_for_each_rxq(vsi, i) {
|
||||
struct ice_rx_ring *rx_ring = vsi->rx_rings[i];
|
||||
|
||||
if (rx_ring->xsk_pool)
|
||||
if (READ_ONCE(rx_ring->xsk_pool))
|
||||
napi_schedule(&rx_ring->q_vector->napi);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -456,7 +456,7 @@ void ice_free_rx_ring(struct ice_rx_ring *rx_ring)
|
||||
if (rx_ring->vsi->type == ICE_VSI_PF)
|
||||
if (xdp_rxq_info_is_reg(&rx_ring->xdp_rxq))
|
||||
xdp_rxq_info_unreg(&rx_ring->xdp_rxq);
|
||||
rx_ring->xdp_prog = NULL;
|
||||
WRITE_ONCE(rx_ring->xdp_prog, NULL);
|
||||
if (rx_ring->xsk_pool) {
|
||||
kfree(rx_ring->xdp_buf);
|
||||
rx_ring->xdp_buf = NULL;
|
||||
@@ -1521,10 +1521,11 @@ int ice_napi_poll(struct napi_struct *napi, int budget)
|
||||
* budget and be more aggressive about cleaning up the Tx descriptors.
|
||||
*/
|
||||
ice_for_each_tx_ring(tx_ring, q_vector->tx) {
|
||||
struct xsk_buff_pool *xsk_pool = READ_ONCE(tx_ring->xsk_pool);
|
||||
bool wd;
|
||||
|
||||
if (tx_ring->xsk_pool)
|
||||
wd = ice_xmit_zc(tx_ring);
|
||||
if (xsk_pool)
|
||||
wd = ice_xmit_zc(tx_ring, xsk_pool);
|
||||
else if (ice_ring_is_xdp(tx_ring))
|
||||
wd = true;
|
||||
else
|
||||
@@ -1550,6 +1551,7 @@ int ice_napi_poll(struct napi_struct *napi, int budget)
|
||||
budget_per_ring = budget;
|
||||
|
||||
ice_for_each_rx_ring(rx_ring, q_vector->rx) {
|
||||
struct xsk_buff_pool *xsk_pool = READ_ONCE(rx_ring->xsk_pool);
|
||||
int cleaned;
|
||||
|
||||
/* A dedicated path for zero-copy allows making a single
|
||||
@@ -1557,7 +1559,7 @@ int ice_napi_poll(struct napi_struct *napi, int budget)
|
||||
* ice_clean_rx_irq function and makes the codebase cleaner.
|
||||
*/
|
||||
cleaned = rx_ring->xsk_pool ?
|
||||
ice_clean_rx_irq_zc(rx_ring, budget_per_ring) :
|
||||
ice_clean_rx_irq_zc(rx_ring, xsk_pool, budget_per_ring) :
|
||||
ice_clean_rx_irq(rx_ring, budget_per_ring);
|
||||
work_done += cleaned;
|
||||
/* if we clean as many as budgeted, we must not be done */
|
||||
|
||||
@@ -52,10 +52,8 @@ static void ice_qp_reset_stats(struct ice_vsi *vsi, u16 q_idx)
|
||||
static void ice_qp_clean_rings(struct ice_vsi *vsi, u16 q_idx)
|
||||
{
|
||||
ice_clean_tx_ring(vsi->tx_rings[q_idx]);
|
||||
if (ice_is_xdp_ena_vsi(vsi)) {
|
||||
synchronize_rcu();
|
||||
if (ice_is_xdp_ena_vsi(vsi))
|
||||
ice_clean_tx_ring(vsi->xdp_rings[q_idx]);
|
||||
}
|
||||
ice_clean_rx_ring(vsi->rx_rings[q_idx]);
|
||||
}
|
||||
|
||||
@@ -112,25 +110,29 @@ ice_qvec_dis_irq(struct ice_vsi *vsi, struct ice_rx_ring *rx_ring,
|
||||
* ice_qvec_cfg_msix - Enable IRQ for given queue vector
|
||||
* @vsi: the VSI that contains queue vector
|
||||
* @q_vector: queue vector
|
||||
* @qid: queue index
|
||||
*/
|
||||
static void
|
||||
ice_qvec_cfg_msix(struct ice_vsi *vsi, struct ice_q_vector *q_vector)
|
||||
ice_qvec_cfg_msix(struct ice_vsi *vsi, struct ice_q_vector *q_vector, u16 qid)
|
||||
{
|
||||
u16 reg_idx = q_vector->reg_idx;
|
||||
struct ice_pf *pf = vsi->back;
|
||||
struct ice_hw *hw = &pf->hw;
|
||||
struct ice_tx_ring *tx_ring;
|
||||
struct ice_rx_ring *rx_ring;
|
||||
int q, _qid = qid;
|
||||
|
||||
ice_cfg_itr(hw, q_vector);
|
||||
|
||||
ice_for_each_tx_ring(tx_ring, q_vector->tx)
|
||||
ice_cfg_txq_interrupt(vsi, tx_ring->reg_idx, reg_idx,
|
||||
q_vector->tx.itr_idx);
|
||||
for (q = 0; q < q_vector->num_ring_tx; q++) {
|
||||
ice_cfg_txq_interrupt(vsi, _qid, reg_idx, q_vector->tx.itr_idx);
|
||||
_qid++;
|
||||
}
|
||||
|
||||
ice_for_each_rx_ring(rx_ring, q_vector->rx)
|
||||
ice_cfg_rxq_interrupt(vsi, rx_ring->reg_idx, reg_idx,
|
||||
q_vector->rx.itr_idx);
|
||||
_qid = qid;
|
||||
|
||||
for (q = 0; q < q_vector->num_ring_rx; q++) {
|
||||
ice_cfg_rxq_interrupt(vsi, _qid, reg_idx, q_vector->rx.itr_idx);
|
||||
_qid++;
|
||||
}
|
||||
|
||||
ice_flush(hw);
|
||||
}
|
||||
@@ -164,6 +166,7 @@ static int ice_qp_dis(struct ice_vsi *vsi, u16 q_idx)
|
||||
struct ice_tx_ring *tx_ring;
|
||||
struct ice_rx_ring *rx_ring;
|
||||
int timeout = 50;
|
||||
int fail = 0;
|
||||
int err;
|
||||
|
||||
if (q_idx >= vsi->num_rxq || q_idx >= vsi->num_txq)
|
||||
@@ -180,15 +183,17 @@ static int ice_qp_dis(struct ice_vsi *vsi, u16 q_idx)
|
||||
usleep_range(1000, 2000);
|
||||
}
|
||||
|
||||
synchronize_net();
|
||||
netif_carrier_off(vsi->netdev);
|
||||
netif_tx_stop_queue(netdev_get_tx_queue(vsi->netdev, q_idx));
|
||||
|
||||
ice_qvec_dis_irq(vsi, rx_ring, q_vector);
|
||||
ice_qvec_toggle_napi(vsi, q_vector, false);
|
||||
|
||||
netif_tx_stop_queue(netdev_get_tx_queue(vsi->netdev, q_idx));
|
||||
|
||||
ice_fill_txq_meta(vsi, tx_ring, &txq_meta);
|
||||
err = ice_vsi_stop_tx_ring(vsi, ICE_NO_RESET, 0, tx_ring, &txq_meta);
|
||||
if (err)
|
||||
return err;
|
||||
if (!fail)
|
||||
fail = err;
|
||||
if (ice_is_xdp_ena_vsi(vsi)) {
|
||||
struct ice_tx_ring *xdp_ring = vsi->xdp_rings[q_idx];
|
||||
|
||||
@@ -196,17 +201,15 @@ static int ice_qp_dis(struct ice_vsi *vsi, u16 q_idx)
|
||||
ice_fill_txq_meta(vsi, xdp_ring, &txq_meta);
|
||||
err = ice_vsi_stop_tx_ring(vsi, ICE_NO_RESET, 0, xdp_ring,
|
||||
&txq_meta);
|
||||
if (err)
|
||||
return err;
|
||||
if (!fail)
|
||||
fail = err;
|
||||
}
|
||||
err = ice_vsi_ctrl_one_rx_ring(vsi, false, q_idx, true);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
ice_vsi_ctrl_one_rx_ring(vsi, false, q_idx, false);
|
||||
ice_qp_clean_rings(vsi, q_idx);
|
||||
ice_qp_reset_stats(vsi, q_idx);
|
||||
|
||||
return 0;
|
||||
return fail;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -219,40 +222,48 @@ static int ice_qp_dis(struct ice_vsi *vsi, u16 q_idx)
|
||||
static int ice_qp_ena(struct ice_vsi *vsi, u16 q_idx)
|
||||
{
|
||||
struct ice_q_vector *q_vector;
|
||||
int fail = 0;
|
||||
bool link_up;
|
||||
int err;
|
||||
|
||||
err = ice_vsi_cfg_single_txq(vsi, vsi->tx_rings, q_idx);
|
||||
if (err)
|
||||
return err;
|
||||
if (!fail)
|
||||
fail = err;
|
||||
|
||||
if (ice_is_xdp_ena_vsi(vsi)) {
|
||||
struct ice_tx_ring *xdp_ring = vsi->xdp_rings[q_idx];
|
||||
|
||||
err = ice_vsi_cfg_single_txq(vsi, vsi->xdp_rings, q_idx);
|
||||
if (err)
|
||||
return err;
|
||||
if (!fail)
|
||||
fail = err;
|
||||
ice_set_ring_xdp(xdp_ring);
|
||||
ice_tx_xsk_pool(vsi, q_idx);
|
||||
}
|
||||
|
||||
err = ice_vsi_cfg_single_rxq(vsi, q_idx);
|
||||
if (err)
|
||||
return err;
|
||||
if (!fail)
|
||||
fail = err;
|
||||
|
||||
q_vector = vsi->rx_rings[q_idx]->q_vector;
|
||||
ice_qvec_cfg_msix(vsi, q_vector);
|
||||
ice_qvec_cfg_msix(vsi, q_vector, q_idx);
|
||||
|
||||
err = ice_vsi_ctrl_one_rx_ring(vsi, true, q_idx, true);
|
||||
if (err)
|
||||
return err;
|
||||
if (!fail)
|
||||
fail = err;
|
||||
|
||||
ice_qvec_toggle_napi(vsi, q_vector, true);
|
||||
ice_qvec_ena_irq(vsi, q_vector);
|
||||
|
||||
netif_tx_start_queue(netdev_get_tx_queue(vsi->netdev, q_idx));
|
||||
/* make sure NAPI sees updated ice_{t,x}_ring::xsk_pool */
|
||||
synchronize_net();
|
||||
ice_get_link_status(vsi->port_info, &link_up);
|
||||
if (link_up) {
|
||||
netif_tx_start_queue(netdev_get_tx_queue(vsi->netdev, q_idx));
|
||||
netif_carrier_on(vsi->netdev);
|
||||
}
|
||||
clear_bit(ICE_CFG_BUSY, vsi->state);
|
||||
|
||||
return 0;
|
||||
return fail;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -459,6 +470,7 @@ static u16 ice_fill_rx_descs(struct xsk_buff_pool *pool, struct xdp_buff **xdp,
|
||||
/**
|
||||
* __ice_alloc_rx_bufs_zc - allocate a number of Rx buffers
|
||||
* @rx_ring: Rx ring
|
||||
* @xsk_pool: XSK buffer pool to pick buffers to be filled by HW
|
||||
* @count: The number of buffers to allocate
|
||||
*
|
||||
* Place the @count of descriptors onto Rx ring. Handle the ring wrap
|
||||
@@ -467,7 +479,8 @@ static u16 ice_fill_rx_descs(struct xsk_buff_pool *pool, struct xdp_buff **xdp,
|
||||
*
|
||||
* Returns true if all allocations were successful, false if any fail.
|
||||
*/
|
||||
static bool __ice_alloc_rx_bufs_zc(struct ice_rx_ring *rx_ring, u16 count)
|
||||
static bool __ice_alloc_rx_bufs_zc(struct ice_rx_ring *rx_ring,
|
||||
struct xsk_buff_pool *xsk_pool, u16 count)
|
||||
{
|
||||
u32 nb_buffs_extra = 0, nb_buffs = 0;
|
||||
union ice_32b_rx_flex_desc *rx_desc;
|
||||
@@ -479,8 +492,7 @@ static bool __ice_alloc_rx_bufs_zc(struct ice_rx_ring *rx_ring, u16 count)
|
||||
xdp = ice_xdp_buf(rx_ring, ntu);
|
||||
|
||||
if (ntu + count >= rx_ring->count) {
|
||||
nb_buffs_extra = ice_fill_rx_descs(rx_ring->xsk_pool, xdp,
|
||||
rx_desc,
|
||||
nb_buffs_extra = ice_fill_rx_descs(xsk_pool, xdp, rx_desc,
|
||||
rx_ring->count - ntu);
|
||||
if (nb_buffs_extra != rx_ring->count - ntu) {
|
||||
ntu += nb_buffs_extra;
|
||||
@@ -493,7 +505,7 @@ static bool __ice_alloc_rx_bufs_zc(struct ice_rx_ring *rx_ring, u16 count)
|
||||
ice_release_rx_desc(rx_ring, 0);
|
||||
}
|
||||
|
||||
nb_buffs = ice_fill_rx_descs(rx_ring->xsk_pool, xdp, rx_desc, count);
|
||||
nb_buffs = ice_fill_rx_descs(xsk_pool, xdp, rx_desc, count);
|
||||
|
||||
ntu += nb_buffs;
|
||||
if (ntu == rx_ring->count)
|
||||
@@ -509,6 +521,7 @@ exit:
|
||||
/**
|
||||
* ice_alloc_rx_bufs_zc - allocate a number of Rx buffers
|
||||
* @rx_ring: Rx ring
|
||||
* @xsk_pool: XSK buffer pool to pick buffers to be filled by HW
|
||||
* @count: The number of buffers to allocate
|
||||
*
|
||||
* Wrapper for internal allocation routine; figure out how many tail
|
||||
@@ -516,7 +529,8 @@ exit:
|
||||
*
|
||||
* Returns true if all calls to internal alloc routine succeeded
|
||||
*/
|
||||
bool ice_alloc_rx_bufs_zc(struct ice_rx_ring *rx_ring, u16 count)
|
||||
bool ice_alloc_rx_bufs_zc(struct ice_rx_ring *rx_ring,
|
||||
struct xsk_buff_pool *xsk_pool, u16 count)
|
||||
{
|
||||
u16 rx_thresh = ICE_RING_QUARTER(rx_ring);
|
||||
u16 leftover, i, tail_bumps;
|
||||
@@ -525,9 +539,9 @@ bool ice_alloc_rx_bufs_zc(struct ice_rx_ring *rx_ring, u16 count)
|
||||
leftover = count - (tail_bumps * rx_thresh);
|
||||
|
||||
for (i = 0; i < tail_bumps; i++)
|
||||
if (!__ice_alloc_rx_bufs_zc(rx_ring, rx_thresh))
|
||||
if (!__ice_alloc_rx_bufs_zc(rx_ring, xsk_pool, rx_thresh))
|
||||
return false;
|
||||
return __ice_alloc_rx_bufs_zc(rx_ring, leftover);
|
||||
return __ice_alloc_rx_bufs_zc(rx_ring, xsk_pool, leftover);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -596,8 +610,10 @@ out:
|
||||
/**
|
||||
* ice_clean_xdp_irq_zc - produce AF_XDP descriptors to CQ
|
||||
* @xdp_ring: XDP Tx ring
|
||||
* @xsk_pool: AF_XDP buffer pool pointer
|
||||
*/
|
||||
static u32 ice_clean_xdp_irq_zc(struct ice_tx_ring *xdp_ring)
|
||||
static u32 ice_clean_xdp_irq_zc(struct ice_tx_ring *xdp_ring,
|
||||
struct xsk_buff_pool *xsk_pool)
|
||||
{
|
||||
u16 ntc = xdp_ring->next_to_clean;
|
||||
struct ice_tx_desc *tx_desc;
|
||||
@@ -648,7 +664,7 @@ skip:
|
||||
if (xdp_ring->next_to_clean >= cnt)
|
||||
xdp_ring->next_to_clean -= cnt;
|
||||
if (xsk_frames)
|
||||
xsk_tx_completed(xdp_ring->xsk_pool, xsk_frames);
|
||||
xsk_tx_completed(xsk_pool, xsk_frames);
|
||||
|
||||
return completed_frames;
|
||||
}
|
||||
@@ -657,6 +673,7 @@ skip:
|
||||
* ice_xmit_xdp_tx_zc - AF_XDP ZC handler for XDP_TX
|
||||
* @xdp: XDP buffer to xmit
|
||||
* @xdp_ring: XDP ring to produce descriptor onto
|
||||
* @xsk_pool: AF_XDP buffer pool pointer
|
||||
*
|
||||
* note that this function works directly on xdp_buff, no need to convert
|
||||
* it to xdp_frame. xdp_buff pointer is stored to ice_tx_buf so that cleaning
|
||||
@@ -666,7 +683,8 @@ skip:
|
||||
* was not enough space on XDP ring
|
||||
*/
|
||||
static int ice_xmit_xdp_tx_zc(struct xdp_buff *xdp,
|
||||
struct ice_tx_ring *xdp_ring)
|
||||
struct ice_tx_ring *xdp_ring,
|
||||
struct xsk_buff_pool *xsk_pool)
|
||||
{
|
||||
struct skb_shared_info *sinfo = NULL;
|
||||
u32 size = xdp->data_end - xdp->data;
|
||||
@@ -680,7 +698,7 @@ static int ice_xmit_xdp_tx_zc(struct xdp_buff *xdp,
|
||||
|
||||
free_space = ICE_DESC_UNUSED(xdp_ring);
|
||||
if (free_space < ICE_RING_QUARTER(xdp_ring))
|
||||
free_space += ice_clean_xdp_irq_zc(xdp_ring);
|
||||
free_space += ice_clean_xdp_irq_zc(xdp_ring, xsk_pool);
|
||||
|
||||
if (unlikely(!free_space))
|
||||
goto busy;
|
||||
@@ -700,7 +718,7 @@ static int ice_xmit_xdp_tx_zc(struct xdp_buff *xdp,
|
||||
dma_addr_t dma;
|
||||
|
||||
dma = xsk_buff_xdp_get_dma(xdp);
|
||||
xsk_buff_raw_dma_sync_for_device(xdp_ring->xsk_pool, dma, size);
|
||||
xsk_buff_raw_dma_sync_for_device(xsk_pool, dma, size);
|
||||
|
||||
tx_buf->xdp = xdp;
|
||||
tx_buf->type = ICE_TX_BUF_XSK_TX;
|
||||
@@ -742,12 +760,14 @@ busy:
|
||||
* @xdp: xdp_buff used as input to the XDP program
|
||||
* @xdp_prog: XDP program to run
|
||||
* @xdp_ring: ring to be used for XDP_TX action
|
||||
* @xsk_pool: AF_XDP buffer pool pointer
|
||||
*
|
||||
* Returns any of ICE_XDP_{PASS, CONSUMED, TX, REDIR}
|
||||
*/
|
||||
static int
|
||||
ice_run_xdp_zc(struct ice_rx_ring *rx_ring, struct xdp_buff *xdp,
|
||||
struct bpf_prog *xdp_prog, struct ice_tx_ring *xdp_ring)
|
||||
struct bpf_prog *xdp_prog, struct ice_tx_ring *xdp_ring,
|
||||
struct xsk_buff_pool *xsk_pool)
|
||||
{
|
||||
int err, result = ICE_XDP_PASS;
|
||||
u32 act;
|
||||
@@ -758,7 +778,7 @@ ice_run_xdp_zc(struct ice_rx_ring *rx_ring, struct xdp_buff *xdp,
|
||||
err = xdp_do_redirect(rx_ring->netdev, xdp, xdp_prog);
|
||||
if (!err)
|
||||
return ICE_XDP_REDIR;
|
||||
if (xsk_uses_need_wakeup(rx_ring->xsk_pool) && err == -ENOBUFS)
|
||||
if (xsk_uses_need_wakeup(xsk_pool) && err == -ENOBUFS)
|
||||
result = ICE_XDP_EXIT;
|
||||
else
|
||||
result = ICE_XDP_CONSUMED;
|
||||
@@ -769,7 +789,7 @@ ice_run_xdp_zc(struct ice_rx_ring *rx_ring, struct xdp_buff *xdp,
|
||||
case XDP_PASS:
|
||||
break;
|
||||
case XDP_TX:
|
||||
result = ice_xmit_xdp_tx_zc(xdp, xdp_ring);
|
||||
result = ice_xmit_xdp_tx_zc(xdp, xdp_ring, xsk_pool);
|
||||
if (result == ICE_XDP_CONSUMED)
|
||||
goto out_failure;
|
||||
break;
|
||||
@@ -821,14 +841,16 @@ ice_add_xsk_frag(struct ice_rx_ring *rx_ring, struct xdp_buff *first,
|
||||
/**
|
||||
* ice_clean_rx_irq_zc - consumes packets from the hardware ring
|
||||
* @rx_ring: AF_XDP Rx ring
|
||||
* @xsk_pool: AF_XDP buffer pool pointer
|
||||
* @budget: NAPI budget
|
||||
*
|
||||
* Returns number of processed packets on success, remaining budget on failure.
|
||||
*/
|
||||
int ice_clean_rx_irq_zc(struct ice_rx_ring *rx_ring, int budget)
|
||||
int ice_clean_rx_irq_zc(struct ice_rx_ring *rx_ring,
|
||||
struct xsk_buff_pool *xsk_pool,
|
||||
int budget)
|
||||
{
|
||||
unsigned int total_rx_bytes = 0, total_rx_packets = 0;
|
||||
struct xsk_buff_pool *xsk_pool = rx_ring->xsk_pool;
|
||||
u32 ntc = rx_ring->next_to_clean;
|
||||
u32 ntu = rx_ring->next_to_use;
|
||||
struct xdp_buff *first = NULL;
|
||||
@@ -891,7 +913,8 @@ int ice_clean_rx_irq_zc(struct ice_rx_ring *rx_ring, int budget)
|
||||
if (ice_is_non_eop(rx_ring, rx_desc))
|
||||
continue;
|
||||
|
||||
xdp_res = ice_run_xdp_zc(rx_ring, first, xdp_prog, xdp_ring);
|
||||
xdp_res = ice_run_xdp_zc(rx_ring, first, xdp_prog, xdp_ring,
|
||||
xsk_pool);
|
||||
if (likely(xdp_res & (ICE_XDP_TX | ICE_XDP_REDIR))) {
|
||||
xdp_xmit |= xdp_res;
|
||||
} else if (xdp_res == ICE_XDP_EXIT) {
|
||||
@@ -940,7 +963,8 @@ construct_skb:
|
||||
rx_ring->next_to_clean = ntc;
|
||||
entries_to_alloc = ICE_RX_DESC_UNUSED(rx_ring);
|
||||
if (entries_to_alloc > ICE_RING_QUARTER(rx_ring))
|
||||
failure |= !ice_alloc_rx_bufs_zc(rx_ring, entries_to_alloc);
|
||||
failure |= !ice_alloc_rx_bufs_zc(rx_ring, xsk_pool,
|
||||
entries_to_alloc);
|
||||
|
||||
ice_finalize_xdp_rx(xdp_ring, xdp_xmit, 0);
|
||||
ice_update_rx_ring_stats(rx_ring, total_rx_packets, total_rx_bytes);
|
||||
@@ -963,17 +987,19 @@ construct_skb:
|
||||
/**
|
||||
* ice_xmit_pkt - produce a single HW Tx descriptor out of AF_XDP descriptor
|
||||
* @xdp_ring: XDP ring to produce the HW Tx descriptor on
|
||||
* @xsk_pool: XSK buffer pool to pick buffers to be consumed by HW
|
||||
* @desc: AF_XDP descriptor to pull the DMA address and length from
|
||||
* @total_bytes: bytes accumulator that will be used for stats update
|
||||
*/
|
||||
static void ice_xmit_pkt(struct ice_tx_ring *xdp_ring, struct xdp_desc *desc,
|
||||
static void ice_xmit_pkt(struct ice_tx_ring *xdp_ring,
|
||||
struct xsk_buff_pool *xsk_pool, struct xdp_desc *desc,
|
||||
unsigned int *total_bytes)
|
||||
{
|
||||
struct ice_tx_desc *tx_desc;
|
||||
dma_addr_t dma;
|
||||
|
||||
dma = xsk_buff_raw_get_dma(xdp_ring->xsk_pool, desc->addr);
|
||||
xsk_buff_raw_dma_sync_for_device(xdp_ring->xsk_pool, dma, desc->len);
|
||||
dma = xsk_buff_raw_get_dma(xsk_pool, desc->addr);
|
||||
xsk_buff_raw_dma_sync_for_device(xsk_pool, dma, desc->len);
|
||||
|
||||
tx_desc = ICE_TX_DESC(xdp_ring, xdp_ring->next_to_use++);
|
||||
tx_desc->buf_addr = cpu_to_le64(dma);
|
||||
@@ -986,10 +1012,13 @@ static void ice_xmit_pkt(struct ice_tx_ring *xdp_ring, struct xdp_desc *desc,
|
||||
/**
|
||||
* ice_xmit_pkt_batch - produce a batch of HW Tx descriptors out of AF_XDP descriptors
|
||||
* @xdp_ring: XDP ring to produce the HW Tx descriptors on
|
||||
* @xsk_pool: XSK buffer pool to pick buffers to be consumed by HW
|
||||
* @descs: AF_XDP descriptors to pull the DMA addresses and lengths from
|
||||
* @total_bytes: bytes accumulator that will be used for stats update
|
||||
*/
|
||||
static void ice_xmit_pkt_batch(struct ice_tx_ring *xdp_ring, struct xdp_desc *descs,
|
||||
static void ice_xmit_pkt_batch(struct ice_tx_ring *xdp_ring,
|
||||
struct xsk_buff_pool *xsk_pool,
|
||||
struct xdp_desc *descs,
|
||||
unsigned int *total_bytes)
|
||||
{
|
||||
u16 ntu = xdp_ring->next_to_use;
|
||||
@@ -999,8 +1028,8 @@ static void ice_xmit_pkt_batch(struct ice_tx_ring *xdp_ring, struct xdp_desc *de
|
||||
loop_unrolled_for(i = 0; i < PKTS_PER_BATCH; i++) {
|
||||
dma_addr_t dma;
|
||||
|
||||
dma = xsk_buff_raw_get_dma(xdp_ring->xsk_pool, descs[i].addr);
|
||||
xsk_buff_raw_dma_sync_for_device(xdp_ring->xsk_pool, dma, descs[i].len);
|
||||
dma = xsk_buff_raw_get_dma(xsk_pool, descs[i].addr);
|
||||
xsk_buff_raw_dma_sync_for_device(xsk_pool, dma, descs[i].len);
|
||||
|
||||
tx_desc = ICE_TX_DESC(xdp_ring, ntu++);
|
||||
tx_desc->buf_addr = cpu_to_le64(dma);
|
||||
@@ -1016,60 +1045,69 @@ static void ice_xmit_pkt_batch(struct ice_tx_ring *xdp_ring, struct xdp_desc *de
|
||||
/**
|
||||
* ice_fill_tx_hw_ring - produce the number of Tx descriptors onto ring
|
||||
* @xdp_ring: XDP ring to produce the HW Tx descriptors on
|
||||
* @xsk_pool: XSK buffer pool to pick buffers to be consumed by HW
|
||||
* @descs: AF_XDP descriptors to pull the DMA addresses and lengths from
|
||||
* @nb_pkts: count of packets to be send
|
||||
* @total_bytes: bytes accumulator that will be used for stats update
|
||||
*/
|
||||
static void ice_fill_tx_hw_ring(struct ice_tx_ring *xdp_ring, struct xdp_desc *descs,
|
||||
u32 nb_pkts, unsigned int *total_bytes)
|
||||
static void ice_fill_tx_hw_ring(struct ice_tx_ring *xdp_ring,
|
||||
struct xsk_buff_pool *xsk_pool,
|
||||
struct xdp_desc *descs, u32 nb_pkts,
|
||||
unsigned int *total_bytes)
|
||||
{
|
||||
u32 batched, leftover, i;
|
||||
|
||||
batched = ALIGN_DOWN(nb_pkts, PKTS_PER_BATCH);
|
||||
leftover = nb_pkts & (PKTS_PER_BATCH - 1);
|
||||
for (i = 0; i < batched; i += PKTS_PER_BATCH)
|
||||
ice_xmit_pkt_batch(xdp_ring, &descs[i], total_bytes);
|
||||
ice_xmit_pkt_batch(xdp_ring, xsk_pool, &descs[i], total_bytes);
|
||||
for (; i < batched + leftover; i++)
|
||||
ice_xmit_pkt(xdp_ring, &descs[i], total_bytes);
|
||||
ice_xmit_pkt(xdp_ring, xsk_pool, &descs[i], total_bytes);
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_xmit_zc - take entries from XSK Tx ring and place them onto HW Tx ring
|
||||
* @xdp_ring: XDP ring to produce the HW Tx descriptors on
|
||||
* @xsk_pool: AF_XDP buffer pool pointer
|
||||
*
|
||||
* Returns true if there is no more work that needs to be done, false otherwise
|
||||
*/
|
||||
bool ice_xmit_zc(struct ice_tx_ring *xdp_ring)
|
||||
bool ice_xmit_zc(struct ice_tx_ring *xdp_ring, struct xsk_buff_pool *xsk_pool)
|
||||
{
|
||||
struct xdp_desc *descs = xdp_ring->xsk_pool->tx_descs;
|
||||
struct xdp_desc *descs = xsk_pool->tx_descs;
|
||||
u32 nb_pkts, nb_processed = 0;
|
||||
unsigned int total_bytes = 0;
|
||||
int budget;
|
||||
|
||||
ice_clean_xdp_irq_zc(xdp_ring);
|
||||
ice_clean_xdp_irq_zc(xdp_ring, xsk_pool);
|
||||
|
||||
if (!netif_carrier_ok(xdp_ring->vsi->netdev) ||
|
||||
!netif_running(xdp_ring->vsi->netdev))
|
||||
return true;
|
||||
|
||||
budget = ICE_DESC_UNUSED(xdp_ring);
|
||||
budget = min_t(u16, budget, ICE_RING_QUARTER(xdp_ring));
|
||||
|
||||
nb_pkts = xsk_tx_peek_release_desc_batch(xdp_ring->xsk_pool, budget);
|
||||
nb_pkts = xsk_tx_peek_release_desc_batch(xsk_pool, budget);
|
||||
if (!nb_pkts)
|
||||
return true;
|
||||
|
||||
if (xdp_ring->next_to_use + nb_pkts >= xdp_ring->count) {
|
||||
nb_processed = xdp_ring->count - xdp_ring->next_to_use;
|
||||
ice_fill_tx_hw_ring(xdp_ring, descs, nb_processed, &total_bytes);
|
||||
ice_fill_tx_hw_ring(xdp_ring, xsk_pool, descs, nb_processed,
|
||||
&total_bytes);
|
||||
xdp_ring->next_to_use = 0;
|
||||
}
|
||||
|
||||
ice_fill_tx_hw_ring(xdp_ring, &descs[nb_processed], nb_pkts - nb_processed,
|
||||
&total_bytes);
|
||||
ice_fill_tx_hw_ring(xdp_ring, xsk_pool, &descs[nb_processed],
|
||||
nb_pkts - nb_processed, &total_bytes);
|
||||
|
||||
ice_set_rs_bit(xdp_ring);
|
||||
ice_xdp_ring_update_tail(xdp_ring);
|
||||
ice_update_tx_ring_stats(xdp_ring, nb_pkts, total_bytes);
|
||||
|
||||
if (xsk_uses_need_wakeup(xdp_ring->xsk_pool))
|
||||
xsk_set_tx_need_wakeup(xdp_ring->xsk_pool);
|
||||
if (xsk_uses_need_wakeup(xsk_pool))
|
||||
xsk_set_tx_need_wakeup(xsk_pool);
|
||||
|
||||
return nb_pkts < budget;
|
||||
}
|
||||
@@ -1091,7 +1129,7 @@ ice_xsk_wakeup(struct net_device *netdev, u32 queue_id,
|
||||
struct ice_vsi *vsi = np->vsi;
|
||||
struct ice_tx_ring *ring;
|
||||
|
||||
if (test_bit(ICE_VSI_DOWN, vsi->state))
|
||||
if (test_bit(ICE_VSI_DOWN, vsi->state) || !netif_carrier_ok(netdev))
|
||||
return -ENETDOWN;
|
||||
|
||||
if (!ice_is_xdp_ena_vsi(vsi))
|
||||
@@ -1102,7 +1140,7 @@ ice_xsk_wakeup(struct net_device *netdev, u32 queue_id,
|
||||
|
||||
ring = vsi->rx_rings[queue_id]->xdp_ring;
|
||||
|
||||
if (!ring->xsk_pool)
|
||||
if (!READ_ONCE(ring->xsk_pool))
|
||||
return -EINVAL;
|
||||
|
||||
/* The idea here is that if NAPI is running, mark a miss, so
|
||||
|
||||
@@ -20,16 +20,20 @@ struct ice_vsi;
|
||||
#ifdef CONFIG_XDP_SOCKETS
|
||||
int ice_xsk_pool_setup(struct ice_vsi *vsi, struct xsk_buff_pool *pool,
|
||||
u16 qid);
|
||||
int ice_clean_rx_irq_zc(struct ice_rx_ring *rx_ring, int budget);
|
||||
int ice_clean_rx_irq_zc(struct ice_rx_ring *rx_ring,
|
||||
struct xsk_buff_pool *xsk_pool,
|
||||
int budget);
|
||||
int ice_xsk_wakeup(struct net_device *netdev, u32 queue_id, u32 flags);
|
||||
bool ice_alloc_rx_bufs_zc(struct ice_rx_ring *rx_ring, u16 count);
|
||||
bool ice_alloc_rx_bufs_zc(struct ice_rx_ring *rx_ring,
|
||||
struct xsk_buff_pool *xsk_pool, u16 count);
|
||||
bool ice_xsk_any_rx_ring_ena(struct ice_vsi *vsi);
|
||||
void ice_xsk_clean_rx_ring(struct ice_rx_ring *rx_ring);
|
||||
void ice_xsk_clean_xdp_ring(struct ice_tx_ring *xdp_ring);
|
||||
bool ice_xmit_zc(struct ice_tx_ring *xdp_ring);
|
||||
bool ice_xmit_zc(struct ice_tx_ring *xdp_ring, struct xsk_buff_pool *xsk_pool);
|
||||
int ice_realloc_zc_buf(struct ice_vsi *vsi, bool zc);
|
||||
#else
|
||||
static inline bool ice_xmit_zc(struct ice_tx_ring __always_unused *xdp_ring)
|
||||
static inline bool ice_xmit_zc(struct ice_tx_ring __always_unused *xdp_ring,
|
||||
struct xsk_buff_pool __always_unused *xsk_pool)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -44,6 +48,7 @@ ice_xsk_pool_setup(struct ice_vsi __always_unused *vsi,
|
||||
|
||||
static inline int
|
||||
ice_clean_rx_irq_zc(struct ice_rx_ring __always_unused *rx_ring,
|
||||
struct xsk_buff_pool __always_unused *xsk_pool,
|
||||
int __always_unused budget)
|
||||
{
|
||||
return 0;
|
||||
@@ -51,6 +56,7 @@ ice_clean_rx_irq_zc(struct ice_rx_ring __always_unused *rx_ring,
|
||||
|
||||
static inline bool
|
||||
ice_alloc_rx_bufs_zc(struct ice_rx_ring __always_unused *rx_ring,
|
||||
struct xsk_buff_pool __always_unused *xsk_pool,
|
||||
u16 __always_unused count)
|
||||
{
|
||||
return false;
|
||||
|
||||
@@ -6306,21 +6306,6 @@ static int igc_save_qbv_schedule(struct igc_adapter *adapter,
|
||||
size_t n;
|
||||
int i;
|
||||
|
||||
switch (qopt->cmd) {
|
||||
case TAPRIO_CMD_REPLACE:
|
||||
break;
|
||||
case TAPRIO_CMD_DESTROY:
|
||||
return igc_tsn_clear_schedule(adapter);
|
||||
case TAPRIO_CMD_STATS:
|
||||
igc_taprio_stats(adapter->netdev, &qopt->stats);
|
||||
return 0;
|
||||
case TAPRIO_CMD_QUEUE_STATS:
|
||||
igc_taprio_queue_stats(adapter->netdev, &qopt->queue_stats);
|
||||
return 0;
|
||||
default:
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
if (qopt->base_time < 0)
|
||||
return -ERANGE;
|
||||
|
||||
@@ -6429,7 +6414,23 @@ static int igc_tsn_enable_qbv_scheduling(struct igc_adapter *adapter,
|
||||
if (hw->mac.type != igc_i225)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
err = igc_save_qbv_schedule(adapter, qopt);
|
||||
switch (qopt->cmd) {
|
||||
case TAPRIO_CMD_REPLACE:
|
||||
err = igc_save_qbv_schedule(adapter, qopt);
|
||||
break;
|
||||
case TAPRIO_CMD_DESTROY:
|
||||
err = igc_tsn_clear_schedule(adapter);
|
||||
break;
|
||||
case TAPRIO_CMD_STATS:
|
||||
igc_taprio_stats(adapter->netdev, &qopt->stats);
|
||||
return 0;
|
||||
case TAPRIO_CMD_QUEUE_STATS:
|
||||
igc_taprio_queue_stats(adapter->netdev, &qopt->queue_stats);
|
||||
return 0;
|
||||
default:
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
||||
@@ -953,13 +953,13 @@ static void mvpp2_bm_pool_update_fc(struct mvpp2_port *port,
|
||||
static void mvpp2_bm_pool_update_priv_fc(struct mvpp2 *priv, bool en)
|
||||
{
|
||||
struct mvpp2_port *port;
|
||||
int i;
|
||||
int i, j;
|
||||
|
||||
for (i = 0; i < priv->port_count; i++) {
|
||||
port = priv->port_list[i];
|
||||
if (port->priv->percpu_pools) {
|
||||
for (i = 0; i < port->nrxqs; i++)
|
||||
mvpp2_bm_pool_update_fc(port, &port->priv->bm_pools[i],
|
||||
for (j = 0; j < port->nrxqs; j++)
|
||||
mvpp2_bm_pool_update_fc(port, &port->priv->bm_pools[j],
|
||||
port->tx_fc & en);
|
||||
} else {
|
||||
mvpp2_bm_pool_update_fc(port, port->pool_long, port->tx_fc & en);
|
||||
|
||||
@@ -932,6 +932,7 @@ err_rule:
|
||||
mlx5_tc_ct_entry_destroy_mod_hdr(ct_priv, zone_rule->attr, mh);
|
||||
mlx5_put_label_mapping(ct_priv, attr->ct_attr.ct_labels_id);
|
||||
err_mod_hdr:
|
||||
*attr = *old_attr;
|
||||
kfree(old_attr);
|
||||
err_attr:
|
||||
kvfree(spec);
|
||||
|
||||
@@ -51,9 +51,10 @@ u32 mlx5_ipsec_device_caps(struct mlx5_core_dev *mdev)
|
||||
MLX5_CAP_FLOWTABLE_NIC_RX(mdev, decap))
|
||||
caps |= MLX5_IPSEC_CAP_PACKET_OFFLOAD;
|
||||
|
||||
if ((MLX5_CAP_FLOWTABLE_NIC_TX(mdev, ignore_flow_level) &&
|
||||
MLX5_CAP_FLOWTABLE_NIC_RX(mdev, ignore_flow_level)) ||
|
||||
MLX5_CAP_ESW_FLOWTABLE_FDB(mdev, ignore_flow_level))
|
||||
if (IS_ENABLED(CONFIG_MLX5_CLS_ACT) &&
|
||||
((MLX5_CAP_FLOWTABLE_NIC_TX(mdev, ignore_flow_level) &&
|
||||
MLX5_CAP_FLOWTABLE_NIC_RX(mdev, ignore_flow_level)) ||
|
||||
MLX5_CAP_ESW_FLOWTABLE_FDB(mdev, ignore_flow_level)))
|
||||
caps |= MLX5_IPSEC_CAP_PRIO;
|
||||
|
||||
if (MLX5_CAP_FLOWTABLE_NIC_TX(mdev,
|
||||
|
||||
@@ -1409,7 +1409,12 @@ static int mlx5e_ethtool_set_link_ksettings(struct mlx5e_priv *priv,
|
||||
if (!an_changes && link_modes == eproto.admin)
|
||||
goto out;
|
||||
|
||||
mlx5_port_set_eth_ptys(mdev, an_disable, link_modes, ext);
|
||||
err = mlx5_port_set_eth_ptys(mdev, an_disable, link_modes, ext);
|
||||
if (err) {
|
||||
netdev_err(priv->netdev, "%s: failed to set ptys reg: %d\n", __func__, err);
|
||||
goto out;
|
||||
}
|
||||
|
||||
mlx5_toggle_port_link(mdev);
|
||||
|
||||
out:
|
||||
|
||||
@@ -207,6 +207,7 @@ int mlx5_fw_reset_set_live_patch(struct mlx5_core_dev *dev)
|
||||
static void mlx5_fw_reset_complete_reload(struct mlx5_core_dev *dev, bool unloaded)
|
||||
{
|
||||
struct mlx5_fw_reset *fw_reset = dev->priv.fw_reset;
|
||||
struct devlink *devlink = priv_to_devlink(dev);
|
||||
|
||||
/* if this is the driver that initiated the fw reset, devlink completed the reload */
|
||||
if (test_bit(MLX5_FW_RESET_FLAGS_PENDING_COMP, &fw_reset->reset_flags)) {
|
||||
@@ -218,9 +219,11 @@ static void mlx5_fw_reset_complete_reload(struct mlx5_core_dev *dev, bool unload
|
||||
mlx5_core_err(dev, "reset reload flow aborted, PCI reads still not working\n");
|
||||
else
|
||||
mlx5_load_one(dev, true);
|
||||
devlink_remote_reload_actions_performed(priv_to_devlink(dev), 0,
|
||||
devl_lock(devlink);
|
||||
devlink_remote_reload_actions_performed(devlink, 0,
|
||||
BIT(DEVLINK_RELOAD_ACTION_DRIVER_REINIT) |
|
||||
BIT(DEVLINK_RELOAD_ACTION_FW_ACTIVATE));
|
||||
devl_unlock(devlink);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user