DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Boyer <aboyer@pensando.io>
To: dev@dpdk.org
Cc: Alfredo Cardigliano <cardigliano@ntop.org>,
	Andrew Boyer <aboyer@pensando.io>
Subject: [dpdk-dev] [PATCH 2/6] net/ionic: preserve RX mode across LIF stop/start
Date: Thu, 10 Dec 2020 06:22:27 -0800
Message-ID: <20201210142231.63209-3-aboyer@pensando.io> (raw)
In-Reply-To: <20201210142231.63209-1-aboyer@pensando.io>

Otherwise, non-default settings (like PROMISC) get reset.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
---
 drivers/net/ionic/ionic_lif.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ionic/ionic_lif.c b/drivers/net/ionic/ionic_lif.c
index 646c921b2..875c7e585 100644
--- a/drivers/net/ionic/ionic_lif.c
+++ b/drivers/net/ionic/ionic_lif.c
@@ -1573,7 +1573,7 @@ ionic_lif_configure(struct ionic_lif *lif)
 int
 ionic_lif_start(struct ionic_lif *lif)
 {
-	uint32_t rx_mode = 0;
+	uint32_t rx_mode;
 	uint32_t i;
 	int err;
 
@@ -1581,16 +1581,16 @@ ionic_lif_start(struct ionic_lif *lif)
 	if (err)
 		return err;
 
-	IONIC_PRINT(DEBUG, "Setting RX mode on port %u",
-		lif->port_id);
-
-	rx_mode |= IONIC_RX_MODE_F_UNICAST;
-	rx_mode |= IONIC_RX_MODE_F_MULTICAST;
-	rx_mode |= IONIC_RX_MODE_F_BROADCAST;
+	if (!lif->rx_mode) {
+		IONIC_PRINT(DEBUG, "Setting RX mode on %s",
+			lif->name);
 
-	lif->rx_mode = 0; /* set by ionic_set_rx_mode */
+		rx_mode  = IONIC_RX_MODE_F_UNICAST;
+		rx_mode |= IONIC_RX_MODE_F_MULTICAST;
+		rx_mode |= IONIC_RX_MODE_F_BROADCAST;
 
-	ionic_set_rx_mode(lif, rx_mode);
+		ionic_set_rx_mode(lif, rx_mode);
+	}
 
 	IONIC_PRINT(DEBUG, "Starting %u RX queues and %u TX queues "
 		"on port %u",
-- 
2.17.1


  parent reply	other threads:[~2020-12-10 14:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-10 14:22 [dpdk-dev] [PATCH 0/6] net/ionic: fixes for stop and start Andrew Boyer
2020-12-10 14:22 ` [dpdk-dev] [PATCH 1/6] net/ionic: preserve RSS state unless RETA size changes Andrew Boyer
2020-12-10 14:22 ` Andrew Boyer [this message]
2020-12-10 14:22 ` [dpdk-dev] [PATCH 3/6] net/ionic: fully implement remove-on-close Andrew Boyer
2020-12-15 13:42   ` Ferruh Yigit
2020-12-16 19:52     ` Andrew Boyer
2020-12-10 14:22 ` [dpdk-dev] [PATCH 4/6] net/ionic: improve link state handling Andrew Boyer
2020-12-10 14:22 ` [dpdk-dev] [PATCH 5/6] net/ionic: improve queue " Andrew Boyer
2020-12-10 14:22 ` [dpdk-dev] [PATCH 6/6] net/ionic: stop queues when LIF is stopped Andrew Boyer
2020-12-15 14:01 ` [dpdk-dev] [PATCH 0/6] net/ionic: fixes for stop and start Ferruh Yigit
2020-12-16 21:12 ` [dpdk-dev] [PATCH v2 0/7] " Andrew Boyer
2021-01-11 17:08   ` Ferruh Yigit
2020-12-16 21:12 ` [dpdk-dev] [PATCH v2 1/7] net/ionic: preserve RSS state unless RETA size changes Andrew Boyer
2020-12-16 21:12 ` [dpdk-dev] [PATCH v2 2/7] net/ionic: preserve Rx mode across LIF stop/start Andrew Boyer
2020-12-16 21:12 ` [dpdk-dev] [PATCH v2 3/7] net/ionic: remove multi-LIF support Andrew Boyer
2020-12-16 21:12 ` [dpdk-dev] [PATCH v2 4/7] net/ionic: fully implement remove-on-close Andrew Boyer
2020-12-16 21:12 ` [dpdk-dev] [PATCH v2 5/7] net/ionic: improve link state handling Andrew Boyer
2020-12-16 21:12 ` [dpdk-dev] [PATCH v2 6/7] net/ionic: improve queue " Andrew Boyer
2020-12-16 21:12 ` [dpdk-dev] [PATCH v2 7/7] net/ionic: stop queues when LIF is stopped Andrew Boyer

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=20201210142231.63209-3-aboyer@pensando.io \
    --to=aboyer@pensando.io \
    --cc=cardigliano@ntop.org \
    --cc=dev@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