DPDK patches and discussions
 help / color / mirror / Atom feed
From: Helin Zhang <helin.zhang@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v3 6/7] i40e: ignore the failure of updating default macvlan filter
Date: Tue, 24 Jun 2014 10:02:38 +0800
Message-ID: <1403575359-10422-7-git-send-email-helin.zhang@intel.com> (raw)
In-Reply-To: <1403575359-10422-1-git-send-email-helin.zhang@intel.com>

For NVM4.2.2 or after, the firmware has the correct configurations
and load the macvlan filter as expected. It is not needed to
Update the default macvlan filter which cannot be removed at
all during initialization.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
---
 lib/librte_pmd_i40e/i40e_ethdev.c | 29 +++++++++++++++++------------
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c
index 204d2cb..3311d73 100644
--- a/lib/librte_pmd_i40e/i40e_ethdev.c
+++ b/lib/librte_pmd_i40e/i40e_ethdev.c
@@ -2306,11 +2306,10 @@ i40e_update_default_filter_setting(struct i40e_vsi *vsi)
 	ret = i40e_aq_remove_macvlan(hw, vsi->seid, &def_filter, 1, NULL);
 	if (ret != I40E_SUCCESS) {
 		struct i40e_mac_filter *f;
-		PMD_DRV_LOG(WARNING, "Failed to remove default [mac,vlan] config\n");
 
-		/* Even failed to update default setting, still needs to add the permanent
-		 *  mac into mac list.
-		 */
+		PMD_DRV_LOG(WARNING, "Cannot remove the default "
+						"macvlan filter\n");
+		/* It needs to add the permanent mac into mac list */
 		f = rte_zmalloc("macv_filter", sizeof(*f), 0);
 		if (f == NULL) {
 			PMD_DRV_LOG(ERR, "failed to allocate memory\n");
@@ -2320,6 +2319,7 @@ i40e_update_default_filter_setting(struct i40e_vsi *vsi)
 				ETH_ADDR_LEN);
 		TAILQ_INSERT_TAIL(&vsi->mac_list, f, next);
 		vsi->mac_num++;
+
 		return ret;
 	}
 
@@ -2516,14 +2516,19 @@ i40e_vsi_setup(struct i40e_pf *pf,
 
 		(void)rte_memcpy(pf->dev_addr.addr_bytes, hw->mac.perm_addr,
 				ETH_ADDR_LEN);
-		ret = i40e_update_default_filter_setting(vsi);
-		if (ret != I40E_SUCCESS) {
-			PMD_DRV_LOG(ERR, "Failed to remove default "
-						"filter setting\n");
-			goto fail_msix_alloc;
-		}
-	}
-	else if (type == I40E_VSI_SRIOV) {
+
+		/**
+		 * Updating default filter settings are necessary to prevent
+		 * reception of tagged packets.
+		 * Some old firmware configurations load a default macvlan
+		 * filter which accepts both tagged and untagged packets.
+		 * The updating is to use a normal filter instead if needed.
+		 * For NVM 4.2.2 or after, the updating is not needed anymore.
+		 * The firmware with correct configurations load the default
+		 * macvlan filter which is expected and cannot be removed.
+		 */
+		i40e_update_default_filter_setting(vsi);
+	} else if (type == I40E_VSI_SRIOV) {
 		memset(&ctxt, 0, sizeof(ctxt));
 		/**
 		 * For other VSI, the uplink_seid equals to uplink VSI's
-- 
1.8.1.4

  parent reply	other threads:[~2014-06-24  2:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-24  2:02 [dpdk-dev] [PATCH v3 0/7] enhancements for i40e Helin Zhang
2014-06-24  2:02 ` [dpdk-dev] [PATCH v3 1/7] i40e: fix for getting correct RSS hash result Helin Zhang
2014-06-24  2:02 ` [dpdk-dev] [PATCH v3 2/7] i40evf: remove an interface which is not used Helin Zhang
2014-06-24  2:02 ` [dpdk-dev] [PATCH v3 3/7] i40evf: fix for copying wrong size of link info Helin Zhang
2014-06-24  2:02 ` [dpdk-dev] [PATCH v3 4/7] i40e: fix for updating the hash lookup table of PF RSS Helin Zhang
2014-06-24  2:02 ` [dpdk-dev] [PATCH v3 5/7] i40e: double vlan should be specifically disabled by default Helin Zhang
2014-06-24  2:02 ` Helin Zhang [this message]
2014-06-24  2:02 ` [dpdk-dev] [PATCH v3 7/7] app/testpmd: rework for displaying different size of RX descriptors Helin Zhang
2014-06-24 11:13 ` [dpdk-dev] [PATCH v3 0/7] enhancements for i40e 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=1403575359-10422-7-git-send-email-helin.zhang@intel.com \
    --to=helin.zhang@intel.com \
    --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