linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net PATCH 0/9] octeontx2: miscellaneous fixes
@ 2021-03-16  9:27 Hariprasad Kelam
  2021-03-16  9:27 ` [net PATCH 1/9] octeontx2-pf: Do not modify number of rules Hariprasad Kelam
                   ` (8 more replies)
  0 siblings, 9 replies; 18+ messages in thread
From: Hariprasad Kelam @ 2021-03-16  9:27 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: kuba, davem, sgoutham, lcherian, gakula, jerinj, sbhatta, hkelam

This series of patches fixes various issues related to NPC MCAM entry
management, debugfs, devlink, CGX LMAC mapping, RSS config etc

Geetha sowjanya (2):
  octeontx2-af: Fix irq free in rvu teardown
  octeontx2-pf: Clear RSS enable flag on interace down

Hariprasad Kelam (1):
  octeontx2-af: fix infinite loop in unmapping counter

Rakesh Babu (1):
  octeontx2-af: Formatting debugfs entry rsrc_alloc.

Subbaraya Sundeep (5):
  octeontx2-pf: Do not modify number of rules
  octeontx2-af: Do not allocate memory for devlink private
  octeontx2-af: Remove TOS field from MKEX TX
  octeontx2-af: Return correct CGX RX fifo size
  octeontx2-af: Fix uninitialized variable warning

 .../ethernet/marvell/octeontx2/af/npc_profile.h    |  2 -
 drivers/net/ethernet/marvell/octeontx2/af/rvu.c    |  6 ++-
 drivers/net/ethernet/marvell/octeontx2/af/rvu.h    |  1 +
 .../net/ethernet/marvell/octeontx2/af/rvu_cgx.c    | 18 ++++++-
 .../ethernet/marvell/octeontx2/af/rvu_debugfs.c    | 55 +++++++++++++---------
 .../ethernet/marvell/octeontx2/af/rvu_devlink.c    |  7 +--
 .../net/ethernet/marvell/octeontx2/af/rvu_nix.c    |  2 +-
 .../net/ethernet/marvell/octeontx2/af/rvu_npc.c    |  2 +-
 .../ethernet/marvell/octeontx2/nic/otx2_flows.c    |  4 +-
 .../net/ethernet/marvell/octeontx2/nic/otx2_pf.c   |  5 ++
 10 files changed, 66 insertions(+), 36 deletions(-)

--
2.7.4

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [net PATCH 1/9] octeontx2-pf: Do not modify number of rules
  2021-03-16  9:27 [net PATCH 0/9] octeontx2: miscellaneous fixes Hariprasad Kelam
@ 2021-03-16  9:27 ` Hariprasad Kelam
  2021-03-16 17:02   ` Jakub Kicinski
  2021-03-16  9:27 ` [net PATCH 2/9] octeontx2-af: Formatting debugfs entry rsrc_alloc Hariprasad Kelam
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 18+ messages in thread
From: Hariprasad Kelam @ 2021-03-16  9:27 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: kuba, davem, sgoutham, lcherian, gakula, jerinj, sbhatta, hkelam

From: Subbaraya Sundeep <sbhatta@marvell.com>

In the ETHTOOL_GRXCLSRLALL ioctl ethtool uses
below structure to read number of rules from the driver.

    struct ethtool_rxnfc {
            __u32                           cmd;
            __u32                           flow_type;
            __u64                           data;
            struct ethtool_rx_flow_spec     fs;
            union {
                    __u32                   rule_cnt;
                    __u32                   rss_context;
            };
            __u32                           rule_locs[0];
    };

Driver must not modify rule_cnt member. But currently driver
modifies it by modifying rss_context. Hence fix it by using a
local variable.

Fixes: 81a43620("octeontx2-pf: Add RSS multi group support")
Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c
index 0dbbf38..dc17784 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c
@@ -257,17 +257,19 @@ int otx2_get_flow(struct otx2_nic *pfvf, struct ethtool_rxnfc *nfc,
 int otx2_get_all_flows(struct otx2_nic *pfvf, struct ethtool_rxnfc *nfc,
 		       u32 *rule_locs)
 {
+	u32 rule_cnt = nfc->rule_cnt;
 	u32 location = 0;
 	int idx = 0;
 	int err = 0;
 
 	nfc->data = pfvf->flow_cfg->ntuple_max_flows;
-	while ((!err || err == -ENOENT) && idx < nfc->rule_cnt) {
+	while ((!err || err == -ENOENT) && idx < rule_cnt) {
 		err = otx2_get_flow(pfvf, nfc, location);
 		if (!err)
 			rule_locs[idx++] = location;
 		location++;
 	}
+	nfc->rule_cnt = rule_cnt;
 
 	return err;
 }
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [net PATCH 2/9] octeontx2-af: Formatting debugfs entry rsrc_alloc.
  2021-03-16  9:27 [net PATCH 0/9] octeontx2: miscellaneous fixes Hariprasad Kelam
  2021-03-16  9:27 ` [net PATCH 1/9] octeontx2-pf: Do not modify number of rules Hariprasad Kelam
@ 2021-03-16  9:27 ` Hariprasad Kelam
  2021-03-16  9:27 ` [net PATCH 3/9] octeontx2-af: Do not allocate memory for devlink private Hariprasad Kelam
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 18+ messages in thread
From: Hariprasad Kelam @ 2021-03-16  9:27 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: kuba, davem, sgoutham, lcherian, gakula, jerinj, sbhatta, hkelam

From: Rakesh Babu <rsaladi2@marvell.com>

With the existing rsrc_alloc's format, there is misalignment for the
pcifunc entries whose VF's index is a double digit. This patch fixes
this.

    pcifunc     NPA         NIX0        NIX1        SSO GROUP   SSOWS
    TIM         CPT0        CPT1        REE0        REE1
    PF0:VF0     8           5
    PF0:VF1     9                       3
    PF0:VF10    18          10
    PF0:VF11    19                      8
    PF0:VF12    20          11
    PF0:VF13    21                      9
    PF0:VF14    22          12
    PF0:VF15    23                      10
    PF1         0           0

Fixes: 23205e6d("octeontx2-af: Dump current resource provisioning status")
Signed-off-by: Rakesh Babu <rsaladi2@marvell.com>
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
---
 .../ethernet/marvell/octeontx2/af/rvu_debugfs.c    | 46 ++++++++++++++--------
 1 file changed, 29 insertions(+), 17 deletions(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
index aa2ca87..dc94695 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
@@ -234,12 +234,14 @@ static ssize_t rvu_dbg_rsrc_attach_status(struct file *filp,
 					  char __user *buffer,
 					  size_t count, loff_t *ppos)
 {
-	int index, off = 0, flag = 0, go_back = 0, off_prev;
+	int index, off = 0, flag = 0, go_back = 0, len = 0;
 	struct rvu *rvu = filp->private_data;
 	int lf, pf, vf, pcifunc;
 	struct rvu_block block;
 	int bytes_not_copied;
+	int lf_str_size = 12;
 	int buf_size = 2048;
+	char *lfs;
 	char *buf;
 
 	/* don't allow partial reads */
@@ -249,12 +251,18 @@ static ssize_t rvu_dbg_rsrc_attach_status(struct file *filp,
 	buf = kzalloc(buf_size, GFP_KERNEL);
 	if (!buf)
 		return -ENOSPC;
-	off +=	scnprintf(&buf[off], buf_size - 1 - off, "\npcifunc\t\t");
+
+	lfs = kzalloc(lf_str_size, GFP_KERNEL);
+	if (!lfs)
+		return -ENOMEM;
+	off +=	scnprintf(&buf[off], buf_size - 1 - off, "%-*s", lf_str_size,
+			  "pcifunc");
 	for (index = 0; index < BLK_COUNT; index++)
-		if (strlen(rvu->hw->block[index].name))
-			off +=	scnprintf(&buf[off], buf_size - 1 - off,
-					  "%*s\t", (index - 1) * 2,
-					  rvu->hw->block[index].name);
+		if (strlen(rvu->hw->block[index].name)) {
+			off += scnprintf(&buf[off], buf_size - 1 - off,
+					 "%-*s", lf_str_size,
+					 rvu->hw->block[index].name);
+		}
 	off += scnprintf(&buf[off], buf_size - 1 - off, "\n");
 	for (pf = 0; pf < rvu->hw->total_pfs; pf++) {
 		for (vf = 0; vf <= rvu->hw->total_vfs; vf++) {
@@ -263,14 +271,15 @@ static ssize_t rvu_dbg_rsrc_attach_status(struct file *filp,
 				continue;
 
 			if (vf) {
+				sprintf(lfs, "PF%d:VF%d", pf, vf - 1);
 				go_back = scnprintf(&buf[off],
 						    buf_size - 1 - off,
-						    "PF%d:VF%d\t\t", pf,
-						    vf - 1);
+						    "%-*s", lf_str_size, lfs);
 			} else {
+				sprintf(lfs, "PF%d", pf);
 				go_back = scnprintf(&buf[off],
 						    buf_size - 1 - off,
-						    "PF%d\t\t", pf);
+						    "%-*s", lf_str_size, lfs);
 			}
 
 			off += go_back;
@@ -278,20 +287,22 @@ static ssize_t rvu_dbg_rsrc_attach_status(struct file *filp,
 				block = rvu->hw->block[index];
 				if (!strlen(block.name))
 					continue;
-				off_prev = off;
+				len = 0;
+				lfs[len] = '\0';
 				for (lf = 0; lf < block.lf.max; lf++) {
 					if (block.fn_map[lf] != pcifunc)
 						continue;
 					flag = 1;
-					off += scnprintf(&buf[off], buf_size - 1
-							- off, "%3d,", lf);
+					len += sprintf(&lfs[len], "%d,", lf);
 				}
-				if (flag && off_prev != off)
-					off--;
-				else
-					go_back++;
+
+				if (flag)
+					len--;
+				lfs[len] = '\0';
 				off += scnprintf(&buf[off], buf_size - 1 - off,
-						"\t");
+						 "%-*s", lf_str_size, lfs);
+				if (!strlen(lfs))
+					go_back += lf_str_size;
 			}
 			if (!flag)
 				off -= go_back;
@@ -303,6 +314,7 @@ static ssize_t rvu_dbg_rsrc_attach_status(struct file *filp,
 	}
 
 	bytes_not_copied = copy_to_user(buffer, buf, off);
+	kfree(lfs);
 	kfree(buf);
 
 	if (bytes_not_copied)
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [net PATCH 3/9] octeontx2-af: Do not allocate memory for devlink private
  2021-03-16  9:27 [net PATCH 0/9] octeontx2: miscellaneous fixes Hariprasad Kelam
  2021-03-16  9:27 ` [net PATCH 1/9] octeontx2-pf: Do not modify number of rules Hariprasad Kelam
  2021-03-16  9:27 ` [net PATCH 2/9] octeontx2-af: Formatting debugfs entry rsrc_alloc Hariprasad Kelam
@ 2021-03-16  9:27 ` Hariprasad Kelam
  2021-03-16 17:04   ` Jakub Kicinski
  2021-03-16  9:27 ` [net PATCH 4/9] octeontx2-af: Remove TOS field from MKEX TX Hariprasad Kelam
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 18+ messages in thread
From: Hariprasad Kelam @ 2021-03-16  9:27 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: kuba, davem, sgoutham, lcherian, gakula, jerinj, sbhatta, hkelam

From: Subbaraya Sundeep <sbhatta@marvell.com>

Memory for driver private structure rvu_devlink is
also allocated during devlink_alloc. Hence use
the allocated memory by devlink_alloc and access it
by devlink_priv call.

Fixes: fae06da4("octeontx2-af: Add devlink suppoort to af driver")
Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c
index 10a98bc..d88ac90 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c
@@ -1380,14 +1380,9 @@ int rvu_register_dl(struct rvu *rvu)
 	struct devlink *dl;
 	int err;
 
-	rvu_dl = kzalloc(sizeof(*rvu_dl), GFP_KERNEL);
-	if (!rvu_dl)
-		return -ENOMEM;
-
 	dl = devlink_alloc(&rvu_devlink_ops, sizeof(struct rvu_devlink));
 	if (!dl) {
 		dev_warn(rvu->dev, "devlink_alloc failed\n");
-		kfree(rvu_dl);
 		return -ENOMEM;
 	}
 
@@ -1395,10 +1390,10 @@ int rvu_register_dl(struct rvu *rvu)
 	if (err) {
 		dev_err(rvu->dev, "devlink register failed with error %d\n", err);
 		devlink_free(dl);
-		kfree(rvu_dl);
 		return err;
 	}
 
+	rvu_dl = devlink_priv(dl);
 	rvu_dl->dl = dl;
 	rvu_dl->rvu = rvu;
 	rvu->rvu_dl = rvu_dl;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [net PATCH 4/9] octeontx2-af: Remove TOS field from MKEX TX
  2021-03-16  9:27 [net PATCH 0/9] octeontx2: miscellaneous fixes Hariprasad Kelam
                   ` (2 preceding siblings ...)
  2021-03-16  9:27 ` [net PATCH 3/9] octeontx2-af: Do not allocate memory for devlink private Hariprasad Kelam
@ 2021-03-16  9:27 ` Hariprasad Kelam
  2021-03-16 17:06   ` Jakub Kicinski
  2021-03-16  9:27 ` [net PATCH 5/9] octeontx2-af: Return correct CGX RX fifo size Hariprasad Kelam
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 18+ messages in thread
From: Hariprasad Kelam @ 2021-03-16  9:27 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: kuba, davem, sgoutham, lcherian, gakula, jerinj, sbhatta, hkelam

From: Subbaraya Sundeep <sbhatta@marvell.com>

TOS overlaps with DMAC field in mcam search key and hence installing
rules for TX side are failing. Hence remove TOS field from TX profile.

Fixes: 42006910("octeontx2-af: cleanup KPU config data")
Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/npc_profile.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/npc_profile.h b/drivers/net/ethernet/marvell/octeontx2/af/npc_profile.h
index b192692..5c372d2 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/npc_profile.h
+++ b/drivers/net/ethernet/marvell/octeontx2/af/npc_profile.h
@@ -13499,8 +13499,6 @@ static struct npc_mcam_kex npc_mkex_default = {
 			[NPC_LT_LC_IP] = {
 				/* SIP+DIP: 8 bytes, KW2[63:0] */
 				KEX_LD_CFG(0x07, 0xc, 0x1, 0x0, 0x10),
-				/* TOS: 1 byte, KW1[63:56] */
-				KEX_LD_CFG(0x0, 0x1, 0x1, 0x0, 0xf),
 			},
 			/* Layer C: IPv6 */
 			[NPC_LT_LC_IP6] = {
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [net PATCH 5/9] octeontx2-af: Return correct CGX RX fifo size
  2021-03-16  9:27 [net PATCH 0/9] octeontx2: miscellaneous fixes Hariprasad Kelam
                   ` (3 preceding siblings ...)
  2021-03-16  9:27 ` [net PATCH 4/9] octeontx2-af: Remove TOS field from MKEX TX Hariprasad Kelam
@ 2021-03-16  9:27 ` Hariprasad Kelam
  2021-03-16  9:27 ` [net PATCH 6/9] octeontx2-af: Fix irq free in rvu teardown Hariprasad Kelam
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 18+ messages in thread
From: Hariprasad Kelam @ 2021-03-16  9:27 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: kuba, davem, sgoutham, lcherian, gakula, jerinj, sbhatta, hkelam

From: Subbaraya Sundeep <sbhatta@marvell.com>

CGX receive buffer size is a constant value and
cannot be read from CGX0 block always since
CGX0 may not enabled everytime. Hence return CGX
receive buffer size from first enabled CGX block
instead of CGX0.

Fixes: 6e54e1c5("octeontx2-af: cn10K: MTU configuration")
Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu.h        |  1 +
 drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c    | 18 ++++++++++++++++--
 .../net/ethernet/marvell/octeontx2/af/rvu_debugfs.c    |  9 +++++----
 3 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.h b/drivers/net/ethernet/marvell/octeontx2/af/rvu.h
index fa6e46e..76f3992 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.h
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.h
@@ -678,6 +678,7 @@ void npc_read_mcam_entry(struct rvu *rvu, struct npc_mcam *mcam,
 			 u8 *intf, u8 *ena);
 bool is_mac_feature_supported(struct rvu *rvu, int pf, int feature);
 u32  rvu_cgx_get_fifolen(struct rvu *rvu);
+void *rvu_first_cgx_pdata(struct rvu *rvu);
 
 /* CPT APIs */
 int rvu_cpt_lf_teardown(struct rvu *rvu, u16 pcifunc, int lf, int slot);
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c
index e668e48..6e2bf4f 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c
@@ -89,6 +89,21 @@ void *rvu_cgx_pdata(u8 cgx_id, struct rvu *rvu)
 	return rvu->cgx_idmap[cgx_id];
 }
 
+/* Return first enabled CGX instance if none are enabled then return NULL */
+void *rvu_first_cgx_pdata(struct rvu *rvu)
+{
+	int first_enabled_cgx = 0;
+	void *cgxd = NULL;
+
+	for (; first_enabled_cgx < rvu->cgx_cnt_max; first_enabled_cgx++) {
+		cgxd = rvu_cgx_pdata(first_enabled_cgx, rvu);
+		if (cgxd)
+			break;
+	}
+
+	return cgxd;
+}
+
 /* Based on P2X connectivity find mapped NIX block for a PF */
 static void rvu_map_cgx_nix_block(struct rvu *rvu, int pf,
 				  int cgx_id, int lmac_id)
@@ -711,10 +726,9 @@ int rvu_mbox_handler_cgx_features_get(struct rvu *rvu,
 u32 rvu_cgx_get_fifolen(struct rvu *rvu)
 {
 	struct mac_ops *mac_ops;
-	int rvu_def_cgx_id = 0;
 	u32 fifo_len;
 
-	mac_ops = get_mac_ops(rvu_cgx_pdata(rvu_def_cgx_id, rvu));
+	mac_ops = get_mac_ops(rvu_first_cgx_pdata(rvu));
 	fifo_len = mac_ops ? mac_ops->fifo_len : 0;
 
 	return fifo_len;
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
index dc94695..b4c53b19 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
@@ -331,7 +331,6 @@ static int rvu_dbg_rvu_pf_cgx_map_display(struct seq_file *filp, void *unused)
 	struct rvu *rvu = filp->private;
 	struct pci_dev *pdev = NULL;
 	struct mac_ops *mac_ops;
-	int rvu_def_cgx_id = 0;
 	char cgx[10], lmac[10];
 	struct rvu_pfvf *pfvf;
 	int pf, domain, blkid;
@@ -339,7 +338,10 @@ static int rvu_dbg_rvu_pf_cgx_map_display(struct seq_file *filp, void *unused)
 	u16 pcifunc;
 
 	domain = 2;
-	mac_ops = get_mac_ops(rvu_cgx_pdata(rvu_def_cgx_id, rvu));
+	mac_ops = get_mac_ops(rvu_first_cgx_pdata(rvu));
+	/* There can be no CGX devices at all */
+	if (!mac_ops)
+		return 0;
 	seq_printf(filp, "PCI dev\t\tRVU PF Func\tNIX block\t%s\tLMAC\n",
 		   mac_ops->name);
 	for (pf = 0; pf < rvu->hw->total_pfs; pf++) {
@@ -1830,7 +1832,6 @@ static void rvu_dbg_cgx_init(struct rvu *rvu)
 {
 	struct mac_ops *mac_ops;
 	unsigned long lmac_bmap;
-	int rvu_def_cgx_id = 0;
 	int i, lmac_id;
 	char dname[20];
 	void *cgx;
@@ -1838,7 +1839,7 @@ static void rvu_dbg_cgx_init(struct rvu *rvu)
 	if (!cgx_get_cgxcnt_max())
 		return;
 
-	mac_ops = get_mac_ops(rvu_cgx_pdata(rvu_def_cgx_id, rvu));
+	mac_ops = get_mac_ops(rvu_first_cgx_pdata(rvu));
 	if (!mac_ops)
 		return;
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [net PATCH 6/9] octeontx2-af: Fix irq free in rvu teardown
  2021-03-16  9:27 [net PATCH 0/9] octeontx2: miscellaneous fixes Hariprasad Kelam
                   ` (4 preceding siblings ...)
  2021-03-16  9:27 ` [net PATCH 5/9] octeontx2-af: Return correct CGX RX fifo size Hariprasad Kelam
@ 2021-03-16  9:27 ` Hariprasad Kelam
  2021-03-16  9:27 ` [net PATCH 7/9] octeontx2-pf: Clear RSS enable flag on interace down Hariprasad Kelam
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 18+ messages in thread
From: Hariprasad Kelam @ 2021-03-16  9:27 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: kuba, davem, sgoutham, lcherian, gakula, jerinj, sbhatta, hkelam

From: Geetha sowjanya <gakula@marvell.com>

Current devlink code try to free already freed irqs as the
irq_allocate flag is not cleared after free leading to kernel
crash while removing rvu driver. The patch fixes the irq free
sequence and clears the irq_allocate flag on free.

Fixes: 7304ac456("octeontx2-af: Add mailbox IRQ and msg handlers")
Signed-off-by: Geetha sowjanya <gakula@marvell.com>
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
index d9a1a71..ab24a5e 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
@@ -2462,8 +2462,10 @@ static void rvu_unregister_interrupts(struct rvu *rvu)
 		    INTR_MASK(rvu->hw->total_pfs) & ~1ULL);
 
 	for (irq = 0; irq < rvu->num_vec; irq++) {
-		if (rvu->irq_allocated[irq])
+		if (rvu->irq_allocated[irq]) {
 			free_irq(pci_irq_vector(rvu->pdev, irq), rvu);
+			rvu->irq_allocated[irq] = false;
+		}
 	}
 
 	pci_free_irq_vectors(rvu->pdev);
@@ -2975,8 +2977,8 @@ static void rvu_remove(struct pci_dev *pdev)
 	struct rvu *rvu = pci_get_drvdata(pdev);
 
 	rvu_dbg_exit(rvu);
-	rvu_unregister_interrupts(rvu);
 	rvu_unregister_dl(rvu);
+	rvu_unregister_interrupts(rvu);
 	rvu_flr_wq_destroy(rvu);
 	rvu_cgx_exit(rvu);
 	rvu_fwdata_exit(rvu);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [net PATCH 7/9] octeontx2-pf: Clear RSS enable flag on interace down
  2021-03-16  9:27 [net PATCH 0/9] octeontx2: miscellaneous fixes Hariprasad Kelam
                   ` (5 preceding siblings ...)
  2021-03-16  9:27 ` [net PATCH 6/9] octeontx2-af: Fix irq free in rvu teardown Hariprasad Kelam
@ 2021-03-16  9:27 ` Hariprasad Kelam
  2021-03-16  9:27 ` [net PATCH 8/9] octeontx2-af: fix infinite loop in unmapping counter Hariprasad Kelam
  2021-03-16  9:27 ` [net PATCH 9/9] octeontx2-af: Fix uninitialized variable warning Hariprasad Kelam
  8 siblings, 0 replies; 18+ messages in thread
From: Hariprasad Kelam @ 2021-03-16  9:27 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: kuba, davem, sgoutham, lcherian, gakula, jerinj, sbhatta, hkelam

From: Geetha sowjanya <gakula@marvell.com>

RSS configuration can not be get/set when interface is in down state
as they required mbox communication. RSS enable flag status
is used for set/get configuration. Current code do not clear the
RSS enable flag on interface down which lead to mbox error while
trying to set/get RSS configuration.

Fixes: 85069e95e("octeontx2-pf: Receive side scaling support")
Signed-off-by: Geetha sowjanya <gakula@marvell.com>
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
index 53ab181..2fd3d23 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
@@ -1672,6 +1672,7 @@ int otx2_stop(struct net_device *netdev)
 	struct otx2_nic *pf = netdev_priv(netdev);
 	struct otx2_cq_poll *cq_poll = NULL;
 	struct otx2_qset *qset = &pf->qset;
+	struct otx2_rss_info *rss;
 	int qidx, vec, wrk;
 
 	netif_carrier_off(netdev);
@@ -1684,6 +1685,10 @@ int otx2_stop(struct net_device *netdev)
 	/* First stop packet Rx/Tx */
 	otx2_rxtx_enable(pf, false);
 
+	/* Clear RSS enable flag */
+	rss = &pf->hw.rss_info;
+	rss->enable = false;
+
 	/* Cleanup Queue IRQ */
 	vec = pci_irq_vector(pf->pdev,
 			     pf->hw.nix_msixoff + NIX_LF_QINT_VEC_START);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [net PATCH 8/9] octeontx2-af: fix infinite loop in unmapping counter
  2021-03-16  9:27 [net PATCH 0/9] octeontx2: miscellaneous fixes Hariprasad Kelam
                   ` (6 preceding siblings ...)
  2021-03-16  9:27 ` [net PATCH 7/9] octeontx2-pf: Clear RSS enable flag on interace down Hariprasad Kelam
@ 2021-03-16  9:27 ` Hariprasad Kelam
  2021-03-16  9:27 ` [net PATCH 9/9] octeontx2-af: Fix uninitialized variable warning Hariprasad Kelam
  8 siblings, 0 replies; 18+ messages in thread
From: Hariprasad Kelam @ 2021-03-16  9:27 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: kuba, davem, sgoutham, lcherian, gakula, jerinj, sbhatta, hkelam

Current code does not break from loop due to entry value
miscalculation. Hence correct the same.

Fixes: a958dd59("octeontx2-af: Map or unmap NPC MCAM entry and counter")
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
index 04bb080..0bd49c7 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
@@ -2490,10 +2490,10 @@ int rvu_mbox_handler_npc_mcam_free_counter(struct rvu *rvu,
 		index = find_next_bit(mcam->bmap, mcam->bmap_entries, entry);
 		if (index >= mcam->bmap_entries)
 			break;
+		entry = index + 1;
 		if (mcam->entry2cntr_map[index] != req->cntr)
 			continue;
 
-		entry = index + 1;
 		npc_unmap_mcam_entry_and_cntr(rvu, mcam, blkaddr,
 					      index, req->cntr);
 	}
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [net PATCH 9/9] octeontx2-af: Fix uninitialized variable warning
  2021-03-16  9:27 [net PATCH 0/9] octeontx2: miscellaneous fixes Hariprasad Kelam
                   ` (7 preceding siblings ...)
  2021-03-16  9:27 ` [net PATCH 8/9] octeontx2-af: fix infinite loop in unmapping counter Hariprasad Kelam
@ 2021-03-16  9:27 ` Hariprasad Kelam
  8 siblings, 0 replies; 18+ messages in thread
From: Hariprasad Kelam @ 2021-03-16  9:27 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: kuba, davem, sgoutham, lcherian, gakula, jerinj, sbhatta, hkelam

From: Subbaraya Sundeep <sbhatta@marvell.com>

Initialize l4_key_offset variable to fix uninitialized
variable compiler warning.

Fixes: b9b7421("octeontx2-af: Support ESP/AH RSS hashing")
Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
index d300019..3d068b7 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
@@ -2629,7 +2629,7 @@ static int set_flowkey_fields(struct nix_rx_flowkey_alg *alg, u32 flow_cfg)
 	struct nix_rx_flowkey_alg *field;
 	struct nix_rx_flowkey_alg tmp;
 	u32 key_type, valid_key;
-	int l4_key_offset;
+	int l4_key_offset = 0;
 
 	if (!alg)
 		return -EINVAL;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [net PATCH 1/9] octeontx2-pf: Do not modify number of rules
  2021-03-16  9:27 ` [net PATCH 1/9] octeontx2-pf: Do not modify number of rules Hariprasad Kelam
@ 2021-03-16 17:02   ` Jakub Kicinski
  0 siblings, 0 replies; 18+ messages in thread
From: Jakub Kicinski @ 2021-03-16 17:02 UTC (permalink / raw)
  To: Hariprasad Kelam
  Cc: netdev, linux-kernel, davem, sgoutham, lcherian, gakula, jerinj, sbhatta

On Tue, 16 Mar 2021 14:57:05 +0530 Hariprasad Kelam wrote:
> From: Subbaraya Sundeep <sbhatta@marvell.com>
> 
> In the ETHTOOL_GRXCLSRLALL ioctl ethtool uses
> below structure to read number of rules from the driver.
> 
>     struct ethtool_rxnfc {
>             __u32                           cmd;
>             __u32                           flow_type;
>             __u64                           data;
>             struct ethtool_rx_flow_spec     fs;
>             union {
>                     __u32                   rule_cnt;
>                     __u32                   rss_context;
>             };
>             __u32                           rule_locs[0];
>     };
> 
> Driver must not modify rule_cnt member. But currently driver
> modifies it by modifying rss_context. Hence fix it by using a
> local variable.
> 
> Fixes: 81a43620("octeontx2-pf: Add RSS multi group support")

Fixes tag: Fixes: 81a43620("octeontx2-pf: Add RSS multi group support")
Has these problem(s):
	- missing space between the SHA1 and the subject
	- SHA1 should be at least 12 digits long
	  Can be fixed by setting core.abbrev to 12 (or more) or (for git v2.11
	  or later) just making sure it is not set (or set to "auto").

Please fix the entire submission.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [net PATCH 3/9] octeontx2-af: Do not allocate memory for devlink private
  2021-03-16  9:27 ` [net PATCH 3/9] octeontx2-af: Do not allocate memory for devlink private Hariprasad Kelam
@ 2021-03-16 17:04   ` Jakub Kicinski
  2021-03-16 18:03     ` sundeep subbaraya
  0 siblings, 1 reply; 18+ messages in thread
From: Jakub Kicinski @ 2021-03-16 17:04 UTC (permalink / raw)
  To: Hariprasad Kelam
  Cc: netdev, linux-kernel, davem, sgoutham, lcherian, gakula, jerinj, sbhatta

On Tue, 16 Mar 2021 14:57:07 +0530 Hariprasad Kelam wrote:
> From: Subbaraya Sundeep <sbhatta@marvell.com>
> 
> Memory for driver private structure rvu_devlink is
> also allocated during devlink_alloc. Hence use
> the allocated memory by devlink_alloc and access it
> by devlink_priv call.
> 
> Fixes: fae06da4("octeontx2-af: Add devlink suppoort to af driver")
> Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
> Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
> Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>

Does it fix any bug? Looks like a coding improvement.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [net PATCH 4/9] octeontx2-af: Remove TOS field from MKEX TX
  2021-03-16  9:27 ` [net PATCH 4/9] octeontx2-af: Remove TOS field from MKEX TX Hariprasad Kelam
@ 2021-03-16 17:06   ` Jakub Kicinski
  2021-03-17  6:37     ` sundeep subbaraya
  0 siblings, 1 reply; 18+ messages in thread
From: Jakub Kicinski @ 2021-03-16 17:06 UTC (permalink / raw)
  To: Hariprasad Kelam
  Cc: netdev, linux-kernel, davem, sgoutham, lcherian, gakula, jerinj, sbhatta

On Tue, 16 Mar 2021 14:57:08 +0530 Hariprasad Kelam wrote:
> From: Subbaraya Sundeep <sbhatta@marvell.com>
> 
> TOS overlaps with DMAC field in mcam search key and hence installing
> rules for TX side are failing. Hence remove TOS field from TX profile.

Could you clarify what "installing rules is failing" means?
Return error or does not behave correctly?

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [net PATCH 3/9] octeontx2-af: Do not allocate memory for devlink private
  2021-03-16 17:04   ` Jakub Kicinski
@ 2021-03-16 18:03     ` sundeep subbaraya
  2021-03-16 20:27       ` Jakub Kicinski
  0 siblings, 1 reply; 18+ messages in thread
From: sundeep subbaraya @ 2021-03-16 18:03 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Hariprasad Kelam, netdev, linux-kernel, David Miller,
	Sunil Kovvuri Goutham, lcherian, Geetha sowjanya, jerinj,
	Subbaraya Sundeep

Hi Jakub,


On Tue, Mar 16, 2021 at 10:53 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Tue, 16 Mar 2021 14:57:07 +0530 Hariprasad Kelam wrote:
> > From: Subbaraya Sundeep <sbhatta@marvell.com>
> >
> > Memory for driver private structure rvu_devlink is
> > also allocated during devlink_alloc. Hence use
> > the allocated memory by devlink_alloc and access it
> > by devlink_priv call.
> >
> > Fixes: fae06da4("octeontx2-af: Add devlink suppoort to af driver")
> > Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
> > Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
> > Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
>
> Does it fix any bug? Looks like a coding improvement.

Without this we cannot fetch our private struct 'rvu_devlink'  from any
of the functions in devlink_ops which may get added in future.

Thanks,
Sundeep

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [net PATCH 3/9] octeontx2-af: Do not allocate memory for devlink private
  2021-03-16 18:03     ` sundeep subbaraya
@ 2021-03-16 20:27       ` Jakub Kicinski
  2021-03-17  5:40         ` sundeep subbaraya
  0 siblings, 1 reply; 18+ messages in thread
From: Jakub Kicinski @ 2021-03-16 20:27 UTC (permalink / raw)
  To: sundeep subbaraya
  Cc: Hariprasad Kelam, netdev, linux-kernel, David Miller,
	Sunil Kovvuri Goutham, lcherian, Geetha sowjanya, jerinj,
	Subbaraya Sundeep

On Tue, 16 Mar 2021 23:33:40 +0530 sundeep subbaraya wrote:
> On Tue, Mar 16, 2021 at 10:53 PM Jakub Kicinski <kuba@kernel.org> wrote:
> >
> > On Tue, 16 Mar 2021 14:57:07 +0530 Hariprasad Kelam wrote:  
> > > From: Subbaraya Sundeep <sbhatta@marvell.com>
> > >
> > > Memory for driver private structure rvu_devlink is
> > > also allocated during devlink_alloc. Hence use
> > > the allocated memory by devlink_alloc and access it
> > > by devlink_priv call.
> > >
> > > Fixes: fae06da4("octeontx2-af: Add devlink suppoort to af driver")
> > > Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
> > > Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
> > > Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>  
> >
> > Does it fix any bug? Looks like a coding improvement.  
> 
> Without this we cannot fetch our private struct 'rvu_devlink'  from any
> of the functions in devlink_ops which may get added in future.

"which may get added in future" does not sound like it's fixing 
an existing problem to me :(

If you have particular case where the existing setup is problematic
please describe it in more detail, or mention what other fix depends 
on this patch. Otherwise sending this one patch for net-next would 
be better IMHO.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [net PATCH 3/9] octeontx2-af: Do not allocate memory for devlink private
  2021-03-16 20:27       ` Jakub Kicinski
@ 2021-03-17  5:40         ` sundeep subbaraya
  0 siblings, 0 replies; 18+ messages in thread
From: sundeep subbaraya @ 2021-03-17  5:40 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Hariprasad Kelam, netdev, linux-kernel, David Miller,
	Sunil Kovvuri Goutham, lcherian, Geetha sowjanya, jerinj,
	Subbaraya Sundeep

On Wed, Mar 17, 2021 at 1:57 AM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Tue, 16 Mar 2021 23:33:40 +0530 sundeep subbaraya wrote:
> > On Tue, Mar 16, 2021 at 10:53 PM Jakub Kicinski <kuba@kernel.org> wrote:
> > >
> > > On Tue, 16 Mar 2021 14:57:07 +0530 Hariprasad Kelam wrote:
> > > > From: Subbaraya Sundeep <sbhatta@marvell.com>
> > > >
> > > > Memory for driver private structure rvu_devlink is
> > > > also allocated during devlink_alloc. Hence use
> > > > the allocated memory by devlink_alloc and access it
> > > > by devlink_priv call.
> > > >
> > > > Fixes: fae06da4("octeontx2-af: Add devlink suppoort to af driver")
> > > > Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
> > > > Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
> > > > Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
> > >
> > > Does it fix any bug? Looks like a coding improvement.
> >
> > Without this we cannot fetch our private struct 'rvu_devlink'  from any
> > of the functions in devlink_ops which may get added in future.
>
> "which may get added in future" does not sound like it's fixing
> an existing problem to me :(
>
> If you have particular case where the existing setup is problematic
> please describe it in more detail, or mention what other fix depends
> on this patch. Otherwise sending this one patch for net-next would
> be better IMHO.

Sure will send this one patch to net-next.

Thanks,
Sundeep

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [net PATCH 4/9] octeontx2-af: Remove TOS field from MKEX TX
  2021-03-16 17:06   ` Jakub Kicinski
@ 2021-03-17  6:37     ` sundeep subbaraya
  2021-03-17 18:47       ` Jakub Kicinski
  0 siblings, 1 reply; 18+ messages in thread
From: sundeep subbaraya @ 2021-03-17  6:37 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Hariprasad Kelam, netdev, linux-kernel, David Miller,
	Sunil Kovvuri Goutham, lcherian, Geetha sowjanya, jerinj,
	Subbaraya Sundeep

Hi Jakub,

On Tue, Mar 16, 2021 at 10:53 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Tue, 16 Mar 2021 14:57:08 +0530 Hariprasad Kelam wrote:
> > From: Subbaraya Sundeep <sbhatta@marvell.com>
> >
> > TOS overlaps with DMAC field in mcam search key and hence installing
> > rules for TX side are failing. Hence remove TOS field from TX profile.
>
> Could you clarify what "installing rules is failing" means?
> Return error or does not behave correctly?

Returns error. The MKEX profile can be in a way where higher layer packet fields
can overwrite lower layer packet fields in output MCAM Key. The commit
42006910 ("octeontx2-af: cleanup KPU config data") introduced TX TOS field and
it overwrites DMAC. AF driver return error when TX rule is installed
with DMAC as
match criteria since DMAC gets overwritten and cannot be supported. Layers from
lower to higher in our case:
LA - Ethernet
LB - VLAN
LC - IP
LD - TCP/UDP
and so on.

We make sure there are no overlaps between layers but TOS got added by mistake.
We will elaborate the commit description and send the next version.

Thanks,
Sundeep

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [net PATCH 4/9] octeontx2-af: Remove TOS field from MKEX TX
  2021-03-17  6:37     ` sundeep subbaraya
@ 2021-03-17 18:47       ` Jakub Kicinski
  0 siblings, 0 replies; 18+ messages in thread
From: Jakub Kicinski @ 2021-03-17 18:47 UTC (permalink / raw)
  To: sundeep subbaraya
  Cc: Hariprasad Kelam, netdev, linux-kernel, David Miller,
	Sunil Kovvuri Goutham, lcherian, Geetha sowjanya, jerinj,
	Subbaraya Sundeep

On Wed, 17 Mar 2021 12:07:12 +0530 sundeep subbaraya wrote:
> On Tue, Mar 16, 2021 at 10:53 PM Jakub Kicinski <kuba@kernel.org> wrote:
> >
> > On Tue, 16 Mar 2021 14:57:08 +0530 Hariprasad Kelam wrote:  
> > > From: Subbaraya Sundeep <sbhatta@marvell.com>
> > >
> > > TOS overlaps with DMAC field in mcam search key and hence installing
> > > rules for TX side are failing. Hence remove TOS field from TX profile.  
> >
> > Could you clarify what "installing rules is failing" means?
> > Return error or does not behave correctly?  
> 
> Returns error. The MKEX profile can be in a way where higher layer packet fields
> can overwrite lower layer packet fields in output MCAM Key. The commit
> 42006910 ("octeontx2-af: cleanup KPU config data") introduced TX TOS field and
> it overwrites DMAC. AF driver return error when TX rule is installed
> with DMAC as
> match criteria since DMAC gets overwritten and cannot be supported. Layers from
> lower to higher in our case:
> LA - Ethernet
> LB - VLAN
> LC - IP
> LD - TCP/UDP
> and so on.
> 
> We make sure there are no overlaps between layers but TOS got added by mistake.
> We will elaborate the commit description and send the next version.

Thank you! The longer explanation makes the error clear.

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2021-03-17 18:47 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-16  9:27 [net PATCH 0/9] octeontx2: miscellaneous fixes Hariprasad Kelam
2021-03-16  9:27 ` [net PATCH 1/9] octeontx2-pf: Do not modify number of rules Hariprasad Kelam
2021-03-16 17:02   ` Jakub Kicinski
2021-03-16  9:27 ` [net PATCH 2/9] octeontx2-af: Formatting debugfs entry rsrc_alloc Hariprasad Kelam
2021-03-16  9:27 ` [net PATCH 3/9] octeontx2-af: Do not allocate memory for devlink private Hariprasad Kelam
2021-03-16 17:04   ` Jakub Kicinski
2021-03-16 18:03     ` sundeep subbaraya
2021-03-16 20:27       ` Jakub Kicinski
2021-03-17  5:40         ` sundeep subbaraya
2021-03-16  9:27 ` [net PATCH 4/9] octeontx2-af: Remove TOS field from MKEX TX Hariprasad Kelam
2021-03-16 17:06   ` Jakub Kicinski
2021-03-17  6:37     ` sundeep subbaraya
2021-03-17 18:47       ` Jakub Kicinski
2021-03-16  9:27 ` [net PATCH 5/9] octeontx2-af: Return correct CGX RX fifo size Hariprasad Kelam
2021-03-16  9:27 ` [net PATCH 6/9] octeontx2-af: Fix irq free in rvu teardown Hariprasad Kelam
2021-03-16  9:27 ` [net PATCH 7/9] octeontx2-pf: Clear RSS enable flag on interace down Hariprasad Kelam
2021-03-16  9:27 ` [net PATCH 8/9] octeontx2-af: fix infinite loop in unmapping counter Hariprasad Kelam
2021-03-16  9:27 ` [net PATCH 9/9] octeontx2-af: Fix uninitialized variable warning Hariprasad Kelam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).