Merge branch 'octeontx2-af-driver-fixes-for-npc'
Subbaraya Sundeep says: ==================== Octeontx2 AF driver fixes for NPC This patchset includes AF driver fixes wrt packet parser NPC. Following are the changes: Patch 1: The parser nibble configuration must be same for TX and RX interfaces and if not fix up is applied. This fixup was applied only for default profile currently and it has been fixed to apply for all profiles. Patch 2: Firmware image may not be present all times in the kernel image and default profile is used mostly hence suppress the warning. Patch 3: This patch fixes a corner case where NIXLF is detached but without freeing its mcam entries which results in resource leak. Patch 4: SMAC is overlapped with DMAC mistakenly while installing rules based on SMAC. This patch fixes that. ==================== Link: https://lore.kernel.org/r/1659513255-28667-1-git-send-email-sbhatta@marvell.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Коммит
63e36289c4
|
@ -2580,6 +2580,12 @@ static void __rvu_flr_handler(struct rvu *rvu, u16 pcifunc)
|
|||
rvu_blklf_teardown(rvu, pcifunc, BLKADDR_NPA);
|
||||
rvu_reset_lmt_map_tbl(rvu, pcifunc);
|
||||
rvu_detach_rsrcs(rvu, NULL, pcifunc);
|
||||
/* In scenarios where PF/VF drivers detach NIXLF without freeing MCAM
|
||||
* entries, check and free the MCAM entries explicitly to avoid leak.
|
||||
* Since LF is detached use LF number as -1.
|
||||
*/
|
||||
rvu_npc_free_mcam_entries(rvu, pcifunc, -1);
|
||||
|
||||
mutex_unlock(&rvu->flr_lock);
|
||||
}
|
||||
|
||||
|
|
|
@ -1097,6 +1097,9 @@ static void npc_enadis_default_entries(struct rvu *rvu, u16 pcifunc,
|
|||
|
||||
void rvu_npc_disable_default_entries(struct rvu *rvu, u16 pcifunc, int nixlf)
|
||||
{
|
||||
if (nixlf < 0)
|
||||
return;
|
||||
|
||||
npc_enadis_default_entries(rvu, pcifunc, nixlf, false);
|
||||
|
||||
/* Delete multicast and promisc MCAM entries */
|
||||
|
@ -1136,6 +1139,9 @@ bool rvu_npc_enable_mcam_by_entry_index(struct rvu *rvu, int entry, int intf, bo
|
|||
|
||||
void rvu_npc_enable_default_entries(struct rvu *rvu, u16 pcifunc, int nixlf)
|
||||
{
|
||||
if (nixlf < 0)
|
||||
return;
|
||||
|
||||
/* Enables only broadcast match entry. Promisc/Allmulti are enabled
|
||||
* in set_rx_mode mbox handler.
|
||||
*/
|
||||
|
@ -1675,7 +1681,7 @@ static void npc_load_kpu_profile(struct rvu *rvu)
|
|||
* Firmware database method.
|
||||
* Default KPU profile.
|
||||
*/
|
||||
if (!request_firmware(&fw, kpu_profile, rvu->dev)) {
|
||||
if (!request_firmware_direct(&fw, kpu_profile, rvu->dev)) {
|
||||
dev_info(rvu->dev, "Loading KPU profile from firmware: %s\n",
|
||||
kpu_profile);
|
||||
rvu->kpu_fwdata = kzalloc(fw->size, GFP_KERNEL);
|
||||
|
@ -1939,6 +1945,7 @@ static void rvu_npc_hw_init(struct rvu *rvu, int blkaddr)
|
|||
|
||||
static void rvu_npc_setup_interfaces(struct rvu *rvu, int blkaddr)
|
||||
{
|
||||
struct npc_mcam_kex *mkex = rvu->kpu.mkex;
|
||||
struct npc_mcam *mcam = &rvu->hw->mcam;
|
||||
struct rvu_hwinfo *hw = rvu->hw;
|
||||
u64 nibble_ena, rx_kex, tx_kex;
|
||||
|
@ -1951,15 +1958,15 @@ static void rvu_npc_setup_interfaces(struct rvu *rvu, int blkaddr)
|
|||
mcam->counters.max--;
|
||||
mcam->rx_miss_act_cntr = mcam->counters.max;
|
||||
|
||||
rx_kex = npc_mkex_default.keyx_cfg[NIX_INTF_RX];
|
||||
tx_kex = npc_mkex_default.keyx_cfg[NIX_INTF_TX];
|
||||
rx_kex = mkex->keyx_cfg[NIX_INTF_RX];
|
||||
tx_kex = mkex->keyx_cfg[NIX_INTF_TX];
|
||||
nibble_ena = FIELD_GET(NPC_PARSE_NIBBLE, rx_kex);
|
||||
|
||||
nibble_ena = rvu_npc_get_tx_nibble_cfg(rvu, nibble_ena);
|
||||
if (nibble_ena) {
|
||||
tx_kex &= ~NPC_PARSE_NIBBLE;
|
||||
tx_kex |= FIELD_PREP(NPC_PARSE_NIBBLE, nibble_ena);
|
||||
npc_mkex_default.keyx_cfg[NIX_INTF_TX] = tx_kex;
|
||||
mkex->keyx_cfg[NIX_INTF_TX] = tx_kex;
|
||||
}
|
||||
|
||||
/* Configure RX interfaces */
|
||||
|
|
|
@ -467,7 +467,8 @@ do { \
|
|||
NPC_SCAN_HDR(NPC_VLAN_TAG1, NPC_LID_LB, NPC_LT_LB_CTAG, 2, 2);
|
||||
NPC_SCAN_HDR(NPC_VLAN_TAG2, NPC_LID_LB, NPC_LT_LB_STAG_QINQ, 2, 2);
|
||||
NPC_SCAN_HDR(NPC_DMAC, NPC_LID_LA, la_ltype, la_start, 6);
|
||||
NPC_SCAN_HDR(NPC_SMAC, NPC_LID_LA, la_ltype, la_start, 6);
|
||||
/* SMAC follows the DMAC(which is 6 bytes) */
|
||||
NPC_SCAN_HDR(NPC_SMAC, NPC_LID_LA, la_ltype, la_start + 6, 6);
|
||||
/* PF_FUNC is 2 bytes at 0th byte of NPC_LT_LA_IH_NIX_ETHER */
|
||||
NPC_SCAN_HDR(NPC_PF_FUNC, NPC_LID_LA, NPC_LT_LA_IH_NIX_ETHER, 0, 2);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче