Skip to contentSkip to conversation

i40e/i40evf updates

PATCH New Bimmy Pujari 2 participants 14 messages Sep 27, 2016 – Sep 30, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover i40e/i40evf updates

Alexander Duyck drops redundant Rx descriptor processing code.

Bimmy Pujari changes version from 1.6.19 to 1.6.21.

Carolyn Wyborny adds code to fix for long link down notification time.

Filip Sadowski removes workaround for simple MAC address filter deletion.

Harshitha Ramamurthy fixes ethtool LED blinking on X722 for 1GbE.

Henry Tieman adds code to correctly restore LED status after ethtool identify.

Lihong Yang fixes confusing dmesg info for ethtool -L option.

 drivers/net/ethernet/intel/i40e/i40e.h          |  2 +-
 drivers/net/ethernet/intel/i40e/i40e_common.c   |  5 ++-
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c  | 10 ++---
 drivers/net/ethernet/intel/i40e/i40e_main.c     | 52 +++----------------------
 drivers/net/ethernet/intel/i40e/i40e_txrx.c     | 18 +++------
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c   | 18 +++------
 drivers/net/ethernet/intel/i40evf/i40evf_main.c |  2 +-
 7 files changed, 29 insertions(+), 78 deletions(-)
Signature · 1 line
2.4.11
#1 lore raw

PATCH 1/7 i40e: fix confusing dmesg info for ethtool -L option

From: Lihong Yang <[email protected]>

Ethtool -L option with the combined parameter is for changing the number of multi-purpose channels of the specified network device. The pre-set maximum for the combined channels is cpu dependent. Currently, for an i40e device, when the user sets a value between 64 and the maximum that the cpu can support for the combined parameter, the i40e driver displays the confusing info in dmesg to only show 64 as the RSS count regardless of what the accepted user input is as long as it is larger than 64.

This patch fixes the message in the i40e driver when the user uses ethtool -L to change the number of the combined channels to consistently display the user requested value if it is valid and accepted by ethtool.

Change-ID Ia80a68bc844b779a49e0f76e7d3dcc915032d9af

---
Testing Hints:
1. ethtool -l devname to show defaults
2. ethtool -L devname combined 72 to change the number of channels
3. ethtool -l devname to check settings
4. ethtool -S devname to verify 72 queues(tx/rx) got set up
5. run dmesg to check the i40e driver provided info to be consistent:
i40e 0000:xx:00.x: User requested queue count/
HW max RSS count: 72/64

 drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +2 -2
index b4a4c0b..b2c9f9d 100644
@@ -8361,8 +8361,8 @@ int i40e_reconfig_rss_queues(struct i40e_pf *pf, int queue_count)
 
 		i40e_pf_config_rss(pf);
 	}
-	dev_info(&pf->pdev->dev, "RSS count/HW max RSS count:  %d/%d\n",
-		 pf->alloc_rss_size, pf->rss_size_max);
+	dev_info(&pf->pdev->dev, "User requested queue count/HW max RSS count:  %d/%d\n",
+		 vsi->req_queue_pairs, pf->rss_size_max);
 	return pf->alloc_rss_size;
 }
 
Signature · 1 line
2.4.11
#2 lore raw

PATCH 1/7 i40e: fix confusing dmesg info for ethtool -L option

Quoted 34 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Bimmy Pujari
Sent: Tuesday, September 27, 2016 11:29 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S48 1/7] i40e: fix confusing dmesg info for ethtool -L option

From: Lihong Yang <[email protected]>

Ethtool -L option with the combined parameter is for changing the number of multi-purpose channels of the specified network device. The pre-set maximum for the combined channels is cpu dependent. Currently, for an i40e device, when the user sets a value between 64 and the maximum that the cpu can support for the combined parameter, the i40e driver displays the confusing info in dmesg to only show 64 as the RSS count regardless of what the accepted user input is as long as it is larger than 64.

This patch fixes the message in the i40e driver when the user uses ethtool -L to change the number of the combined channels to consistently display the user requested value if it is valid and accepted by ethtool.

Change-ID Ia80a68bc844b779a49e0f76e7d3dcc915032d9af

---
Testing Hints:
1. ethtool -l devname to show defaults
2. ethtool -L devname combined 72 to change the number of channels 3. ethtool -l devname to check settings 4. ethtool -S devname to verify 72 queues(tx/rx) got set up 5. run dmesg to check the i40e driver provided info to be consistent:
i40e 0000:xx:00.x: User requested queue count/
HW max RSS count: 72/64

Quoted 2 lines
 drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Works as described

#3 lore raw

PATCH 2/7 i40e: Fix for ethtool LED blinking on X722 for 1GbE.

In reply to Bimmy Pujari

From: Harshitha Ramamurthy <[email protected]>

This patch fixes the problem where when the 'ethtool -p' functionality is stopped, the activity LED on X722 for 1GbE stops and no longer blinks. This patch fixes the problem by including the device ID for 1GbE X722 under the existing codepath for the 10GBaseT X722 device. Without this patch, the ethtool LED blinking does not function properly on X722 devices for 1GbE.

Change-ID I84192ebd0682fb7f4cf009818c21191eaffac7ea

---
Testing Hints: On X722 for 1GbE, the LED should continue to blink after 'ethtool -p <ethX>' is stopped.

 drivers/net/ethernet/intel/i40e/i40e.h         | 2 +-
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 8 ++++----
 drivers/net/ethernet/intel/i40e/i40e_main.c    | 5 +++--
 3 files changed, 8 insertions(+), 7 deletions(-)
drivers/net/ethernet/intel/i40e/i40e.h +1 -1
index b9a5349..ddaa37e 100644
@@ -355,7 +355,7 @@ struct i40e_pf {
 #define I40E_FLAG_NO_DCB_SUPPORT		BIT_ULL(45)
 #define I40E_FLAG_USE_SET_LLDP_MIB		BIT_ULL(46)
 #define I40E_FLAG_STOP_FW_LLDP			BIT_ULL(47)
-#define I40E_FLAG_HAVE_10GBASET_PHY		BIT_ULL(48)
+#define I40E_FLAG_HAVE_BASET_PHY		BIT_ULL(48)
 #define I40E_FLAG_PF_MAC			BIT_ULL(50)
 #define I40E_FLAG_TRUE_PROMISC_SUPPORT		BIT_ULL(51)
 
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +4 -4
index 2d02654..8b6eaf4 100644
@@ -1915,7 +1915,7 @@ static int i40e_set_phys_id(struct net_device *netdev,
 
 	switch (state) {
 	case ETHTOOL_ID_ACTIVE:
-		if (!(pf->flags & I40E_FLAG_HAVE_10GBASET_PHY)) {
+		if (!(pf->flags & I40E_FLAG_HAVE_BASET_PHY)) {
 			pf->led_status = i40e_led_get(hw);
 		} else {
 			i40e_aq_set_phy_debug(hw, I40E_PHY_DEBUG_ALL, NULL);
@@ -1925,19 +1925,19 @@ static int i40e_set_phys_id(struct net_device *netdev,
 		}
 		return blink_freq;
 	case ETHTOOL_ID_ON:
-		if (!(pf->flags & I40E_FLAG_HAVE_10GBASET_PHY))
+		if (!(pf->flags & I40E_FLAG_HAVE_BASET_PHY))
 			i40e_led_set(hw, 0xf, false);
 		else
 			ret = i40e_led_set_phy(hw, true, pf->led_status, 0);
 		break;
 	case ETHTOOL_ID_OFF:
-		if (!(pf->flags & I40E_FLAG_HAVE_10GBASET_PHY))
+		if (!(pf->flags & I40E_FLAG_HAVE_BASET_PHY))
 			i40e_led_set(hw, 0x0, false);
 		else
 			ret = i40e_led_set_phy(hw, false, pf->led_status, 0);
 		break;
 	case ETHTOOL_ID_INACTIVE:
-		if (!(pf->flags & I40E_FLAG_HAVE_10GBASET_PHY)) {
+		if (!(pf->flags & I40E_FLAG_HAVE_BASET_PHY)) {
 			i40e_led_set(hw, false, pf->led_status);
 		} else {
 			ret = i40e_led_set_phy(hw, false, pf->led_status,
drivers/net/ethernet/intel/i40e/i40e_main.c +3 -2
index b2c9f9d..e6ab33c 100644
@@ -11237,8 +11237,9 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 						       pf->main_vsi_seid);
 
 	if ((pf->hw.device_id == I40E_DEV_ID_10G_BASE_T) ||
-	    (pf->hw.device_id == I40E_DEV_ID_10G_BASE_T4))
-		pf->flags |= I40E_FLAG_HAVE_10GBASET_PHY;
+	    (pf->hw.device_id == I40E_DEV_ID_10G_BASE_T4) ||
+	    (pf->hw.device_id == I40E_DEV_ID_1G_BASE_T_X722))
+		pf->flags |= I40E_FLAG_HAVE_BASET_PHY;
 
 	/* print a string summarizing features */
 	i40e_print_features(pf);
Signature · 1 line
2.4.11
#4 lore raw

PATCH 3/7 i40e: Drop redundant Rx descriptor processing code

In reply to Bimmy Pujari

From: Alexander Duyck <[email protected]>

This patch cleans up several pieces of redundant code in the Rx clean-up paths.

The first bit is that hdr_addr and the status_err_len portions of the Rx descriptor represent the same value. As such there is no point in setting them to 0 before setting them to 0. I'm dropping the second spot where we are updating the value to 0 so that we only have 1 write for this value instead of 2.

The second piece is the checking for the DD bit in the packet. We only need to check for a non-zero value for the status_err_len because if the device is done with the descriptor it will have written something back and the DD is just one piece of it. In addition I have moved the reading of the Rx descriptor bits related to rx_ptype down so that they are actually below the dma_rmb() call so that we are guaranteed that we don't have any funky 64b on 32b calls causing any ordering issues.

Change-ID I256e44a025d3c64a7224aaaec37c852bfcb1871b

---
Testing Hints:
We should still receive packets normally. This change could impact the Rx hashing, but I don't know of any tests for skb->hash. The only possibility I can think of would be to add a trace point.

 drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 18 ++++++------------
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 18 ++++++------------
 2 files changed, 12 insertions(+), 24 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_txrx.c +6 -12
index 7d5a462..54764dd 100644
@@ -1217,7 +1217,6 @@ bool i40e_alloc_rx_buffers(struct i40e_ring *rx_ring, u16 cleaned_count)
 		 * because each write-back erases this info.
 		 */
 		rx_desc->read.pkt_addr = cpu_to_le64(bi->dma + bi->page_offset);
-		rx_desc->read.hdr_addr = 0;
 
 		rx_desc++;
 		bi++;
@@ -1738,7 +1737,6 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget)
 	while (likely(total_rx_packets < budget)) {
 		union i40e_rx_desc *rx_desc;
 		struct sk_buff *skb;
-		u32 rx_status;
 		u16 vlan_tag;
 		u8 rx_ptype;
 		u64 qword;
@@ -1752,21 +1750,13 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget)
 
 		rx_desc = I40E_RX_DESC(rx_ring, rx_ring->next_to_clean);
 
-		qword = le64_to_cpu(rx_desc->wb.qword1.status_error_len);
-		rx_ptype = (qword & I40E_RXD_QW1_PTYPE_MASK) >>
-			   I40E_RXD_QW1_PTYPE_SHIFT;
-		rx_status = (qword & I40E_RXD_QW1_STATUS_MASK) >>
-			    I40E_RXD_QW1_STATUS_SHIFT;
-
-		if (!(rx_status & BIT(I40E_RX_DESC_STATUS_DD_SHIFT)))
-			break;
-
 		/* status_error_len will always be zero for unused descriptors
 		 * because it's cleared in cleanup, and overlaps with hdr_addr
 		 * which is always zero because packet split isn't used, if the
 		 * hardware wrote DD then it will be non-zero
 		 */
-		if (!rx_desc->wb.qword1.status_error_len)
+		if (!i40e_test_staterr(rx_desc,
+				       BIT(I40E_RX_DESC_STATUS_DD_SHIFT)))
 			break;
 
 		/* This memory barrier is needed to keep us from reading
@@ -1800,6 +1790,10 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget)
 		/* probably a little skewed due to removing CRC */
 		total_rx_bytes += skb->len;
 
+		qword = le64_to_cpu(rx_desc->wb.qword1.status_error_len);
+		rx_ptype = (qword & I40E_RXD_QW1_PTYPE_MASK) >>
+			   I40E_RXD_QW1_PTYPE_SHIFT;
+
 		/* populate checksum, VLAN, and protocol */
 		i40e_process_skb_fields(rx_ring, rx_desc, skb, rx_ptype);
 
drivers/net/ethernet/intel/i40evf/i40e_txrx.c +6 -12
index dd8ad6b..e2d3622 100644
@@ -705,7 +705,6 @@ bool i40evf_alloc_rx_buffers(struct i40e_ring *rx_ring, u16 cleaned_count)
 		 * because each write-back erases this info.
 		 */
 		rx_desc->read.pkt_addr = cpu_to_le64(bi->dma + bi->page_offset);
-		rx_desc->read.hdr_addr = 0;
 
 		rx_desc++;
 		bi++;
@@ -1209,7 +1208,6 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget)
 	while (likely(total_rx_packets < budget)) {
 		union i40e_rx_desc *rx_desc;
 		struct sk_buff *skb;
-		u32 rx_status;
 		u16 vlan_tag;
 		u8 rx_ptype;
 		u64 qword;
@@ -1223,21 +1221,13 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget)
 
 		rx_desc = I40E_RX_DESC(rx_ring, rx_ring->next_to_clean);
 
-		qword = le64_to_cpu(rx_desc->wb.qword1.status_error_len);
-		rx_ptype = (qword & I40E_RXD_QW1_PTYPE_MASK) >>
-			   I40E_RXD_QW1_PTYPE_SHIFT;
-		rx_status = (qword & I40E_RXD_QW1_STATUS_MASK) >>
-			    I40E_RXD_QW1_STATUS_SHIFT;
-
-		if (!(rx_status & BIT(I40E_RX_DESC_STATUS_DD_SHIFT)))
-			break;
-
 		/* status_error_len will always be zero for unused descriptors
 		 * because it's cleared in cleanup, and overlaps with hdr_addr
 		 * which is always zero because packet split isn't used, if the
 		 * hardware wrote DD then it will be non-zero
 		 */
-		if (!rx_desc->wb.qword1.status_error_len)
+		if (!i40e_test_staterr(rx_desc,
+				       BIT(I40E_RX_DESC_STATUS_DD_SHIFT)))
 			break;
 
 		/* This memory barrier is needed to keep us from reading
@@ -1271,6 +1261,10 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget)
 		/* probably a little skewed due to removing CRC */
 		total_rx_bytes += skb->len;
 
+		qword = le64_to_cpu(rx_desc->wb.qword1.status_error_len);
+		rx_ptype = (qword & I40E_RXD_QW1_PTYPE_MASK) >>
+			   I40E_RXD_QW1_PTYPE_SHIFT;
+
 		/* populate checksum, VLAN, and protocol */
 		i40evf_process_skb_fields(rx_ring, rx_desc, skb, rx_ptype);
 
Signature · 1 line
2.4.11
#5 lore raw

PATCH 3/7 i40e: Drop redundant Rx descriptor processing code

Quoted 35 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Bimmy Pujari
Sent: Tuesday, September 27, 2016 11:29 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S48 3/7] i40e: Drop redundant Rx descriptor processing code

From: Alexander Duyck <[email protected]>

This patch cleans up several pieces of redundant code in the Rx clean-up paths.

The first bit is that hdr_addr and the status_err_len portions of the Rx descriptor represent the same value. As such there is no point in setting them to 0 before setting them to 0. I'm dropping the second spot where we are updating the value to 0 so that we only have 1 write for this value instead of 2.

The second piece is the checking for the DD bit in the packet. We only need to check for a non-zero value for the status_err_len because if the device is done with the descriptor it will have written something back and the DD is just one piece of it. In addition I have moved the reading of the Rx descriptor bits related to rx_ptype down so that they are actually below the dma_rmb() call so that we are guaranteed that we don't have any funky 64b on 32b calls causing any ordering issues.

Change-ID I256e44a025d3c64a7224aaaec37c852bfcb1871b

---
Testing Hints:
We should still receive packets normally. This change could impact the Rx hashing, but I don't know of any tests for skb->hash. The only possibility I can think of would be to add a trace point.

Quoted 3 lines
 drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 18 ++++++------------
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 18 ++++++------------
 2 files changed, 12 insertions(+), 24 deletions(-)

Packet receive functions work as expected

#6 lore raw

PATCH 4/7 i40e: Correctly restore LED status after ethtool identify

In reply to Bimmy Pujari

From: Henry Tieman <[email protected]>

Restore the activity LED status after using "ethtool -p device".

A previous commit incorrectly swapped the parameters for i40e_led_set(). This results in a failure to restore the LED status properly after using "ethtool -p" and the activity LED will remain off until a reset occurs.

Fix the parameter ordering to restore the LED status after the ethtool identify operation.

Change-ID I3fc9ac419e67a53e401d8a70fb20fd6cff3af82c
---
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +1 -1
index 8b6eaf4..1705eec 100644
@@ -1938,7 +1938,7 @@ static int i40e_set_phys_id(struct net_device *netdev,
 		break;
 	case ETHTOOL_ID_INACTIVE:
 		if (!(pf->flags & I40E_FLAG_HAVE_BASET_PHY)) {
-			i40e_led_set(hw, false, pf->led_status);
+			i40e_led_set(hw, pf->led_status, false);
 		} else {
 			ret = i40e_led_set_phy(hw, false, pf->led_status,
 					       (pf->phy_led_val |
Signature · 1 line
2.4.11
#7 lore raw

PATCH 4/7 i40e: Correctly restore LED status after ethtool identify

Quoted 17 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Bimmy Pujari
Sent: Tuesday, September 27, 2016 11:29 AM
To: intel-wired-lan at lists.osuosl.org
Cc: Tieman, Henry W <[email protected]>
Subject: [Intel-wired-lan] [next PATCH S48 4/7] i40e: Correctly restore LED status after ethtool identify

From: Henry Tieman <[email protected]>

Restore the activity LED status after using "ethtool -p device".

A previous commit incorrectly swapped the parameters for i40e_led_set(). This results in a failure to restore the LED status properly after using "ethtool -p" and the activity LED will remain off until a reset occurs.

Quoted 8 lines

Fix the parameter ordering to restore the LED status after the ethtool identify operation.

Change-ID I3fc9ac419e67a53e401d8a70fb20fd6cff3af82c
---
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Status LEDs return to normal functions after ethtool identify

#8 lore raw

PATCH 5/7 i40e: Fix for long link down notification time

In reply to Bimmy Pujari

From: Carolyn Wyborny <[email protected]>

This patch fixes a problem where it could take a very long time (>100 msec) to print the link down notification. This problem is fixed by changing how often we update link info from fw, when link is down. Without this patch, it can take over 100msec to notify user link is down.

Change-ID Ib876eb30834c7080792becd13ee093b9cbb35d78

---
Testing Hints : Check msec to link down notification appearance. Should be less than 100msec vs.more before.

 drivers/net/ethernet/intel/i40e/i40e_common.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/i40e/i40e_common.c +4 -1
index fe8100b..a475946 100644
@@ -2494,7 +2494,10 @@ i40e_status i40e_update_link_info(struct i40e_hw *hw)
 	if (status)
 		return status;
 
-	if (hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) {
+	/* extra checking needed to ensure link info to user is timely */
+	if ((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) &&
+	    ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) ||
+	     !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) {
 		status = i40e_aq_get_phy_capabilities(hw, false, false,
 						      &abilities, NULL);
 		if (status)
Signature · 1 line
2.4.11
#9 lore raw

PATCH 5/7 i40e: Fix for long link down notification time

Quoted 16 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Bimmy Pujari
Sent: Tuesday, September 27, 2016 11:29 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S48 5/7] i40e: Fix for long link down notification time

From: Carolyn Wyborny <[email protected]>

This patch fixes a problem where it could take a very long time (>100 msec) to print the link down notification.
This problem is fixed by changing how often we update link info from fw, when link is down. Without this patch, it can take over 100msec to notify user link is down.

Quoted 8 lines
Change-ID Ib876eb30834c7080792becd13ee093b9cbb35d78

---
Testing Hints : Check msec to link down notification appearance. Should be less than 100msec vs.more before.

 drivers/net/ethernet/intel/i40e/i40e_common.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Link down notification appears immediately upon downing the interface

#10 lore raw

PATCH 6/7 i40e: Removal of workaround for simple MAC address filter deletion

In reply to Bimmy Pujari

From: Filip Sadowski <[email protected]>

This is code refactoring. This patch removes the workaround which deleted a default MAC filter added by the firmware when the interface was brought up. This filter caused frames to pass disregarding the VLAN tagging. It used to be automatically applied after reset in pre-SRA FW versions. This workaround is not needed in production NICs and hence can be removed.

Change-ID I129fe1aae1f17b5a224c9b29a996d916aa1be1ec
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 41 -----------------------------
 1 file changed, 41 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +0 -41
index e6ab33c..69a9ae5 100644
@@ -1287,39 +1287,6 @@ int i40e_del_mac_all_vlan(struct i40e_vsi *vsi, u8 *macaddr,
 }
 
 /**
- * i40e_rm_default_mac_filter - Remove the default MAC filter set by NVM
- * @vsi: the PF Main VSI - inappropriate for any other VSI
- * @macaddr: the MAC address
- *
- * Remove whatever filter the firmware set up so the driver can manage
- * its own filtering intelligently.
- **/
-static void i40e_rm_default_mac_filter(struct i40e_vsi *vsi, u8 *macaddr)
-{
-	struct i40e_aqc_remove_macvlan_element_data element;
-	struct i40e_pf *pf = vsi->back;
-
-	/* Only appropriate for the PF main VSI */
-	if (vsi->type != I40E_VSI_MAIN)
-		return;
-
-	memset(&element, 0, sizeof(element));
-	ether_addr_copy(element.mac_addr, macaddr);
-	element.vlan_tag = 0;
-	/* Ignore error returns, some firmware does it this way... */
-	element.flags = I40E_AQC_MACVLAN_DEL_PERFECT_MATCH;
-	i40e_aq_remove_macvlan(&pf->hw, vsi->seid, &element, 1, NULL);
-
-	memset(&element, 0, sizeof(element));
-	ether_addr_copy(element.mac_addr, macaddr);
-	element.vlan_tag = 0;
-	/* ...and some firmware does it this way. */
-	element.flags = I40E_AQC_MACVLAN_DEL_PERFECT_MATCH |
-			I40E_AQC_MACVLAN_DEL_IGNORE_VLAN;
-	i40e_aq_remove_macvlan(&pf->hw, vsi->seid, &element, 1, NULL);
-}
-
-/**
  * i40e_add_filter - Add a mac/vlan filter to the VSI
  * @vsi: the VSI to be searched
  * @macaddr: the MAC address
@@ -9179,12 +9146,6 @@ static int i40e_config_netdev(struct i40e_vsi *vsi)
 	if (vsi->type == I40E_VSI_MAIN) {
 		SET_NETDEV_DEV(netdev, &pf->pdev->dev);
 		ether_addr_copy(mac_addr, hw->mac.perm_addr);
-		/* The following steps are necessary to prevent reception
-		 * of tagged packets - some older NVM configurations load a
-		 * default a MAC-VLAN filter that accepts any tagged packet
-		 * which must be replaced by a normal filter.
-		 */
-		i40e_rm_default_mac_filter(vsi, mac_addr);
 		spin_lock_bh(&vsi->mac_filter_list_lock);
 		i40e_add_filter(vsi, mac_addr, I40E_VLAN_ANY, false, true);
 		spin_unlock_bh(&vsi->mac_filter_list_lock);
@@ -9697,8 +9658,6 @@ static struct i40e_vsi *i40e_vsi_reinit_setup(struct i40e_vsi *vsi)
 	pf->vsi[pf->lan_vsi]->tc_config.enabled_tc = 0;
 	pf->vsi[pf->lan_vsi]->seid = pf->main_vsi_seid;
 	i40e_vsi_config_tc(pf->vsi[pf->lan_vsi], enabled_tc);
-	if (vsi->type == I40E_VSI_MAIN)
-		i40e_rm_default_mac_filter(vsi, pf->hw.mac.perm_addr);
 
 	/* assign it some queues */
 	ret = i40e_alloc_rings(vsi);
Signature · 1 line
2.4.11
#11 lore raw

PATCH 6/7 i40e: Removal of workaround for simple MAC address filter deletion

Quoted 18 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Bimmy Pujari
Sent: Tuesday, September 27, 2016 11:29 AM
To: intel-wired-lan at lists.osuosl.org
Cc: Sadowski, Filip <[email protected]>
Subject: [Intel-wired-lan] [next PATCH S48 6/7] i40e: Removal of workaround for simple MAC address filter deletion

From: Filip Sadowski <[email protected]>

This is code refactoring. This patch removes the workaround which deleted a default MAC filter added by the firmware when the interface was brought up. This filter caused frames to pass disregarding the VLAN tagging. It used to be automatically applied after reset in pre-SRA FW versions. This workaround is not needed in production NICs and hence can be removed.

Quoted 5 lines
Change-ID I129fe1aae1f17b5a224c9b29a996d916aa1be1ec
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 41 -----------------------------
 1 file changed, 41 deletions(-)

Code changes correctly applied, driver builds, compiles, and passes traffic correctly.

#12 lore raw

PATCH 7/7 i40e/i40evf: Changed version from 1.6.19 to 1.6.21

In reply to Bimmy Pujari
---
 drivers/net/ethernet/intel/i40e/i40e_main.c     | 2 +-
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +1 -1
index 69a9ae5..e76c8f4 100644
@@ -41,7 +41,7 @@ static const char i40e_driver_string[] =
 
 #define DRV_VERSION_MAJOR 1
 #define DRV_VERSION_MINOR 6
-#define DRV_VERSION_BUILD 19
+#define DRV_VERSION_BUILD 21
 #define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \
 	     __stringify(DRV_VERSION_MINOR) "." \
 	     __stringify(DRV_VERSION_BUILD)    DRV_KERN
drivers/net/ethernet/intel/i40evf/i40evf_main.c +1 -1
index 45b7cd9..2099517 100644
@@ -38,7 +38,7 @@ static const char i40evf_driver_string[] =
 
 #define DRV_VERSION_MAJOR 1
 #define DRV_VERSION_MINOR 6
-#define DRV_VERSION_BUILD 19
+#define DRV_VERSION_BUILD 21
 #define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \
 	     __stringify(DRV_VERSION_MINOR) "." \
 	     __stringify(DRV_VERSION_BUILD) \
Signature · 1 line
2.4.11
#13 lore raw

PATCH 7/7 i40e/i40evf: Changed version from 1.6.19 to 1.6.21

Quoted 8 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Bimmy Pujari
Sent: Tuesday, September 27, 2016 11:29 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S48 7/7] i40e/i40evf: Changed version from 1.6.19 to 1.6.21

Quoted 5 lines
---
 drivers/net/ethernet/intel/i40e/i40e_main.c     | 2 +-
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Driver reports correct version