Revert "Merge branch 'octeontx2-af-next'"
Subsystems (4)
Jakub Kicinski
maintainerPATCH 1/1 Revert "Merge branch 'octeontx2-af-next'"
This reverts commit 2ef8e39f58f08589ab035223c2687830c0eba30f, reversing changes made to e7ce9fc9ad38773b660ef663ae98df4f93cb6a37.
There are build warnings here which break the normal build due to -Werror. Ratheesh was nice enough to quickly follow up with fixes but didn't hit all the warnings I see on GCC 12 so to unlock net-next from taking patches let get this series out for now.
--- .../ethernet/marvell/octeontx2/af/Makefile | 2 +- .../net/ethernet/marvell/octeontx2/af/mbox.h | 41 +- .../net/ethernet/marvell/octeontx2/af/npc.h | 25 - .../marvell/octeontx2/af/npc_profile.h | 5 +- .../net/ethernet/marvell/octeontx2/af/rvu.c | 16 - .../net/ethernet/marvell/octeontx2/af/rvu.h | 24 +- .../ethernet/marvell/octeontx2/af/rvu_cgx.c | 39 +- .../marvell/octeontx2/af/rvu_debugfs.c | 179 -- .../marvell/octeontx2/af/rvu_devlink.c | 71 +- .../ethernet/marvell/octeontx2/af/rvu_nix.c | 7 - .../ethernet/marvell/octeontx2/af/rvu_npc.c | 51 +- .../marvell/octeontx2/af/rvu_npc_fs.c | 162 +- .../marvell/octeontx2/af/rvu_npc_fs.h | 17 - .../marvell/octeontx2/af/rvu_npc_hash.c | 1958 ----------------- .../marvell/octeontx2/af/rvu_npc_hash.h | 233 -- .../ethernet/marvell/octeontx2/af/rvu_reg.h | 15 - .../marvell/octeontx2/nic/otx2_common.h | 10 +- .../marvell/octeontx2/nic/otx2_dmac_flt.c | 46 +- .../marvell/octeontx2/nic/otx2_flows.c | 40 +- .../ethernet/marvell/octeontx2/nic/otx2_pf.c | 2 +- 20 files changed, 67 insertions(+), 2876 deletions(-) delete mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.h delete mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c delete mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.h
drivers/net/ethernet/marvell/octeontx2/af/Makefile +1 -1
@@ -11,4 +11,4 @@ rvu_mbox-y := mbox.o rvu_trace.o rvu_af-y := cgx.o rvu.o rvu_cgx.o rvu_npa.o rvu_nix.o \ rvu_reg.o rvu_npc.o rvu_debugfs.o ptp.o rvu_npc_fs.o \ rvu_cpt.o rvu_devlink.o rpm.o rvu_cn10k.o rvu_switch.o \ - rvu_sdp.o rvu_npc_hash.o + rvu_sdp.o
drivers/net/ethernet/marvell/octeontx2/af/mbox.h +6 -35
105 lines not on this page · raw message
drivers/net/ethernet/marvell/octeontx2/af/npc.h +0 -25
@@ -10,14 +10,6 @@#define NPC_KEX_CHAN_MASK 0xFFFULL -#define SET_KEX_LD (intf, lid, ltype, ld, cfg) \ - rvu_write64(rvu, blkaddr, \ - NPC_AF_INTFX_LIDX_LTX_LDX_CFG(intf, lid, ltype, ld), cfg) - -#define SET_KEX_LDFLAGS (intf, ld, flags, cfg) \ - rvu_write64(rvu, blkaddr, \ - NPC_AF_INTFX_LDATAX_FLAGSX_CFG(intf, ld, flags), cfg) -enum NPC_LID_E {NPC_LID_LA =0 ,NPC_LID_LB ,
@@ -208,7 +200,6 @@ enum key_fields {NPC_ERRLEV ,NPC_ERRCODE ,NPC_LXMB , -NPC_EXACT_RESULT ,NPC_LA ,NPC_LB , NPC_LC,
@@ -389,22 +380,6 @@ struct nix_rx_action {#endif }; -/* NPC_AF_INTFX_KEX_CFG field masks */ -#define NPC_EXACT_NIBBLE_START 40 -#define NPC_EXACT_NIBBLE_END 43 -#define NPC_EXACT_NIBBLE GENMASK_ULL(43, 40) - -/* NPC_EXACT_KEX_S nibble definitions for each field */ -#define NPC_EXACT_NIBBLE_HIT BIT_ULL(40) -#define NPC_EXACT_NIBBLE_OPC BIT_ULL(40) -#define NPC_EXACT_NIBBLE_WAY BIT_ULL(40) -#define NPC_EXACT_NIBBLE_INDEX GENMASK_ULL(43, 41) - -#define NPC_EXACT_RESULT_HIT BIT_ULL(0) -#define NPC_EXACT_RESULT_OPC GENMASK_ULL(2, 1) -#define NPC_EXACT_RESULT_WAY GENMASK_ULL(4, 3) -#define NPC_EXACT_RESULT_IDX GENMASK_ULL(15, 5) -/* NPC_AF_INTFX_KEX_CFG field masks */ #define NPC_PARSE_NIBBLE GENMASK_ULL(30, 0)
drivers/net/ethernet/marvell/octeontx2/af/npc_profile.h +2 -3
@@ -155,7 +155,7 @@/* Rx parse key extract nibble enable */ #define NPC_PARSE_NIBBLE_INTF_RX (NPC_PARSE_NIBBLE_CHAN | \ - NPC_PARSE_NIBBLE_L2L3_BCAST | \ + NPC_PARSE_NIBBLE_ERRCODE | \ NPC_PARSE_NIBBLE_LA_LTYPE | \ NPC_PARSE_NIBBLE_LB_LTYPE | \ NPC_PARSE_NIBBLE_LC_LTYPE | \
@@ -15123,8 +15123,7 @@ static struct npc_mcam_kex npc_mkex_default = { .kpu_version = NPC_KPU_PROFILE_VER, .keyx_cfg = { /* nibble: LA..LE (ltype only) + Error code + Channel */ - [NIX_INTF_RX ] = ((u64 )NPC_MCAM_KEY_X2 <<32 ) |NPC_PARSE_NIBBLE_INTF_RX | - (u64)NPC_EXACT_NIBBLE_HIT, + [NIX_INTF_RX] = ((u64)NPC_MCAM_KEY_X2 << 32) | NPC_PARSE_NIBBLE_INTF_RX,/* nibble: LA..LE (ltype only) */ [NIX_INTF_TX] = ((u64)NPC_MCAM_KEY_X2 << 32) | NPC_PARSE_NIBBLE_INTF_TX, },
drivers/net/ethernet/marvell/octeontx2/af/rvu.c +0 -16
@@ -18,7 +18,6 @@#include "ptp.h" #include "rvu_trace.h" -#include "rvu_npc_hash.h" #define DRV_NAME "rvu_af"#define DRV_STRING "Marvell OcteonTX2 RVU Admin Function Driver"
@@ -69,8 +68,6 @@ static void rvu_setup_hw_capabilities(struct rvu *rvu) hw->cap.nix_tx_link_bp = true; hw->cap.nix_rx_multicast = true; hw->cap.nix_shaper_toggle_wait = false; - hw->cap.npc_hash_extract = false; - hw->cap.npc_exact_match_enabled = false; hw->rvu = rvu;if (is_rvu_pre_96xx_C0 (rvu)) {
@@ -88,9 +85,6 @@ static void rvu_setup_hw_capabilities(struct rvu *rvu)if (!is_rvu_otx2 (rvu)) hw->cap.per_pf_mbox_regs = true; - -if (is_rvu_npc_hash_extract_en (rvu)) - hw->cap.npc_hash_extract = true; }/* Poll a RVU block's register 'offset', for a 'zero'
@@ -1128,12 +1122,6 @@ static int rvu_setup_hw_resources(struct rvu *rvu) goto cgx_err; } - err =rvu_npc_exact_init (rvu); -if (err) { -dev_err (rvu->dev,"failed to initialize exact match table\n" ); -return err; - } -/* Assign MACs for CGX mapped functions */ rvu_setup_pfvf_macaddress (rvu);
@@ -2003,7 +1991,6 @@ int rvu_mbox_handler_get_hw_cap(struct rvu *rvu, struct msg_req *req, rsp->nix_fixed_txschq_mapping = hw->cap.nix_fixed_txschq_mapping; rsp->nix_shaping = hw->cap.nix_shaping; - rsp->npc_hash_extract = hw->cap.npc_hash_extract;return 0 ; }
@@ -2561,9 +2548,6 @@ static void rvu_blklf_teardown(struct rvu *rvu, u16 pcifunc, u8 blkaddr)static void __rvu_flr_handler (struct rvu *rvu,u16 pcifunc) { -if (rvu_npc_exact_has_match_table (rvu)) -rvu_npc_exact_reset (rvu, pcifunc); -mutex_lock (&rvu->flr_lock);/* Reset order should reflect inter-block dependencies: * 1. Reset any packet/work sources (NIX, CPT, TIM)
drivers/net/ethernet/marvell/octeontx2/af/rvu.h +1 -23
@@ -338,8 +338,6 @@ struct hw_cap {bool per_pf_mbox_regs;/* PF mbox specified in per PF registers ? */ bool programmable_chans;/* Channels programmable ? */ bool ipolicer; -bool npc_hash_extract;/* Hash extract enabled ? */ -bool npc_exact_match_enabled;/* Exact match supported ? */ };struct rvu_hwinfo {
@@ -371,7 +369,6 @@ struct rvu_hwinfo {struct rvu *rvu;struct npc_pkind pkind;struct npc_mcam mcam; -struct npc_exact_table *table; };struct mbox_wq_info {
@@ -422,7 +419,6 @@ struct npc_kpu_profile_adapter {const struct npc_kpu_profile_action *ikpu;/* array[pkinds] */ const struct npc_kpu_profile *kpu;/* array[kpus] */ struct npc_mcam_kex *mkex; -struct npc_mcam_kex_hash *mkex_hash;bool custom;size_t pkinds;size_t kpus;
@@ -579,17 +575,6 @@ static inline bool is_rvu_otx2(struct rvu *rvu) midr == PCI_REVISION_ID_95XXMM || midr == PCI_REVISION_ID_95XXO); } -static inline bool is_rvu_npc_hash_extract_en (struct rvu *rvu) -{ -u64 npc_const3; - - npc_const3 =rvu_read64 (rvu,BLKADDR_NPC ,NPC_AF_CONST3 ); -if (!(npc_const3 &BIT_ULL (62 ))) -return false; - -return true; -} -static inline u16 rvu_nix_chan_cgx (struct rvu *rvu,u8 cgxid,u8 lmacid,u8 chan) {
@@ -769,6 +754,7 @@ u32 convert_dwrr_mtu_to_bytes(u8 dwrr_mtu);u32 convert_bytes_to_dwrr_mtu (u32 bytes);/* NPC APIs */ +int rvu_npc_init (struct rvu *rvu);void rvu_npc_freemem (struct rvu *rvu);int rvu_npc_get_pkind (struct rvu *rvu,u16 pf);void rvu_npc_set_pkind (struct rvu *rvu,int pkind,struct rvu_pfvf *pfvf);
@@ -787,17 +773,14 @@ void rvu_npc_install_allmulti_entry(struct rvu *rvu, u16 pcifunc, int nixlf, u64 chan);void rvu_npc_enable_allmulti_entry (struct rvu *rvu,u16 pcifunc,int nixlf,bool enable); -void npc_enadis_default_mce_entry (struct rvu *rvu,u16 pcifunc,int nixlf,int type,bool enable);void rvu_npc_disable_mcam_entries (struct rvu *rvu,u16 pcifunc,int nixlf); -bool rvu_npc_enable_mcam_by_entry_index (struct rvu *rvu,int entry,int intf,bool enable);void rvu_npc_free_mcam_entries (struct rvu *rvu,u16 pcifunc,int nixlf);void rvu_npc_disable_default_entries (struct rvu *rvu,u16 pcifunc,int nixlf);void rvu_npc_enable_default_entries (struct rvu *rvu,u16 pcifunc,int nixlf);void rvu_npc_update_flowkey_alg_idx (struct rvu *rvu,u16 pcifunc,int nixlf,int group,int alg_idx,int mcam_index); -void rvu_npc_get_mcam_entry_alloc_info (struct rvu *rvu,u16 pcifunc,int blkaddr,int *alloc_cnt,int *enable_cnt);
@@ -832,11 +815,6 @@ int npc_get_nixlf_mcam_index(struct npc_mcam *mcam, u16 pcifunc, int nixlf, int type);bool is_mcam_entry_enabled (struct rvu *rvu,struct npc_mcam *mcam,int blkaddr,int index); -int rvu_npc_init (struct rvu *rvu); -int npc_install_mcam_drop_rule (struct rvu *rvu,int mcam_idx,u16 *counter_idx, -u64 chan_val,u64 chan_mask,u64 exact_val,u64 exact_mask, -u64 bcast_mcast_val,u64 bcast_mcast_mask); -void npc_mcam_rsrcs_reserve (struct rvu *rvu,int blkaddr,int entry_idx);/* CPT APIs */ int rvu_cpt_register_interrupts (struct rvu *rvu);
drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c +2 -37
@@ -14,7 +14,6 @@#include "lmac_common.h" #include "rvu_reg.h" #include "rvu_trace.h" -#include "rvu_npc_hash.h" struct cgx_evq_entry {struct list_head evq_node;
@@ -475,11 +474,6 @@ void rvu_cgx_disable_dmac_entries(struct rvu *rvu, u16 pcifunc)if (!is_cgx_config_permitted (rvu, pcifunc))return ; -if (rvu_npc_exact_has_match_table (rvu)) { -rvu_npc_exact_reset (rvu, pcifunc); -return ; - } -rvu_get_cgx_lmac_id (rvu->pf2cgxlmac_map[pf], &cgx_id, &lmac_id); cgx_dev =cgx_get_pdata (cgx_id); lmac_count =cgx_get_lmac_cnt (cgx_dev);
@@ -590,9 +584,6 @@ int rvu_mbox_handler_cgx_mac_addr_set(struct rvu *rvu,if (!is_cgx_config_permitted (rvu, req->hdr.pcifunc))return -EPERM ; -if (rvu_npc_exact_has_match_table (rvu)) -return rvu_npc_exact_mac_addr_set (rvu, req, rsp); -rvu_get_cgx_lmac_id (rvu->pf2cgxlmac_map[pf], &cgx_id, &lmac_id);cgx_lmac_addr_set (cgx_id, lmac_id, req->mac_addr);
@@ -611,9 +602,6 @@ int rvu_mbox_handler_cgx_mac_addr_add(struct rvu *rvu,if (!is_cgx_config_permitted (rvu, req->hdr.pcifunc))return -EPERM ; -if (rvu_npc_exact_has_match_table (rvu)) -return rvu_npc_exact_mac_addr_add (rvu, req, rsp); -rvu_get_cgx_lmac_id (rvu->pf2cgxlmac_map[pf], &cgx_id, &lmac_id); rc =cgx_lmac_addr_add (cgx_id, lmac_id, req->mac_addr);if (rc >=0 ) {
@@ -634,9 +622,6 @@ int rvu_mbox_handler_cgx_mac_addr_del(struct rvu *rvu,if (!is_cgx_config_permitted (rvu, req->hdr.pcifunc))return -EPERM ; -if (rvu_npc_exact_has_match_table (rvu)) -return rvu_npc_exact_mac_addr_del (rvu, req, rsp); -rvu_get_cgx_lmac_id (rvu->pf2cgxlmac_map[pf], &cgx_id, &lmac_id);return cgx_lmac_addr_del (cgx_id, lmac_id, req->index); }
@@ -658,11 +643,6 @@ int rvu_mbox_handler_cgx_mac_max_entries_get(struct rvu *rvu,return 0 ; } -if (rvu_npc_exact_has_match_table (rvu)) { - rsp->max_dmac_filters =rvu_npc_exact_get_max_entries (rvu); -return 0 ; - } -rvu_get_cgx_lmac_id (rvu->pf2cgxlmac_map[pf], &cgx_id, &lmac_id); rsp->max_dmac_filters =cgx_lmac_addr_max_entries_get (cgx_id, lmac_id);return 0 ;
@@ -700,10 +680,6 @@ int rvu_mbox_handler_cgx_promisc_enable(struct rvu *rvu, struct msg_req *req,if (!is_cgx_config_permitted (rvu, req->hdr.pcifunc))return -EPERM ; -/* Disable drop on non hit rule */ -if (rvu_npc_exact_has_match_table (rvu)) -return rvu_npc_exact_promisc_enable (rvu, req->hdr.pcifunc); -rvu_get_cgx_lmac_id (rvu->pf2cgxlmac_map[pf], &cgx_id, &lmac_id);cgx_lmac_promisc_config (cgx_id, lmac_id, true);
@@ -719,10 +695,6 @@ int rvu_mbox_handler_cgx_promisc_disable(struct rvu *rvu, struct msg_req *req,if (!is_cgx_config_permitted (rvu, req->hdr.pcifunc))return -EPERM ; -/* Disable drop on non hit rule */ -if (rvu_npc_exact_has_match_table (rvu)) -return rvu_npc_exact_promisc_disable (rvu, req->hdr.pcifunc); -rvu_get_cgx_lmac_id (rvu->pf2cgxlmac_map[pf], &cgx_id, &lmac_id);cgx_lmac_promisc_config (cgx_id, lmac_id, false);
@@ -1116,7 +1088,7 @@ int rvu_mbox_handler_cgx_set_link_mode(struct rvu *rvu,return 0 ; } -int rvu_mbox_handler_cgx_mac_addr_reset (struct rvu *rvu,struct cgx_mac_addr_reset_req *req, +int rvu_mbox_handler_cgx_mac_addr_reset (struct rvu *rvu,struct msg_req *req,struct msg_rsp *rsp) {int pf =rvu_get_pf (req->hdr.pcifunc);
@@ -1126,16 +1098,12 @@ int rvu_mbox_handler_cgx_mac_addr_reset(struct rvu *rvu, struct cgx_mac_addr_resreturn LMAC_AF_ERR_PERM_DENIED ;rvu_get_cgx_lmac_id (rvu->pf2cgxlmac_map[pf], &cgx_id, &lmac_id); - -if (rvu_npc_exact_has_match_table (rvu)) -return rvu_npc_exact_mac_addr_reset (rvu, req, rsp); -return cgx_lmac_addr_reset (cgx_id, lmac_id); }int rvu_mbox_handler_cgx_mac_addr_update (struct rvu *rvu,struct cgx_mac_addr_update_req *req, -struct cgx_mac_addr_update_rsp *rsp) +struct msg_rsp *rsp) {int pf =rvu_get_pf (req->hdr.pcifunc);u8 cgx_id, lmac_id;
@@ -1143,9 +1111,6 @@ int rvu_mbox_handler_cgx_mac_addr_update(struct rvu *rvu,if (!is_cgx_config_permitted (rvu, req->hdr.pcifunc))return LMAC_AF_ERR_PERM_DENIED ; -if (rvu_npc_exact_has_match_table (rvu)) -return rvu_npc_exact_mac_addr_update (rvu, req, rsp); -rvu_get_cgx_lmac_id (rvu->pf2cgxlmac_map[pf], &cgx_id, &lmac_id);return cgx_lmac_addr_update (cgx_id, lmac_id, req->mac_addr, req->index); }
drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c +0 -179
199 lines not on this page · raw message
drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c +2 -69
103 lines not on this page · raw message
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c +0 -7
@@ -14,7 +14,6 @@#include "npc.h" #include "cgx.h" #include "lmac_common.h" -#include "rvu_npc_hash.h" static void nix_free_tx_vtag_entries (struct rvu *rvu,u16 pcifunc); static int rvu_nix_get_bpid(struct rvu *rvu, struct nix_bp_cfg_req *req,
@@ -3793,15 +3792,9 @@ int rvu_mbox_handler_nix_set_rx_mode(struct rvu *rvu, struct nix_rx_mode *req,rvu_npc_install_promisc_entry (rvu, pcifunc, nixlf, pfvf->rx_chan_base, pfvf->rx_chan_cnt); - -if (rvu_npc_exact_has_match_table (rvu)) -rvu_npc_exact_promisc_enable (rvu, pcifunc); }else {if (!nix_rx_multicast)rvu_npc_enable_promisc_entry (rvu, pcifunc, nixlf, false); - -if (rvu_npc_exact_has_match_table (rvu)) -rvu_npc_exact_promisc_disable (rvu, pcifunc); }return 0 ;
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c +9 -42
99 lines not on this page · raw message
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c +14 -148
251 lines not on this page · raw message
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.h deleted +0 -17
@@ -1,17 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* Marvell RVU Admin Function driver -* -* Copyright (C) 2022 Marvell. -* -*/ - -#ifndef __RVU_NPC_FS_H -#define __RVU_NPC_FS_H - -#define IPV6_WORDS 4 - -void npc_update_entry (struct rvu *rvu,enum key_fields type, -struct mcam_entry *entry,u64 val_lo, -u64 val_hi,u64 mask_lo,u64 mask_hi,u8 intf); - -#endif /* RVU_NPC_FS_H */
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c deleted +0 -1958
1,903 lines not on this page · raw message
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.h deleted +0 -233
233 lines not on this page · raw message
drivers/net/ethernet/marvell/octeontx2/af/rvu_reg.h +0 -15
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h +5 -5
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/marvell/octeontx2/nic/otx2_dmac_flt.c +12 -34
46 lines not on this page · raw message
drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c +12 -28
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +1 -1
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.36.1
Part of the diff is not shown here. View the raw message.
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Quoted 10 lines · On Wed, 6 Jul 2022 18:32:01 -0700 you wrote:
This reverts commit
2ef8e39f58f08589ab035223c2687830c0eba30f, reversing changes made toe7ce9fc9ad38773b660ef663ae98df4f93cb6a37.There are build warnings here which break the normal build due to -Werror. Ratheesh was nice enough to quickly follow up with fixes but didn't hit all the warnings I see on GCC 12 so to unlock net-next from taking patches let get this series out for now.
[...]
Here is the summary with links:
- [net-next] Revert "Merge branch 'octeontx2-af-next'"
https://git.kernel.org/netdev/net-next/c/69d7d257cd35
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html