mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Naveen Mamindlapalli <naveenm@marvell.com>
To: <davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
	<pabeni@redhat.com>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <sgoutham@marvell.com>
Cc: Nithin Dabilpuram <ndabilpuram@marvell.com>,
	Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
	Naveen Mamindlapalli <naveenm@marvell.com>
Subject: [net-next PATCH v2 5/6] octeontx2-af: add option to toggle DROP_RE enable in rx cfg
Date: Mon, 12 Jun 2023 11:34:23 +0530	[thread overview]
Message-ID: <20230612060424.1427-6-naveenm@marvell.com> (raw)
In-Reply-To: <20230612060424.1427-1-naveenm@marvell.com>

From: Nithin Dabilpuram <ndabilpuram@marvell.com>

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.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
Signed-off-by: Naveen Mamindlapalli <naveenm@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/mbox.h    | 1 +
 drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mbox.h b/drivers/net/ethernet/marvell/octeontx2/af/mbox.h
index 1794ef0f9ae0..eba307eee2b2 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/mbox.h
+++ b/drivers/net/ethernet/marvell/octeontx2/af/mbox.h
@@ -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 */
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
index 8a89cc5e5e40..23149036be77 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
@@ -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
-- 
2.39.0.198.ga38d39a4c5


  parent reply	other threads:[~2023-06-12  6:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-12  6:04 [net-next PATCH v2 0/6] RVU NIX AF driver updates Naveen Mamindlapalli
2023-06-12  6:04 ` [net-next PATCH v2 1/6] octeontx2-af: Add devlink option to adjust mcam high prio zone entries Naveen Mamindlapalli
2023-06-12  6:04 ` [net-next PATCH v2 2/6] octeontx2-af: extend RSS supported offload types Naveen Mamindlapalli
2023-06-12  6:04 ` [net-next PATCH v2 3/6] octeontx2-af: cn10k: Set NIX DWRR MTU for CN10KB silicon Naveen Mamindlapalli
2023-06-12  6:04 ` [net-next PATCH v2 4/6] octeontx2-af: Enable LBK links only when switch mode is on Naveen Mamindlapalli
2023-06-12  6:04 ` Naveen Mamindlapalli [this message]
2023-06-12  6:04 ` [net-next PATCH v2 6/6] octeontx2-af: Set XOFF on other child transmit schedulers during SMQ flush Naveen Mamindlapalli
2023-06-13  9:00 ` [net-next PATCH v2 0/6] RVU NIX AF driver updates patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230612060424.1427-6-naveenm@marvell.com \
    --to=naveenm@marvell.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jerinj@marvell.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ndabilpuram@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sgoutham@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®