DPDK patches and discussions
 help / color / mirror / Atom feed
From: Harman Kalra <hkalra@marvell.com>
To: <dev@dpdk.org>, Jerin Jacob <jerinj@marvell.com>,
	Maciej Czekaj <mczekaj@marvell.com>
Cc: Hanumanth Pothula <hpothula@marvell.com>
Subject: [PATCH v3 06/11] net/thunderx: reset Rx DMAC control register
Date: Tue, 24 May 2022 14:12:30 +0530	[thread overview]
Message-ID: <20220524084235.17796-6-hkalra@marvell.com> (raw)
In-Reply-To: <20220524084235.17796-1-hkalra@marvell.com>

From: Hanumanth Pothula <hpothula@marvell.com>

During initialization, reset RX DMAC control register by
sending mbox message NIC_MBOX_MSG_RESET_XCAST to PF.

Signed-off-by: Hanumanth Pothula <hpothula@marvell.com>
---
 drivers/net/thunderx/base/nicvf_mbox.c | 9 +++++++++
 drivers/net/thunderx/base/nicvf_mbox.h | 2 ++
 drivers/net/thunderx/nicvf_ethdev.c    | 3 +++
 3 files changed, 14 insertions(+)

diff --git a/drivers/net/thunderx/base/nicvf_mbox.c b/drivers/net/thunderx/base/nicvf_mbox.c
index 281027ccce..275e593286 100644
--- a/drivers/net/thunderx/base/nicvf_mbox.c
+++ b/drivers/net/thunderx/base/nicvf_mbox.c
@@ -449,3 +449,12 @@ nicvf_mbox_link_change(struct nicvf *nic)
 	mbx.msg.msg = NIC_MBOX_MSG_BGX_LINK_CHANGE;
 	nicvf_mbox_send_async_msg_to_pf(nic, &mbx);
 }
+
+void
+nicvf_mbox_reset_xcast(struct nicvf *nic)
+{
+	struct nic_mbx mbx = { .msg = { 0 } };
+
+	mbx.msg.msg = NIC_MBOX_MSG_RESET_XCAST;
+	nicvf_mbox_send_msg_to_pf(nic, &mbx);
+}
diff --git a/drivers/net/thunderx/base/nicvf_mbox.h b/drivers/net/thunderx/base/nicvf_mbox.h
index 490bed206b..044220a2cd 100644
--- a/drivers/net/thunderx/base/nicvf_mbox.h
+++ b/drivers/net/thunderx/base/nicvf_mbox.h
@@ -43,6 +43,7 @@
 #define	NIC_MBOX_MSG_SET_LINK		0x21	/* Set link up/down */
 #define	NIC_MBOX_MSG_CFG_DONE		0xF0	/* VF configuration done */
 #define	NIC_MBOX_MSG_SHUTDOWN		0xF1	/* VF is being shutdown */
+#define NIC_MBOX_MSG_RESET_XCAST	0xF2    /* Reset DCAM filtering mode */
 #define	NIC_MBOX_MSG_MAX		0x100	/* Maximum number of messages */
 
 /* Get vNIC VF configuration */
@@ -223,5 +224,6 @@ int nicvf_mbox_set_link_up_down(struct nicvf *nic, bool enable);
 void nicvf_mbox_shutdown(struct nicvf *nic);
 void nicvf_mbox_cfg_done(struct nicvf *nic);
 void nicvf_mbox_link_change(struct nicvf *nic);
+void nicvf_mbox_reset_xcast(struct nicvf *nic);
 
 #endif /* __THUNDERX_NICVF_MBOX__ */
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index addbd53735..1e268d9b0f 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -2196,6 +2196,9 @@ nicvf_eth_dev_init(struct rte_eth_dev *eth_dev)
 			);
 	}
 
+	/* To make sure RX DMAC register is set to default value (0x3) */
+	nicvf_mbox_reset_xcast(nic);
+
 	ret = nicvf_base_init(nic);
 	if (ret) {
 		PMD_INIT_LOG(ERR, "Failed to execute nicvf_base_init");
-- 
2.18.0


  parent reply	other threads:[~2022-05-24  8:43 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-17 17:39 [PATCH 01/12] config: add thundert83 config Harman Kalra
2022-05-17 17:39 ` [PATCH 02/12] event/octeontx: fix SSO fastpath Harman Kalra
2022-05-23 16:10   ` [PATCH v2 01/11] " Harman Kalra
2022-05-23 16:10     ` [PATCH v2 02/11] net/octeontx: fix port close Harman Kalra
2022-05-23 16:10     ` [PATCH v2 03/11] net/octeontx: setting link attributes Harman Kalra
2022-05-23 16:10     ` [PATCH v2 04/11] net/octeontx: handle port reconfiguration Harman Kalra
2022-05-23 16:10     ` [PATCH v2 05/11] net/thunderx: implement polling of link state change Harman Kalra
2022-05-23 16:10     ` [PATCH v2 06/11] net/thunderx: reset Rx DMAC control register Harman Kalra
2022-05-23 16:10     ` [PATCH v2 07/11] net/thunderx: setting link attributes Harman Kalra
2022-05-23 16:10     ` [PATCH v2 08/11] net/octeontx: implement xstats Harman Kalra
2022-05-23 16:10     ` [PATCH v2 09/11] net/octeontx: support allmulticast Harman Kalra
2022-05-23 16:10     ` [PATCH v2 10/11] net/thunderx: device attach from secondary Harman Kalra
2022-05-23 16:11     ` [PATCH v2 11/11] net/thunderx: populate max and min MTU values Harman Kalra
2022-05-24  8:42   ` [PATCH v3 01/11] event/octeontx: fix SSO fastpath Harman Kalra
2022-05-24  8:42     ` [PATCH v3 02/11] net/octeontx: fix port close Harman Kalra
2022-05-24  8:42     ` [PATCH v3 03/11] net/octeontx: setting link attributes Harman Kalra
2022-05-24  8:42     ` [PATCH v3 04/11] net/octeontx: handle port reconfiguration Harman Kalra
2022-05-24  8:42     ` [PATCH v3 05/11] net/thunderx: implement polling of link state change Harman Kalra
2022-05-24  8:42     ` Harman Kalra [this message]
2022-05-24  8:42     ` [PATCH v3 07/11] net/thunderx: setting link attributes Harman Kalra
2022-05-24  8:42     ` [PATCH v3 08/11] net/octeontx: implement xstats Harman Kalra
2022-06-09 16:13       ` Jerin Jacob
2022-05-24  8:42     ` [PATCH v3 09/11] net/octeontx: support allmulticast Harman Kalra
2022-05-24  8:42     ` [PATCH v3 10/11] net/thunderx: device attach from secondary Harman Kalra
2022-05-24  8:42     ` [PATCH v3 11/11] net/thunderx: populate max and min MTU values Harman Kalra
2022-06-09 15:55       ` Jerin Jacob
2022-06-09 15:53     ` [PATCH v3 01/11] event/octeontx: fix SSO fastpath Jerin Jacob
2022-05-17 17:39 ` [PATCH 03/12] net/octeontx: fix port close Harman Kalra
2022-05-17 17:39 ` [PATCH 04/12] net/octeontx: setting link attributes Harman Kalra
2022-05-17 17:39 ` [PATCH 05/12] net/octeontx: handle port reconfiguration Harman Kalra
2022-05-17 17:39 ` [PATCH 06/12] net/thunderx: implement polling of link state change Harman Kalra
2022-05-17 17:39 ` [PATCH 07/12] net/thunderx: reset Rx DMAC control register Harman Kalra
2022-05-17 17:39 ` [PATCH 08/12] net/thunderx: setting link attributes Harman Kalra
2022-05-17 17:39 ` [PATCH 09/12] net/octeontx: implement xstats Harman Kalra
2022-05-17 17:39 ` [PATCH 10/12] net/octeontx: support allmulticast Harman Kalra
2022-05-17 17:39 ` [PATCH 11/12] net/thunderx: device attach from secondary Harman Kalra
2022-05-17 17:39 ` [PATCH 12/12] net/thunderx: populate max and min MTU values Harman Kalra
2022-05-18  6:10 ` [PATCH 01/12] config: add thundert83 config Ruifeng Wang
2022-05-23 13:34 ` [PATCH v2] config: add thunderX t83 config Harman Kalra
2022-06-01 22:02   ` Thomas Monjalon

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=20220524084235.17796-6-hkalra@marvell.com \
    --to=hkalra@marvell.com \
    --cc=dev@dpdk.org \
    --cc=hpothula@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=mczekaj@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;
as well as URLs for NNTP newsgroup(s).