RVU NIX AF driver updates
Subsystems (4)
v2 cover RVU NIX AF driver updates
This patch series includes a few enhancements and other updates to the RVU NIX AF driver.
The first patch adds devlink option to configure NPC MCAM high priority zone entries reservation. This is useful when the requester needs more high priority entries than default reserved entries.
The second patch adds support for RSS hash computation using L3 SRC or DST only, or L4 SRC or DST only.
The third patch updates DWRR MTU configuration for CN10KB silicon. HW uses the DWRR MTU to compute DWRR weight.
Patch 4 configures the LBK link in TL3_TL2 configuration only when switch mode is enabled.
Patch 5 adds an option in the mailbox request to enable/disable DROP_RE bit which drops packets with L2 errors when set.
Patch 6 updates SMQ flush mechanism to stop other child nodes from enqueuing any packets while SMQ flush is active. Otherwise SMQ flush may timeout.
Kiran Kumar K (1):
octeontx2-af: extend RSS supported offload types
Naveen Mamindlapalli (2):
octeontx2-af: Add devlink option to adjust mcam high prio zone entries
octeontx2-af: Set XOFF on other child transmit schedulers during SMQ
flush
Nithin Dabilpuram (1):
octeontx2-af: add option to toggle DROP_RE enable in rx cfg
Subbaraya Sundeep (1):
octeontx2-af: Enable LBK links only when switch mode is on.
Sunil Goutham (1):
octeontx2-af: cn10k: Set NIX DWRR MTU for CN10KB silicon
---
v2:
Rebased on net-next/main.
.../ethernet/marvell/octeontx2/af/common.h | 7 + .../net/ethernet/marvell/octeontx2/af/mbox.h | 11 +- .../net/ethernet/marvell/octeontx2/af/rvu.h | 20 ++ .../marvell/octeontx2/af/rvu_devlink.c | 74 +++++- .../ethernet/marvell/octeontx2/af/rvu_nix.c | 247 ++++++++++++++++-- .../ethernet/marvell/octeontx2/af/rvu_reg.h | 3 +- .../marvell/octeontx2/af/rvu_switch.c | 18 ++ .../marvell/octeontx2/nic/otx2_common.c | 18 +- .../marvell/octeontx2/nic/otx2_common.h | 1 + 9 files changed, 379 insertions(+), 20 deletions(-)
Signature · 1 line
2.39.0.198.ga38d39a4c5
PATCH v2 1/6 octeontx2-af: Add devlink option to adjust mcam high prio zone entries
The NPC MCAM entries are currently divided into three priority zones in AF driver: high, mid, and low. The high priority zone and low priority zone take up 1/8th (each) of the available MCAM entries, and remaining going to the mid priority zone.
The current allocation scheme may not meet certain requirements, such as when a requester needs more high priority zone entries than are reserved. This patch adds a devlink configurable option to increase the number of high priority zone entries that can be allocated by requester. The max number of entries that can be reserved for high priority usage is 100% of available MCAM entries.
Usage:
1) Change high priority zone percentage to 75%:
devlink -p dev param set pci/0002:01:00.0 name npc_mcam_high_zone_percent \
value 75 cmode runtime
2) Read high priority zone percentage:
devlink -p dev param show pci/0002:01:00.0 name npc_mcam_high_zone_percent
The devlink set configuration is only permitted when no MCAM entries are assigned, i.e., all MCAM entries are free, indicating that no PF/VF driver is loaded. So user must unload/unbind PF/VF driver/devices before modifying the high priority zone percentage.
--- .../marvell/octeontx2/af/rvu_devlink.c | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+)
drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c +68 -0
@@ -1438,6 +1438,7 @@ enum rvu_af_dl_param_id {RVU_AF_DEVLINK_PARAM_ID_BASE =DEVLINK_PARAM_GENERIC_ID_MAX ,RVU_AF_DEVLINK_PARAM_ID_DWRR_MTU ,RVU_AF_DEVLINK_PARAM_ID_NPC_EXACT_FEATURE_DISABLE , + RVU_AF_DEVLINK_PARAM_ID_NPC_MCAM_ZONE_PERCENT, }; static int rvu_af_npc_exact_feature_get(struct devlink *devlink, u32 id,
@@ -1494,6 +1495,67 @@ static int rvu_af_npc_exact_feature_validate(struct devlink *devlink, u32 id,return -EFAULT ; } +static int rvu_af_dl_npc_mcam_high_zone_percent_get (struct devlink *devlink,u32 id, +struct devlink_param_gset_ctx *ctx) +{ +struct rvu_devlink *rvu_dl =devlink_priv (devlink); +struct rvu *rvu = rvu_dl->rvu; +struct npc_mcam *mcam; +u32 percent; + + mcam = &rvu->hw->mcam; + percent = (mcam->hprio_count *100 ) / mcam->bmap_entries; + ctx->val.vu8 = (u8 )percent; + +return 0 ; +} + +static int rvu_af_dl_npc_mcam_high_zone_percent_set (struct devlink *devlink,u32 id, +struct devlink_param_gset_ctx *ctx) +{ +struct rvu_devlink *rvu_dl =devlink_priv (devlink); +struct rvu *rvu = rvu_dl->rvu; +struct npc_mcam *mcam; +u32 percent; + + percent = ctx->val.vu8; + mcam = &rvu->hw->mcam; + mcam->hprio_count = (mcam->bmap_entries * percent) /100 ; + mcam->hprio_end = mcam->hprio_count; + mcam->lprio_count = (mcam->bmap_entries - mcam->hprio_count) /2 ; + mcam->lprio_start = mcam->bmap_entries - mcam->lprio_count; + +return 0 ; +} + +static int rvu_af_dl_npc_mcam_high_zone_percent_validate (struct devlink *devlink,u32 id, +union devlink_param_value val, +struct netlink_ext_ack *extack) +{ +struct rvu_devlink *rvu_dl =devlink_priv (devlink); +struct rvu *rvu = rvu_dl->rvu; +struct npc_mcam *mcam; + +/* The percent of high prio zone must range from 12% to 100% of unreserved mcam space */ +if (val.vu8 <12 || val.vu8 >100 ) { +NL_SET_ERR_MSG_MOD (extack, +"mcam high zone percent must be between 12% to 100%" ); +return -EINVAL ; + } + +/* Do not allow user to modify the high priority zone entries while mcam entries +* have already been assigned. +*/ + mcam = &rvu->hw->mcam; +if (mcam->bmap_fcnt < mcam->bmap_entries) { +NL_SET_ERR_MSG_MOD (extack, +"mcam entries have already been assigned, can't resize" ); +return -EPERM ; + } + +return 0 ; +} +static const struct devlink_param rvu_af_dl_params[] = { DEVLINK_PARAM_DRIVER(RVU_AF_DEVLINK_PARAM_ID_DWRR_MTU, "dwrr_mtu", DEVLINK_PARAM_TYPE_U32,
@@ -1509,6 +1571,12 @@ static const struct devlink_param rvu_af_dl_param_exact_match[] = { rvu_af_npc_exact_feature_get, rvu_af_npc_exact_feature_disable, rvu_af_npc_exact_feature_validate), +DEVLINK_PARAM_DRIVER (RVU_AF_DEVLINK_PARAM_ID_NPC_MCAM_ZONE_PERCENT , + "npc_mcam_high_zone_percent", DEVLINK_PARAM_TYPE_U8, +BIT (DEVLINK_PARAM_CMODE_RUNTIME ), +rvu_af_dl_npc_mcam_high_zone_percent_get , +rvu_af_dl_npc_mcam_high_zone_percent_set , + rvu_af_dl_npc_mcam_high_zone_percent_validate), };/* Devlink switch mode */
Signature · 1 line
2.39.0.198.ga38d39a4c5
PATCH v2 2/6 octeontx2-af: extend RSS supported offload types
In reply to Naveen MamindlapalliFrom: Kiran Kumar K <[email protected]>
Add support to select L3 SRC or DST only, L4 SRC or DST only for RSS calculation.
AF consumer may have requirement as we can select only SRC or DST data for RSS calculation in L3, L4 layers. With this requirement there will be following combinations, IPV[4,6]_SRC_ONLY, IPV[4,6]_DST_ONLY, [TCP,UDP,SCTP]_SRC_ONLY, [TCP,UDP,SCTP]_DST_ONLY. So, instead of creating a bit for each combination, we are using upper 4 bits (31:28) in the flow_key_cfg to represent the SRC, DST selection. 31 => L3_SRC, 30 => L3_DST, 29 => L4_SRC, 28 => L4_DST. These won't be part of flow_cfg, so that we don't need to change the existing ABI.
--- .../net/ethernet/marvell/octeontx2/af/mbox.h | 6 ++ .../ethernet/marvell/octeontx2/af/rvu_nix.c | 57 +++++++++++++++++++ 2 files changed, 63 insertions(+)
drivers/net/ethernet/marvell/octeontx2/af/mbox.h +6 -0
@@ -1080,6 +1080,8 @@ struct nix_vtag_config_rsp {*/ }; +#define NIX_FLOW_KEY_TYPE_L3_L4_MASK (~(0xf << 28)) +struct nix_rss_flowkey_cfg {struct mbox_msghdr hdr;int mcam_index;/* MCAM entry index to modify */
@@ -1105,6 +1107,10 @@ struct nix_rss_flowkey_cfg {#define NIX_FLOW_KEY_TYPE_IPV4_PROTO BIT(21)#define NIX_FLOW_KEY_TYPE_AH BIT(22)#define NIX_FLOW_KEY_TYPE_ESP BIT(23) +#define NIX_FLOW_KEY_TYPE_L4_DST_ONLY BIT(28) +#define NIX_FLOW_KEY_TYPE_L4_SRC_ONLY BIT(29) +#define NIX_FLOW_KEY_TYPE_L3_DST_ONLY BIT(30) +#define NIX_FLOW_KEY_TYPE_L3_SRC_ONLY BIT(31)u32 flowkey_cfg;/* Flowkey types selected */ u8 group;/* RSS context or group */ };
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c +57 -0
87 lines not on this page · raw message
Signature · 1 line
2.39.0.198.ga38d39a4c5
PATCH v2 3/6 octeontx2-af: cn10k: Set NIX DWRR MTU for CN10KB silicon
In reply to Naveen MamindlapalliFrom: Sunil Goutham <[email protected]>
The DWRR MTU config added for SDP and RPM/LBK links on CN10K silicon is further extended on CK10KB silicon variant and made it configurable. Now there are 4 DWRR MTU config to choose while setting transmit scheduler's RR_WEIGHT.
Here we are reserving one config for each of RPM, SDP and LBK. NIXX_AF_DWRR_MTUX(0) ---> RPMNIXX_AF_DWRR_MTUX(1) ---> SDPNIXX_AF_DWRR_MTUX(2) ---> LBK
PF/VF drivers can choose the DWRR_MTU to be used by setting SMQX_CFG[pkt_link_type] to one of above. TLx_SCHEDULE[RR_WEIGHT] is to be as configured 'quantum / 2^DWRR_MTUX[MTU]'. DWRR_MTU of each link is exposed to PF/VF drivers via mailbox for RR_WEIGHT calculation.
--- .../ethernet/marvell/octeontx2/af/common.h | 7 +++ .../net/ethernet/marvell/octeontx2/af/mbox.h | 4 +- .../net/ethernet/marvell/octeontx2/af/rvu.h | 2 + .../marvell/octeontx2/af/rvu_devlink.c | 6 ++- .../ethernet/marvell/octeontx2/af/rvu_nix.c | 44 ++++++++++++++++--- .../ethernet/marvell/octeontx2/af/rvu_reg.h | 3 +- .../marvell/octeontx2/nic/otx2_common.c | 18 +++++++- .../marvell/octeontx2/nic/otx2_common.h | 1 + 8 files changed, 73 insertions(+), 12 deletions(-)
drivers/net/ethernet/marvell/octeontx2/af/common.h +7 -0
@@ -145,6 +145,13 @@ enum nix_scheduler {#define TXSCH_TL1_DFLT_RR_PRIO (0x7ull)#define CN10K_MAX_DWRR_WEIGHT 16384/* Weight is 14bit on CN10K */ +/* Don't change the order as on CN10K (except CN10KB) +* SMQX_CFG[SDP] value should be 1 for SDP flows. +*/ +#define SMQ_LINK_TYPE_RPM 0 +#define SMQ_LINK_TYPE_SDP 1 +#define SMQ_LINK_TYPE_LBK 2 +/* Min/Max packet sizes, excluding FCS */ #define NIC_HW_MIN_FRS 40#define NIC_HW_MAX_FRS 9212
drivers/net/ethernet/marvell/octeontx2/af/mbox.h +3 -1
@@ -1245,7 +1245,9 @@ struct nix_hw_info {u16 min_mtu;u32 rpm_dwrr_mtu;u32 sdp_dwrr_mtu; -u64 rsvd[16 ];/* Add reserved fields for future expansion */ +u32 lbk_dwrr_mtu; +u32 rsvd32[1 ]; +u64 rsvd[15 ];/* Add reserved fields for future expansion */ };struct nix_bandprof_alloc_req {
drivers/net/ethernet/marvell/octeontx2/af/rvu.h +2 -0
@@ -346,6 +346,7 @@ struct hw_cap {bool per_pf_mbox_regs;/* PF mbox specified in per PF registers ? */ bool programmable_chans;/* Channels programmable ? */ bool ipolicer; +bool nix_multiple_dwrr_mtu;/* Multiple DWRR_MTU to choose from */ bool npc_hash_extract;/* Hash extract enabled ? */ bool npc_exact_match_enabled;/* Exact match supported ? */ };
@@ -802,6 +803,7 @@ int nix_aq_context_read(struct rvu *rvu, struct nix_hw *nix_hw,struct nix_cn10k_aq_enq_rsp *aq_rsp, u16 pcifunc, u8 ctype, u32 qidx);int rvu_get_nix_blkaddr (struct rvu *rvu,u16 pcifunc); +int nix_get_dwrr_mtu_reg (struct rvu_hwinfo *hw,int smq_link_type);u32 convert_dwrr_mtu_to_bytes (u8 dwrr_mtu);u32 convert_bytes_to_dwrr_mtu (u32 bytes);
drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c +4 -2
@@ -1413,7 +1413,8 @@ static int rvu_af_dl_dwrr_mtu_set(struct devlink *devlink, u32 id,u64 dwrr_mtu; dwrr_mtu =convert_bytes_to_dwrr_mtu (ctx->val.vu32); -rvu_write64 (rvu,BLKADDR_NIX0 ,NIX_AF_DWRR_RPM_MTU , dwrr_mtu); +rvu_write64 (rvu,BLKADDR_NIX0 , +nix_get_dwrr_mtu_reg (rvu->hw,SMQ_LINK_TYPE_RPM ), dwrr_mtu);return 0 ; }
@@ -1428,7 +1429,8 @@ static int rvu_af_dl_dwrr_mtu_get(struct devlink *devlink, u32 id,if (!rvu->hw->cap.nix_common_dwrr_mtu)return -EOPNOTSUPP ; - dwrr_mtu =rvu_read64 (rvu,BLKADDR_NIX0 ,NIX_AF_DWRR_RPM_MTU ); + dwrr_mtu =rvu_read64 (rvu,BLKADDR_NIX0 , +nix_get_dwrr_mtu_reg (rvu->hw,SMQ_LINK_TYPE_RPM )); ctx->val.vu32 =convert_dwrr_mtu_to_bytes (dwrr_mtu);return 0 ;
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c +37 -7
80 lines not on this page · raw message
drivers/net/ethernet/marvell/octeontx2/af/rvu_reg.h +2 -1
@@ -272,7 +272,8 @@#define NIX_AF_DEBUG_NPC_RESP_DATAX (a) (0x680 | (a) << 3)#define NIX_AF_SMQX_CFG (a) (0x700 | (a) << 16)#define NIX_AF_SQM_DBG_CTL_STATUS (0x750) -#define NIX_AF_DWRR_SDP_MTU (0x790) +#define NIX_AF_DWRR_SDP_MTU (0x790)/* All CN10K except CN10KB */ +#define NIX_AF_DWRR_MTUX (a) (0x790 | (a) << 16)/* Only for CN10KB */ #define NIX_AF_DWRR_RPM_MTU (0x7A0)#define NIX_AF_PSE_CHANNEL_LEVEL (0x800)#define NIX_AF_PSE_SHAPER_CFG (0x810)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c +17 -1
@@ -8,6 +8,7 @@#include <linux/interrupt.h> #include <linux/pci.h> #include <net/tso.h> +#include <linux/bitfield.h> #include "otx2_reg.h" #include "otx2_common.h"
@@ -642,6 +643,10 @@ int otx2_txschq_config(struct otx2_nic *pfvf, int lvl, int prio, bool txschq_for req->regval[0 ] = ((u64 )pfvf->tx_max_pktlen <<8 ) |OTX2_MIN_MTU ; req->regval[0 ] |= (0x20ULL <<51 ) | (0x80ULL <<39 ) | (0x2ULL <<36 ); +/* Set link type for DWRR MTU selection on CN10K silicons */ +if (!is_dev_otx2 (pfvf->pdev)) + req->regval[0 ] |=FIELD_PREP (GENMASK_ULL (58 ,57 ), + (u64 )hw->smq_link_type); req->num_regs++;/* MDQ config */ parent = schq_list[NIX_TXSCH_LVL_TL4 ][prio];
@@ -1824,6 +1829,17 @@ void otx2_set_cints_affinity(struct otx2_nic *pfvf) } } +static u32 get_dwrr_mtu (struct otx2_nic *pfvf,struct nix_hw_info *hw) +{ +if (is_otx2_lbkvf (pfvf->pdev)) { + pfvf->hw.smq_link_type =SMQ_LINK_TYPE_LBK ; +return hw->lbk_dwrr_mtu; + } + + pfvf->hw.smq_link_type =SMQ_LINK_TYPE_RPM ; +return hw->rpm_dwrr_mtu; +} +u16 otx2_get_max_mtu (struct otx2_nic *pfvf) {struct nix_hw_info *rsp;
@@ -1853,7 +1869,7 @@ u16 otx2_get_max_mtu(struct otx2_nic *pfvf) max_mtu = rsp->max_mtu -8 -OTX2_ETH_HLEN ;/* Also save DWRR MTU, needed for DWRR weight calculation */ - pfvf->hw.dwrr_mtu = rsp->rpm_dwrr_mtu; + pfvf->hw.dwrr_mtu =get_dwrr_mtu (pfvf, rsp);if (!pfvf->hw.dwrr_mtu) pfvf->hw.dwrr_mtu =1 ; }
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h +1 -0
@@ -227,6 +227,7 @@ struct otx2_hw {u16 txschq_list[NIX_TXSCH_LVL_CNT ][MAX_TXSCHQ_PER_FUNC ];u16 matchall_ipolicer;u32 dwrr_mtu; +u8 smq_link_type;/* HW settings, coalescing etc */ u16 rx_chan_base;
Signature · 1 line
2.39.0.198.ga38d39a4c5
PATCH v2 4/6 octeontx2-af: Enable LBK links only when switch mode is on.
In reply to Naveen MamindlapalliFrom: Subbaraya Sundeep <[email protected]>
Currently, all the TL3_TL2 nodes are being configured to enable switch LBK channel 63 in them. Instead enable them only when switch mode is enabled.
--- .../net/ethernet/marvell/octeontx2/af/rvu.h | 2 ++ .../ethernet/marvell/octeontx2/af/rvu_nix.c | 11 +++++------ .../ethernet/marvell/octeontx2/af/rvu_switch.c | 18 ++++++++++++++++++ 3 files changed, 25 insertions(+), 6 deletions(-)
drivers/net/ethernet/marvell/octeontx2/af/rvu.h +2 -0
@@ -806,6 +806,8 @@ int rvu_get_nix_blkaddr(struct rvu *rvu, u16 pcifunc);int nix_get_dwrr_mtu_reg (struct rvu_hwinfo *hw,int smq_link_type);u32 convert_dwrr_mtu_to_bytes (u8 dwrr_mtu);u32 convert_bytes_to_dwrr_mtu (u32 bytes); +void rvu_nix_tx_tl2_cfg (struct rvu *rvu,int blkaddr,u16 pcifunc, +struct nix_txsch *txsch,bool enable);/* NPC APIs */ void rvu_npc_freemem (struct rvu *rvu);
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c +5 -6
@@ -2460,17 +2460,19 @@ static int nix_txschq_cfg_read(struct rvu *rvu, struct nix_hw *nix_hw,return 0 ; } -static void rvu_nix_tx_tl2_cfg (struct rvu *rvu,int blkaddr, -u16 pcifunc,struct nix_txsch *txsch) +void rvu_nix_tx_tl2_cfg (struct rvu *rvu,int blkaddr,u16 pcifunc, +struct nix_txsch *txsch,bool enable) {struct rvu_hwinfo *hw = rvu->hw;int lbk_link_start, lbk_links;u8 pf =rvu_get_pf (pcifunc);int schq; +u64 cfg;if (!is_pf_cgxmapped (rvu, pf))return ; + cfg = enable ? (BIT_ULL (12 ) |RVU_SWITCH_LBK_CHAN ) :0 ; lbk_link_start = hw->cgx_links;for (schq =0 ; schq < txsch->schq.max; schq++) {
@@ -2484,8 +2486,7 @@ static void rvu_nix_tx_tl2_cfg(struct rvu *rvu, int blkaddr,rvu_write64 (rvu, blkaddr,NIX_AF_TL3_TL2X_LINKX_CFG (schq, lbk_link_start + - lbk_links), -BIT_ULL (12 ) |RVU_SWITCH_LBK_CHAN ); + lbk_links), cfg); } }
@@ -2591,8 +2592,6 @@ int rvu_mbox_handler_nix_txschq_cfg(struct rvu *rvu,rvu_write64 (rvu, blkaddr, reg, regval); } -rvu_nix_tx_tl2_cfg (rvu, blkaddr, pcifunc, - &nix_hw->txsch[NIX_TXSCH_LVL_TL2 ]);return 0 ; }
drivers/net/ethernet/marvell/octeontx2/af/rvu_switch.c +18 -0
@@ -8,6 +8,17 @@#include <linux/bitfield.h> #include "rvu.h" +static void rvu_switch_enable_lbk_link (struct rvu *rvu,u16 pcifunc,bool enable) +{ +struct rvu_pfvf *pfvf =rvu_get_pfvf (rvu, pcifunc); +struct nix_hw *nix_hw; + + nix_hw =get_nix_hw (rvu->hw, pfvf->nix_blkaddr); +/* Enable LBK links with channel 63 for TX MCAM rule */ +rvu_nix_tx_tl2_cfg (rvu, pfvf->nix_blkaddr, pcifunc, + &nix_hw->txsch[NIX_TXSCH_LVL_TL2 ], enable); +} +static int rvu_switch_install_rx_rule (struct rvu *rvu,u16 pcifunc,u16 chan_mask) {
@@ -52,6 +63,8 @@ static int rvu_switch_install_tx_rule(struct rvu *rvu, u16 pcifunc, u16 entry)if (!test_bit (NIXLF_INITIALIZED , &pfvf->flags))return 0 ; +rvu_switch_enable_lbk_link (rvu, pcifunc, true); + lbkid = pfvf->nix_blkaddr ==BLKADDR_NIX0 ?0 :1 ;ether_addr_copy (req.packet.dmac, pfvf->mac_addr);eth_broadcast_addr ((u8 *)&req.mask.dmac);
@@ -218,6 +231,9 @@ void rvu_switch_disable(struct rvu *rvu)"Reverting RX rule for PF%d failed(%d)\n" , pf, err); +/* Disable LBK link */ +rvu_switch_enable_lbk_link (rvu, pcifunc, false); +rvu_get_pf_numvfs (rvu, pf, &numvfs,NULL );for (vf =0 ; vf < numvfs; vf++) { pcifunc = pf <<10 | ((vf +1 ) &0x3FF );
@@ -226,6 +242,8 @@ void rvu_switch_disable(struct rvu *rvu)dev_err (rvu->dev,"Reverting RX rule for PF%dVF%d failed(%d)\n" , pf, vf, err); + +rvu_switch_enable_lbk_link (rvu, pcifunc, false); } }
Signature · 1 line
2.39.0.198.ga38d39a4c5
PATCH v2 5/6 octeontx2-af: add option to toggle DROP_RE enable in rx cfg
In reply to Naveen MamindlapalliFrom: Nithin Dabilpuram <[email protected]>
Add option to toggle DROP_RE bit in rx cfg mbox. This helps in modifying the config runtime as opposed to setting available via nix_lf_alloc() mbox at NIX LF init time.
--- drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 1 + drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 5 +++++ 2 files changed, 6 insertions(+)
drivers/net/ethernet/marvell/octeontx2/af/mbox.h +1 -0
@@ -1157,6 +1157,7 @@ struct nix_rx_cfg {struct mbox_msghdr hdr;#define NIX_RX_OL3_VERIFY BIT(0)#define NIX_RX_OL4_VERIFY BIT(1) +#define NIX_RX_DROP_RE BIT(2)u8 len_verify;/* Outer L3/L4 len check */ #define NIX_RX_CSUM_OL4_VERIFY BIT(0)u8 csum_verify;/* Outer L4 checksum verification */
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c +5 -0
@@ -4196,6 +4196,11 @@ int rvu_mbox_handler_nix_set_rx_cfg(struct rvu *rvu, struct nix_rx_cfg *req,else cfg &= ~BIT_ULL (40 ); +if (req->len_verify &NIX_RX_DROP_RE ) + cfg |=BIT_ULL (32 ); +else + cfg &= ~BIT_ULL (32 ); +if (req->csum_verify &BIT (0 )) cfg |=BIT_ULL (37 );else
Signature · 1 line
2.39.0.198.ga38d39a4c5
PATCH v2 6/6 octeontx2-af: Set XOFF on other child transmit schedulers during SMQ flush
In reply to Naveen MamindlapalliWhen multiple transmit scheduler queues feed a TL1 transmit link, the SMQ flush initiated on a low priority queue might get stuck when a high priority queue fully subscribes the transmit link. This inturn effects interface teardown. To avoid this, temporarily XOFF all TL1's other immediate child transmit scheduler queues and also clear any rate limit configuration on all the scheduler queues in SMQ(flush) hierarchy.
--- .../net/ethernet/marvell/octeontx2/af/rvu.h | 16 +++ .../ethernet/marvell/octeontx2/af/rvu_nix.c | 130 +++++++++++++++++- 2 files changed, 144 insertions(+), 2 deletions(-)
drivers/net/ethernet/marvell/octeontx2/af/rvu.h +16 -0
@@ -285,6 +285,22 @@ struct nix_mark_format {u32 *cfg; }; +/* smq(flush) to tl1 cir/pir info */ +struct nix_smq_tree_ctx { +u64 cir_off; +u64 cir_val; +u64 pir_off; +u64 pir_val; +}; + +/* smq flush context */ +struct nix_smq_flush_ctx { +int smq; +u16 tl1_schq; +u16 tl2_schq; +struct nix_smq_tree_ctx smq_tree_ctx[NIX_TXSCH_LVL_CNT ]; +}; +struct npc_pkind {struct rsrc_bmap rsrc;u32 *pfchan_map;
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c +128 -2
151 lines not on this page · raw message
Signature · 1 line
2.39.0.198.ga38d39a4c5
This series was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Quoted 8 lines · On Mon, 12 Jun 2023 11:34:18 +0530 you wrote:
This patch series includes a few enhancements and other updates to the RVU NIX AF driver.
The first patch adds devlink option to configure NPC MCAM high priority zone entries reservation. This is useful when the requester needs more high priority entries than default reserved entries.
[...]
Here is the summary with links:
- [net-next,v2,1/6] octeontx2-af: Add devlink option to adjust mcam high prio zone entries
https://git.kernel.org/netdev/net-next/c/09de114c770f - [net-next,v2,2/6] octeontx2-af: extend RSS supported offload types https://git.kernel.org/netdev/net-next/c/79bc788c038c - [net-next,v2,3/6] octeontx2-af: cn10k: Set NIX DWRR MTU for CN10KB silicon https://git.kernel.org/netdev/net-next/c/bbba125eade7 - [net-next,v2,4/6] octeontx2-af: Enable LBK links only when switch mode is on. https://git.kernel.org/netdev/net-next/c/b6a072a15327 - [net-next,v2,5/6] octeontx2-af: add option to toggle DROP_RE enable in rx cfg https://git.kernel.org/netdev/net-next/c/4ed6387a61fc - [net-next,v2,6/6] octeontx2-af: Set XOFF on other child transmit schedulers during SMQ flush https://git.kernel.org/netdev/net-next/c/e18aab0470d8
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html