DPDK patches and discussions
 help / color / mirror / Atom feed
From: Sunil Kumar Kori <skori@marvell.com>
To: Harman Kalra <hkalra@marvell.com>,
	Jerin Kollanukkaran <jerinj@marvell.com>,
	Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>,
	Kiran Kumar Kokkilagadda <kirankumark@marvell.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, Harman Kalra <hkalra@marvell.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/octeontx2: fix dmac filtering
Date: Thu, 4 Jun 2020 05:59:37 +0000
Message-ID: <BY5PR18MB3105A4A36C07084BCC3F5DD1B4890@BY5PR18MB3105.namprd18.prod.outlook.com> (raw)
In-Reply-To: <1591195933-16362-1-git-send-email-hkalra@marvell.com>

>-----Original Message-----
>From: dev <dev-bounces@dpdk.org> On Behalf Of Harman Kalra
>Sent: Wednesday, June 3, 2020 8:22 PM
>To: Jerin Kollanukkaran <jerinj@marvell.com>; Nithin Kumar Dabilpuram
><ndabilpuram@marvell.com>; Kiran Kumar Kokkilagadda
><kirankumark@marvell.com>
>Cc: dev@dpdk.org; Harman Kalra <hkalra@marvell.com>; stable@dpdk.org
>Subject: [dpdk-dev] [PATCH] net/octeontx2: fix dmac filtering
>
>Issue has been observed where packets are getting dropped
>at DMAC filtering if a new dmac address is added before
>starting of port.
>
>Fixes: c43adf61682f ("net/octeontx2: add unicast MAC filter")
>Cc: stable@dpdk.org
>
>Signed-off-by: Harman Kalra <hkalra@marvell.com>
>---
> drivers/net/octeontx2/otx2_ethdev.h     | 1 +
> drivers/net/octeontx2/otx2_ethdev_ops.c | 4 +++-
> drivers/net/octeontx2/otx2_mac.c        | 2 ++
> 3 files changed, 6 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/net/octeontx2/otx2_ethdev.h
>b/drivers/net/octeontx2/otx2_ethdev.h
>index 0fbf68b8e..16b0d8163 100644
>--- a/drivers/net/octeontx2/otx2_ethdev.h
>+++ b/drivers/net/octeontx2/otx2_ethdev.h
>@@ -271,6 +271,7 @@ struct otx2_eth_dev {
> 	uint8_t mac_addr[RTE_ETHER_ADDR_LEN];
> 	uint8_t mkex_pfl_name[MKEX_NAME_LEN];
> 	uint8_t max_mac_entries;
>+	bool dmac_filter_enable;
> 	uint8_t lf_tx_stats;
> 	uint8_t lf_rx_stats;
> 	uint16_t flags;
>diff --git a/drivers/net/octeontx2/otx2_ethdev_ops.c
>b/drivers/net/octeontx2/otx2_ethdev_ops.c
>index 80ac2b96e..faecf216c 100644
>--- a/drivers/net/octeontx2/otx2_ethdev_ops.c
>+++ b/drivers/net/octeontx2/otx2_ethdev_ops.c
>@@ -148,8 +148,10 @@ otx2_nix_promisc_enable(struct rte_eth_dev
>*eth_dev)
> int
> otx2_nix_promisc_disable(struct rte_eth_dev *eth_dev)
> {
>-	otx2_nix_promisc_config(eth_dev, 0);
>+	struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);
>+	otx2_nix_promisc_config(eth_dev, dev->dmac_filter_enable);
> 	nix_cgx_promisc_config(eth_dev, 0);
>+	dev->dmac_filter_enable = false;
>
> 	return 0;
> }
>diff --git a/drivers/net/octeontx2/otx2_mac.c
>b/drivers/net/octeontx2/otx2_mac.c
>index 262d185e5..49a700ca1 100644
>--- a/drivers/net/octeontx2/otx2_mac.c
>+++ b/drivers/net/octeontx2/otx2_mac.c
>@@ -76,6 +76,8 @@ otx2_nix_mac_addr_add(struct rte_eth_dev *eth_dev,
>struct rte_ether_addr *addr,
>
> 	/* Enable promiscuous mode at NIX level */
> 	otx2_nix_promisc_config(eth_dev, 1);
>+	dev->dmac_filter_enable = true;
>+	eth_dev->data->promiscuous = 0;
>
> done:
> 	return rc;
>--
>2.18.0
Acked-by: Sunil Kumar Kori <skori@mavell.com>


  reply	other threads:[~2020-06-04  5:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-03 14:52 Harman Kalra
2020-06-04  5:59 ` Sunil Kumar Kori [this message]
2020-06-28 12:15   ` Jerin Jacob

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=BY5PR18MB3105A4A36C07084BCC3F5DD1B4890@BY5PR18MB3105.namprd18.prod.outlook.com \
    --to=skori@marvell.com \
    --cc=dev@dpdk.org \
    --cc=hkalra@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=stable@dpdk.org \
    /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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git