i40e/i40evf updates
Subsystems (2)
cover i40e/i40evf updates
Avinash Dayanand provides fix to show correct Advertised Link Modes when link is down.
Catherine Sullivan removes device ID 0x37D4.
Joshua Hay adds hyperv dev ids.
Kiran Patil enables VSI broadcast promiscuous mode instead of adding broadcast filter.
Mitch Williams removes useless initializer & refactors rx filter handling.
drivers/net/ethernet/intel/i40e/i40e.h | 14 +- drivers/net/ethernet/intel/i40e/i40e_common.c | 1 - drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 16 +- drivers/net/ethernet/intel/i40e/i40e_devids.h | 1 - drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 47 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 545 +++++++++++------------- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 4 +- drivers/net/ethernet/intel/i40evf/i40e_common.c | 1 - drivers/net/ethernet/intel/i40evf/i40e_devids.h | 1 - drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 3 +- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 4 +- 11 files changed, 315 insertions(+), 322 deletions(-)
Signature · 1 line
2.4.11
PATCH 1/7 i40e: Fix to show correct Advertised Link Modes when link is down
From: Avinash Dayanand <[email protected]>
When link is down, Advertised Link Modes was wrongly displaying full supported link modes instead of Advertised link mode. Added conditional checks in order to make sure correct Advertised link modes are displayed when the link is down.
---
Testing Hints: See HSD
HSD-number: 7660092
drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 47 +++++++++++++++----------- 1 file changed, 28 insertions(+), 19 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +28 -19
@@ -272,15 +272,16 @@ static void i40e_phy_type_to_ethtool(struct i40e_pf *pf, u32 *supported, u32 *advertising) {enum i40e_aq_capabilities_phy_type phy_types = pf->hw.phy.phy_types; - +struct i40e_link_status *hw_link_info = &pf->hw.phy.link_info; *supported =0x0 ; *advertising =0x0 ;if (phy_types &I40E_CAP_PHY_TYPE_SGMII ) { *supported |= SUPPORTED_Autoneg | SUPPORTED_1000baseT_Full; - *advertising |= ADVERTISED_Autoneg | - ADVERTISED_1000baseT_Full; + *advertising |= ADVERTISED_Autoneg; +if (hw_link_info->requested_speeds &I40E_LINK_SPEED_1GB ) + *advertising |= ADVERTISED_1000baseT_Full;if (pf->flags &I40E_FLAG_100M_SGMII_CAPABLE ) { *supported |= SUPPORTED_100baseT_Full; *advertising |= ADVERTISED_100baseT_Full;
@@ -299,8 +300,9 @@ static void i40e_phy_type_to_ethtool(struct i40e_pf *pf, u32 *supported, phy_types & I40E_CAP_PHY_TYPE_10GBASE_LR) { *supported |= SUPPORTED_Autoneg | SUPPORTED_10000baseT_Full; - *advertising |= ADVERTISED_Autoneg | - ADVERTISED_10000baseT_Full; + *advertising |= ADVERTISED_Autoneg; +if (hw_link_info->requested_speeds &I40E_LINK_SPEED_10GB ) + *advertising |= ADVERTISED_10000baseT_Full; } if (phy_types & I40E_CAP_PHY_TYPE_XLAUI || phy_types & I40E_CAP_PHY_TYPE_XLPPI ||
@@ -310,14 +312,16 @@ static void i40e_phy_type_to_ethtool(struct i40e_pf *pf, u32 *supported, phy_types & I40E_CAP_PHY_TYPE_40GBASE_CR4) { *supported |= SUPPORTED_Autoneg | SUPPORTED_40000baseCR4_Full; - *advertising |= ADVERTISED_Autoneg | - ADVERTISED_40000baseCR4_Full; + *advertising |= ADVERTISED_Autoneg; +if (hw_link_info->requested_speeds &I40E_LINK_SPEED_40GB ) + *advertising |= ADVERTISED_40000baseCR4_Full; }if (phy_types &I40E_CAP_PHY_TYPE_100BASE_TX ) { *supported |= SUPPORTED_Autoneg | SUPPORTED_100baseT_Full; - *advertising |= ADVERTISED_Autoneg | - ADVERTISED_100baseT_Full; + *advertising |= ADVERTISED_Autoneg; +if (hw_link_info->requested_speeds &I40E_LINK_SPEED_100MB ) + *advertising |= ADVERTISED_100baseT_Full; } if (phy_types & I40E_CAP_PHY_TYPE_1000BASE_T || phy_types & I40E_CAP_PHY_TYPE_1000BASE_SX ||
@@ -325,8 +329,9 @@ static void i40e_phy_type_to_ethtool(struct i40e_pf *pf, u32 *supported, phy_types & I40E_CAP_PHY_TYPE_1000BASE_T_OPTICAL) { *supported |= SUPPORTED_Autoneg | SUPPORTED_1000baseT_Full; - *advertising |= ADVERTISED_Autoneg | - ADVERTISED_1000baseT_Full; + *advertising |= ADVERTISED_Autoneg; +if (hw_link_info->requested_speeds &I40E_LINK_SPEED_1GB ) + *advertising |= ADVERTISED_1000baseT_Full; }if (phy_types &I40E_CAP_PHY_TYPE_40GBASE_SR4 ) *supported |= SUPPORTED_40000baseSR4_Full;
@@ -341,26 +346,30 @@ static void i40e_phy_type_to_ethtool(struct i40e_pf *pf, u32 *supported,if (phy_types &I40E_CAP_PHY_TYPE_20GBASE_KR2 ) { *supported |= SUPPORTED_20000baseKR2_Full | SUPPORTED_Autoneg; - *advertising |= ADVERTISED_20000baseKR2_Full | - ADVERTISED_Autoneg; + *advertising |= ADVERTISED_Autoneg; +if (hw_link_info->requested_speeds &I40E_LINK_SPEED_20GB ) + *advertising |= ADVERTISED_20000baseKR2_Full; }if (phy_types &I40E_CAP_PHY_TYPE_10GBASE_KR ) { *supported |= SUPPORTED_10000baseKR_Full | SUPPORTED_Autoneg; - *advertising |= ADVERTISED_10000baseKR_Full | - ADVERTISED_Autoneg; + *advertising |= ADVERTISED_Autoneg; +if (hw_link_info->requested_speeds &I40E_LINK_SPEED_10GB ) + *advertising |= ADVERTISED_10000baseKR_Full; }if (phy_types &I40E_CAP_PHY_TYPE_10GBASE_KX4 ) { *supported |= SUPPORTED_10000baseKX4_Full | SUPPORTED_Autoneg; - *advertising |= ADVERTISED_10000baseKX4_Full | - ADVERTISED_Autoneg; + *advertising |= ADVERTISED_Autoneg; +if (hw_link_info->requested_speeds &I40E_LINK_SPEED_10GB ) + *advertising |= ADVERTISED_10000baseKX4_Full; }if (phy_types &I40E_CAP_PHY_TYPE_1000BASE_KX ) { *supported |= SUPPORTED_1000baseKX_Full | SUPPORTED_Autoneg; - *advertising |= ADVERTISED_1000baseKX_Full | - ADVERTISED_Autoneg; + *advertising |= ADVERTISED_Autoneg; +if (hw_link_info->requested_speeds &I40E_LINK_SPEED_1GB ) + *advertising |= ADVERTISED_1000baseKX_Full; } }
Signature · 1 line
2.4.11
Bowers
PATCH 1/7 i40e: Fix to show correct Advertised Link Modes when link is down
Quoted 17 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Bimmy Pujari
Sent: Monday, June 20, 2016 9:11 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PTACH S38-v2 1/7] i40e: Fix to show correct Advertised Link Modes when link is downFrom: Avinash Dayanand <[email protected]>
When link is down, Advertised Link Modes was wrongly displaying full supported link modes instead of Advertised link mode. Added conditional checks in order to make sure correct Advertised link modes are displayed when the link is down.
Signed-off-by Avinash Dayanand <[email protected]>Change-ID I8a61413f9ee174149c7a33157b5f0b0a8da9842d
Quoted 7 lines
---
Testing Hints: See HSD
HSD-number: 7660092drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 47 +++++++++++++++----- ------ 1 file changed, 28 insertions(+), 19 deletions(-)
Shows correct advertised link modes regardless of link state
PATCH 2/7 i40e: enable VSI broadcast promiscuous mode instead of adding broadcast filter
In reply to Bimmy PujariFrom: Kiran Patil <[email protected]>
This patch sets VSI brodcast promiscuous mode during VSI add sequence and prevents adding MAC filter if specified MAC address is broadcast.
---
Testing Hints :
1. Bring up network interface, assign IP address.
2. Make sure it can ping to link partner.
This proves that ARP request are processed correctly due to VSI broadcast promiscuous mode even though MAC filter for broadcast address is not programmed.
Likewise tried the test case mentioned in HSD where source MAC is broadcast and those packets are getting forwarded to one of the rx-queue.
HSD-number: 7661069
drivers/net/ethernet/intel/i40e/i40e_main.c | 32 ++++++++++++++++++----------- 1 file changed, 20 insertions(+), 12 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +20 -12
@@ -1344,6 +1344,13 @@ struct i40e_mac_filter *i40e_add_filter(struct i40e_vsi *vsi,if (!vsi || !macaddr)return NULL ; +/* Do not allow broadcast filter to be added since broadcast filter +* is added as part of add vsi for any newly created VSI except +* FDIR VSI +*/ +if (is_broadcast_ether_addr (macaddr)) +return NULL ; + f =i40e_find_filter (vsi, macaddr, vlan, is_vf, is_netdev);if (!f) { f =kzalloc (sizeof (*f),GFP_ATOMIC );
@@ -2179,18 +2186,6 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi) hw->aq.asq_last_status)); } } - aq_ret =i40e_aq_set_vsi_broadcast (&vsi->back->hw, - vsi->seid, - cur_promisc,NULL ); -if (aq_ret) { - retval =i40e_aq_rc_to_posix (aq_ret, - pf->hw.aq.asq_last_status); -dev_info (&pf->pdev->dev, -"set brdcast promisc failed, err %s, aq_err %s\n" , -i40e_stat_str (hw, aq_ret), -i40e_aq_str (hw, - hw->aq.asq_last_status)); - } } out:/* if something went wrong then set the changed flag so we try again */
@@ -9254,6 +9249,7 @@ int i40e_is_vsi_uplink_mode_veb(struct i40e_vsi *vsi)static int i40e_add_vsi (struct i40e_vsi *vsi) {int ret = -ENODEV ; +i40e_status aq_ret =0 ;u8 laa_macaddr[ETH_ALEN ];bool found_laa_mac_filter = false;struct i40e_pf *pf = vsi->back;
@@ -9443,6 +9439,18 @@ static int i40e_add_vsi(struct i40e_vsi *vsi) vsi->seid = ctxt.seid; vsi->id = ctxt.vsi_number; } +/* Except FDIR VSI, for all othet VSI set the broadcast filter */ +if (vsi->type !=I40E_VSI_FDIR ) { + aq_ret =i40e_aq_set_vsi_broadcast (hw, vsi->seid, true,NULL ); +if (aq_ret) { + ret =i40e_aq_rc_to_posix (aq_ret, + hw->aq.asq_last_status); +dev_info (&pf->pdev->dev, +"set brdcast promisc failed, err %s, aq_err %s\n" , +i40e_stat_str (hw, aq_ret), +i40e_aq_str (hw, hw->aq.asq_last_status)); + } + }spin_lock_bh (&vsi->mac_filter_list_lock);/* If macvlan filters already exist, force them to get loaded */
Signature · 1 line
2.4.11
Wyborny
PATCH 2/7 i40e: enable VSI broadcast promiscuous mode instead of adding broadcast filter
Please fix the patch description format below. There are two --- and there should only be one.
Thanks,
Carolyn
Quoted 23 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Bimmy Pujari
Sent: Monday, June 20, 2016 9:11 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PTACH S38-v2 2/7] i40e: enable VSI broadcast promiscuous mode instead of adding broadcast filterFrom: Kiran Patil <[email protected]>
This patch sets VSI brodcast promiscuous mode during VSI add sequence and prevents adding MAC filter if specified MAC address is broadcast.
Signed-off-by Kiran Patil <[email protected]>Change-ID Ia62251fca095bc449d0497fc44bec3a5a0136773---
Testing Hints :
1. Bring up network interface, assign IP address.
2. Make sure it can ping to link partner.
This proves that ARP request are processed correctly due to VSI broadcast promiscuous mode even though MAC filter for broadcast address is not programmed.
Quoted 8 lines
Likewise tried the test case mentioned in HSD where source MAC is broadcast and those packets are getting forwarded to one of the rx-queue.
HSD-number: 7661069
drivers/net/ethernet/intel/i40e/i40e_main.c | 32 ++++++++++++++++++-----------
[CMW] please remove the line above that contains the "---" Make sure the line that begins "drivers" is next to the one below that begins "1 file changed"
Quoted 78 lines
1 file changed, 20 insertions(+), 12 deletions(-)drivers/net/ethernet/intel/i40e/i40e_main.c +7
-0@@ -1344,6 +1344,13 @@ struct i40e_mac_filter *i40e_add_filter(struct i40e_vsi *vsi, if (!vsi || !macaddr)return NULL ; +/* Do not allow broadcast filter to be added since broadcast filter +* is added as part of add vsi for any newly created VSI except +* FDIR VSI +*/ +if (is_broadcast_ether_addr (macaddr)) +return NULL ; + f =i40e_find_filter (vsi, macaddr, vlan, is_vf, is_netdev);if (!f) {drivers/net/ethernet/intel/i40e/i40e_main.c +0
-12f =kzalloc (sizeof (*f),GFP_ATOMIC );@@ -2179,18 +2186,6 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi) hw->aq.asq_last_status)); } } - aq_ret =i40e_aq_set_vsi_broadcast (&vsi->back->hw, - vsi->seid, - cur_promisc,NULL ); -if (aq_ret) { - retval =i40e_aq_rc_to_posix (aq_ret, - pf->hw.aq.asq_last_status); -dev_info (&pf->pdev->dev, - "set brdcast promisc failed, err %s, aq_err %s\n", - i40e_stat_str(hw, aq_ret), -i40e_aq_str (hw, - hw->aq.asq_last_status)); - } } out:drivers/net/ethernet/intel/i40e/i40e_main.c +1
-0/* if something went wrong then set the changed flag so we try again */ @@ -9254,6 +9249,7 @@ int i40e_is_vsi_uplink_mode_veb(struct i40e_vsi *vsi)static int i40e_add_vsi (struct i40e_vsi *vsi) {int ret = -ENODEV ; +i40e_status aq_ret =0 ;u8 laa_macaddr[ETH_ALEN ];bool found_laa_mac_filter = false;drivers/net/ethernet/intel/i40e/i40e_main.c +12
-0struct i40e_pf *pf = vsi->back;@@ -9443,6 +9439,18 @@ static int i40e_add_vsi(struct i40e_vsi *vsi) vsi->seid = ctxt.seid; vsi->id = ctxt.vsi_number; } +/* Except FDIR VSI, for all othet VSI set the broadcast filter */ +if (vsi->type !=I40E_VSI_FDIR ) { + aq_ret =i40e_aq_set_vsi_broadcast (hw, vsi->seid, true,NULL ); +if (aq_ret) { + ret =i40e_aq_rc_to_posix (aq_ret, + hw->aq.asq_last_status); +dev_info (&pf->pdev->dev, + "set brdcast promisc failed, err %s, aq_err %s\n", + i40e_stat_str(hw, aq_ret), +i40e_aq_str (hw, hw->aq.asq_last_status)); + } + }spin_lock_bh (&vsi->mac_filter_list_lock);/* If macvlan filters already exist, force them to get loaded */
--
2.4.11_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan at lists.osuosl.org
http://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Pujari
PATCH 2/7 i40e: enable VSI broadcast promiscuous mode instead of adding broadcast filter
Hi Carolyn
I checked the patch there is no second ---.
May be you are seeing patch in small window that's why previous line is getting truncated & is showing up like a new line with --- in it. But my actual patch & email which I sent does not have that extra line.
If I am missing something please correct me.
Thanks
Bimmy
-----Original Message-----
From: Wyborny, Carolyn
Sent: Monday, June 20, 2016 11:17 AM
To: Pujari, Bimmy <[email protected]>; intel-wired-lan at lists.osuosl.org
Subject: RE: [Intel-wired-lan] [next PTACH S38-v2 2/7] i40e: enable VSI broadcast promiscuous mode instead of adding broadcast filter
Please fix the patch description format below. There are two --- and there should only be one.
Thanks,
Carolyn
Quoted 28 lines
-----Original Message-----
From: Intel-wired-lan
[mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Bimmy Pujari
Sent: Monday, June 20, 2016 9:11 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PTACH S38-v2 2/7] i40e: enable VSI broadcast promiscuous mode instead of adding broadcast filterFrom: Kiran Patil <[email protected]>
This patch sets VSI brodcast promiscuous mode during VSI add sequence and prevents adding MAC filter if specified MAC address is broadcast.
Signed-off-by Kiran Patil <[email protected]>Change-ID Ia62251fca095bc449d0497fc44bec3a5a0136773---
Testing Hints :
1. Bring up network interface, assign IP address.
2. Make sure it can ping to link partner.
This proves that ARP request are processed correctly due to VSI broadcast promiscuous mode even though MAC filter for broadcast address is not programmed.Likewise tried the test case mentioned in HSD where source MAC is broadcast and those packets are getting forwarded to one of the rx-queue.
Quoted 5 lines
HSD-number: 7661069
drivers/net/ethernet/intel/i40e/i40e_main.c | 32++++++++++++++++++--------
---
[CMW] please remove the line above that contains the "---" Make sure the line that begins "drivers" is next to the one below that begins "1 file changed"
Quoted 78 lines
1 file changed, 20 insertions(+), 12 deletions(-)drivers/net/ethernet/intel/i40e/i40e_main.c +7
-0@@ -1344,6 +1344,13 @@ struct i40e_mac_filter *i40e_add_filter(struct i40e_vsi *vsi, if (!vsi || !macaddr)return NULL ; +/* Do not allow broadcast filter to be added since broadcast filter +* is added as part of add vsi for any newly created VSI except +* FDIR VSI +*/ +if (is_broadcast_ether_addr (macaddr)) +return NULL ; + f =i40e_find_filter (vsi, macaddr, vlan, is_vf, is_netdev);if (!f) {f =
kzalloc(sizeof(*f), GFP_ATOMIC); @@ -2179,18 +2186,6 @@ inti40e_sync_vsi_filters(struct i40e_vsi *vsi)drivers/net/ethernet/intel/i40e/i40e_main.c +0
-8hw->aq.asq_last_status)); } } - aq_ret =i40e_aq_set_vsi_broadcast (&vsi->back->hw, - vsi->seid, - cur_promisc,NULL ); -if (aq_ret) { - retval =i40e_aq_rc_to_posix (aq_ret, - pf->hw.aq.asq_last_status); - dev_info(&pf->pdev->dev, - "set brdcast promisc failed, err %s, aq_err%s\n",
drivers/net/ethernet/intel/i40e/i40e_main.c +0
-4-i40e_stat_str (hw, aq_ret), -i40e_aq_str (hw, - hw->aq.asq_last_status)); - } } out:/* if something went wrong then set the changed flag so we try again */ @@ -9254,6 +9249,7 @@ int i40e_is_vsi_uplink_mode_veb(struct
i40e_vsi
*vsi)
static inti40e_add_vsi(struct i40e_vsi *vsi){drivers/net/ethernet/intel/i40e/i40e_main.c +13
-0int ret = -ENODEV ; +i40e_status aq_ret =0 ;u8 laa_macaddr[ETH_ALEN ];bool found_laa_mac_filter = false;struct i40e_pf *pf = vsi->back;@@ -9443,6 +9439,18 @@ static int i40e_add_vsi(struct i40e_vsi *vsi) vsi->seid = ctxt.seid; vsi->id = ctxt.vsi_number; } +/* Except FDIR VSI, for all othet VSI set the broadcast filter */ +if (vsi->type !=I40E_VSI_FDIR ) { + aq_ret =i40e_aq_set_vsi_broadcast (hw, vsi->seid, true,NULL ); +if (aq_ret) { + ret =i40e_aq_rc_to_posix (aq_ret, + hw->aq.asq_last_status); +dev_info (&pf->pdev->dev, + "set brdcast promisc failed, err %s, aq_err %s\n", + i40e_stat_str(hw, aq_ret), +i40e_aq_str (hw, hw->aq.asq_last_status)); + } + }spin_lock_bh (&vsi->mac_filter_list_lock);/* If macvlan filters already exist, force them to get loaded */
--
2.4.11_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan at lists.osuosl.org
http://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Wyborny
PATCH 2/7 i40e: enable VSI broadcast promiscuous mode instead of adding broadcast filter
That's possible Bimmy,
If the original patch only has the one triple dash its all good. 8-)
Thanks,
Carolyn
Quoted 148 lines
-----Original Message-----
From: Pujari, Bimmy
Sent: Monday, June 20, 2016 1:53 PM
To: Wyborny, Carolyn <[email protected]>; intel-wired- lan at lists.osuosl.org
Subject: RE: [Intel-wired-lan] [next PTACH S38-v2 2/7] i40e: enable VSI broadcast promiscuous mode instead of adding broadcast filterHi Carolyn
I checked the patch there is no second ---.
May be you are seeing patch in small window that's why previous line is getting truncated & is showing up like a new line with --- in it.
But my actual patch & email which I sent does not have that extra line. If I am missing something please correct me.Thanks
Bimmy-----Original Message-----
From: Wyborny, Carolyn
Sent: Monday, June 20, 2016 11:17 AM
To: Pujari, Bimmy <[email protected]>; intel-wired-lan at lists.osuosl.org
Subject: RE: [Intel-wired-lan] [next PTACH S38-v2 2/7] i40e: enable VSI broadcast promiscuous mode instead of adding broadcast filterPlease fix the patch description format below. There are two --- and there should only be one.
Thanks,
Carolyn
Quoted 28 lines
-----Original Message-----
From: Intel-wired-lan
[mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Bimmy Pujari
Sent: Monday, June 20, 2016 9:11 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PTACH S38-v2 2/7] i40e: enable VSI broadcast promiscuous mode instead of adding broadcast filterFrom: Kiran Patil <[email protected]>
This patch sets VSI brodcast promiscuous mode during VSI add sequence and prevents adding MAC filter if specified MAC address is broadcast.
Signed-off-by Kiran Patil <[email protected]>Change-ID Ia62251fca095bc449d0497fc44bec3a5a0136773---
Testing Hints :
1. Bring up network interface, assign IP address.
2. Make sure it can ping to link partner.
This proves that ARP request are processed correctly due to VSI broadcast promiscuous mode even though MAC filter for broadcast address is not programmed.Likewise tried the test case mentioned in HSD where source MAC is broadcast and those packets are getting forwarded to one of the rx-queue.
Quoted 5 lines
HSD-number: 7661069
drivers/net/ethernet/intel/i40e/i40e_main.c | 32++++++++++++++++++--------
---[CMW] please remove the line above that contains the "---" Make sure the line that begins "drivers" is next to the one below that begins "1 file changed"
Quoted 21 lines
1 file changed, 20 insertions(+), 12 deletions(-)drivers/net/ethernet/intel/i40e/i40e_main.c +7
-0@@ -1344,6 +1344,13 @@ struct i40e_mac_filter *i40e_add_filter(struct i40e_vsi *vsi, if (!vsi || !macaddr)return NULL ; +/* Do not allow broadcast filter to be added since broadcast filter +* is added as part of add vsi for any newly created VSI except +* FDIR VSI +*/ +if (is_broadcast_ether_addr (macaddr)) +return NULL ; + f =i40e_find_filter (vsi, macaddr, vlan, is_vf, is_netdev);if (!f) {Quoted 1 line
f =
kzalloc(sizeof(*f), GFP_ATOMIC); @@ -2179,18 +2186,6@@ int
Quoted 56 lines
i40e_sync_vsi_filters(struct i40e_vsi *vsi)drivers/net/ethernet/intel/i40e/i40e_main.c +0
-8hw->aq.asq_last_status)); } } - aq_ret =i40e_aq_set_vsi_broadcast (&vsi->back->hw, - vsi->seid, - cur_promisc,NULL ); -if (aq_ret) { - retval =i40e_aq_rc_to_posix (aq_ret, - pf->hw.aq.asq_last_status); - dev_info(&pf->pdev->dev, - "set brdcast promisc failed, err %s, aq_err%s\n",
drivers/net/ethernet/intel/i40e/i40e_main.c +0
-4-i40e_stat_str (hw, aq_ret), -i40e_aq_str (hw, - hw->aq.asq_last_status)); - } } out:/* if something went wrong then set the changed flag so we try again */ @@ -9254,6 +9249,7 @@ int i40e_is_vsi_uplink_mode_veb(struct
i40e_vsi
*vsi)
static inti40e_add_vsi(struct i40e_vsi *vsi){drivers/net/ethernet/intel/i40e/i40e_main.c +13
-0int ret = -ENODEV ; +i40e_status aq_ret =0 ;u8 laa_macaddr[ETH_ALEN ];bool found_laa_mac_filter = false;struct i40e_pf *pf = vsi->back;@@ -9443,6 +9439,18 @@ static int i40e_add_vsi(struct i40e_vsi *vsi) vsi->seid = ctxt.seid; vsi->id = ctxt.vsi_number; } +/* Except FDIR VSI, for all othet VSI set the broadcast filter */ +if (vsi->type !=I40E_VSI_FDIR ) { + aq_ret =i40e_aq_set_vsi_broadcast (hw, vsi->seid, true,NULL ); +if (aq_ret) { + ret =i40e_aq_rc_to_posix (aq_ret, + hw->aq.asq_last_status); +dev_info (&pf->pdev->dev, + "set brdcast promisc failed, err %s, aq_err %s\n", + i40e_stat_str(hw, aq_ret), +i40e_aq_str (hw, hw->aq.asq_last_status)); + } + }spin_lock_bh (&vsi->mac_filter_list_lock);/* If macvlan filters already exist, force them to get loaded */
--
2.4.11_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan at lists.osuosl.org
http://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Bowers
PATCH 2/7 i40e: enable VSI broadcast promiscuous mode instead of adding broadcast filter
In reply to Bimmy PujariQuoted 23 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Bimmy Pujari
Sent: Monday, June 20, 2016 9:11 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PTACH S38-v2 2/7] i40e: enable VSI broadcast promiscuous mode instead of adding broadcast filterFrom: Kiran Patil <[email protected]>
This patch sets VSI brodcast promiscuous mode during VSI add sequence and prevents adding MAC filter if specified MAC address is broadcast.
Signed-off-by Kiran Patil <[email protected]>Change-ID Ia62251fca095bc449d0497fc44bec3a5a0136773---
Testing Hints :
1. Bring up network interface, assign IP address.
2. Make sure it can ping to link partner.
This proves that ARP request are processed correctly due to VSI broadcast promiscuous mode even though MAC filter for broadcast address is not programmed.
Quoted 8 lines
Likewise tried the test case mentioned in HSD where source MAC is broadcast and those packets are getting forwarded to one of the rx-queue.
HSD-number: 7661069
drivers/net/ethernet/intel/i40e/i40e_main.c | 32 ++++++++++++++++++---- ------- 1 file changed, 20 insertions(+), 12 deletions(-)
Functions as expected
PATCH 3/7 i40e/i40evf: remove useless initializer
In reply to Bimmy PujariFrom: Mitch Williams <[email protected]>
This initializer isn't needed because the variable is assigned right away.
---
Testing Hints : No functionality changes.
drivers/net/ethernet/intel/i40e/i40e_txrx.c | 4 +--- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_txrx.c +1 -3
@@ -740,14 +740,12 @@ static bool i40e_clean_tx_irq(struct i40e_vsi *vsi, tx_ring->q_vector->tx.total_packets += total_packets;if (tx_ring->flags &I40E_TXR_FLAGS_WB_ON_ITR ) { -unsigned int j =0 ; -/* check to see if there are < 4 descriptors * waiting to be written back, then kick the hardware to force * them to be written back in case we stay in NAPI. * In this mode on X722 we do not enable Interrupt. */ - j =i40e_get_tx_pending (tx_ring, false); +unsigned int j =i40e_get_tx_pending (tx_ring, false); if (budget && ((j / (WB_STRIDE + 1)) == 0) && (j != 0) &&
drivers/net/ethernet/intel/i40evf/i40e_txrx.c +1 -2
@@ -259,13 +259,12 @@ static bool i40e_clean_tx_irq(struct i40e_vsi *vsi, tx_ring->q_vector->tx.total_packets += total_packets;if (tx_ring->flags &I40E_TXR_FLAGS_WB_ON_ITR ) { -unsigned int j =0 ;/* check to see if there are < 4 descriptors * waiting to be written back, then kick the hardware to force * them to be written back in case we stay in NAPI. * In this mode on X722 we do not enable Interrupt. */ - j =i40evf_get_tx_pending (tx_ring, false); +unsigned int j =i40evf_get_tx_pending (tx_ring, false); if (budget && ((j / (WB_STRIDE + 1)) == 0) && (j > 0) &&
Signature · 1 line
2.4.11
Bowers
PATCH 3/7 i40e/i40evf: remove useless initializer
Quoted 8 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Bimmy Pujari
Sent: Monday, June 20, 2016 9:11 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PTACH S38-v2 3/7] i40e/i40evf: remove useless initializer
Quoted 8 lines
From: Mitch Williams <[email protected]>
This initializer isn't needed because the variable is assigned right away.
Signed-off-by Mitch Williams <[email protected]>Change-ID I6ce3edb3f4e0364db248a7a0bcc62ca95c01d941---
Testing Hints : No functionality changes.
PATCH 4/7 i40e: Remove device ID 0x37D4
In reply to Bimmy PujariFrom: Catherine Sullivan <[email protected]>
This device ID is not needed, so take it out.
---
Testing Hints: Make sure device ID does not appear in devids.h and we compile, note that the ID will remain in the upstream pciid database.
drivers/net/ethernet/intel/i40e/i40e_common.c | 1 - drivers/net/ethernet/intel/i40e/i40e_devids.h | 1 - drivers/net/ethernet/intel/i40e/i40e_main.c | 1 - drivers/net/ethernet/intel/i40evf/i40e_common.c | 1 - drivers/net/ethernet/intel/i40evf/i40e_devids.h | 1 - 5 files changed, 5 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_common.c +0 -1
@@ -61,7 +61,6 @@ static i40e_status i40e_set_mac_type(struct i40e_hw *hw)case I40E_DEV_ID_1G_BASE_T_X722 :case I40E_DEV_ID_10G_BASE_T_X722 :case I40E_DEV_ID_SFP_I_X722 : -case I40E_DEV_ID_QSFP_I_X722 : hw->mac.type =I40E_MAC_X722 ;break ;default :
drivers/net/ethernet/intel/i40e/i40e_devids.h +0 -1
@@ -45,7 +45,6 @@#define I40E_DEV_ID_1G_BASE_T_X722 0x37D1#define I40E_DEV_ID_10G_BASE_T_X722 0x37D2#define I40E_DEV_ID_SFP_I_X722 0x37D3 -#define I40E_DEV_ID_QSFP_I_X722 0x37D4#define i40e_is_40G_device (d) ((d) == I40E_DEV_ID_QSFP_A || \ (d) == I40E_DEV_ID_QSFP_B || \
drivers/net/ethernet/intel/i40e/i40e_main.c +0 -1
@@ -91,7 +91,6 @@ static const struct pci_device_id i40e_pci_tbl[] = { {PCI_VDEVICE(INTEL, I40E_DEV_ID_1G_BASE_T_X722), 0}, {PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_BASE_T_X722), 0}, {PCI_VDEVICE(INTEL, I40E_DEV_ID_SFP_I_X722), 0}, - {PCI_VDEVICE(INTEL, I40E_DEV_ID_QSFP_I_X722), 0}, {PCI_VDEVICE(INTEL, I40E_DEV_ID_20G_KR2), 0}, {PCI_VDEVICE(INTEL, I40E_DEV_ID_20G_KR2_A), 0},/* required last entry */
drivers/net/ethernet/intel/i40evf/i40e_common.c +0 -1
@@ -59,7 +59,6 @@ i40e_status i40e_set_mac_type(struct i40e_hw *hw)case I40E_DEV_ID_1G_BASE_T_X722 :case I40E_DEV_ID_10G_BASE_T_X722 :case I40E_DEV_ID_SFP_I_X722 : -case I40E_DEV_ID_QSFP_I_X722 : hw->mac.type =I40E_MAC_X722 ;break ;case I40E_DEV_ID_X722_VF :
drivers/net/ethernet/intel/i40evf/i40e_devids.h +0 -1
@@ -45,7 +45,6 @@#define I40E_DEV_ID_1G_BASE_T_X722 0x37D1#define I40E_DEV_ID_10G_BASE_T_X722 0x37D2#define I40E_DEV_ID_SFP_I_X722 0x37D3 -#define I40E_DEV_ID_QSFP_I_X722 0x37D4#define I40E_DEV_ID_X722_VF 0x37CD#define I40E_DEV_ID_X722_VF_HV 0x37D9
Signature · 1 line
2.4.11
Bowers
PATCH 4/7 i40e: Remove device ID 0x37D4
Quoted 18 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Bimmy Pujari
Sent: Monday, June 20, 2016 9:11 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PTACH S38-v2 4/7] i40e: Remove device ID0x37D4From: Catherine Sullivan <[email protected]>
This device ID is not needed, so take it out.
Signed-off-by Catherine Sullivan <[email protected]>Change-ID I148d29f68a1f58b03980ecd83047a1b440f4f74d---
Testing Hints: Make sure device ID does not appear indevids.hand we compile, note that the ID will remain in the upstream pciid database.
Quoted 6 lines
drivers/net/ethernet/intel/i40e/i40e_common.c | 1 - drivers/net/ethernet/intel/i40e/i40e_devids.h | 1 - drivers/net/ethernet/intel/i40e/i40e_main.c | 1 - drivers/net/ethernet/intel/i40evf/i40e_common.c | 1 - drivers/net/ethernet/intel/i40evf/i40e_devids.h | 1 - 5 files changed, 5 deletions(-)
Device ID does not appear in .h file or in modinfo
PATCH 5/7 i40evf: add hyperv dev ids
In reply to Bimmy PujariFrom: "Joshua Hay" <[email protected]>
This patch adds the Hyper-V specific VF device ids.
--- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ethernet/intel/i40evf/i40evf_main.c +2 -0
@@ -57,7 +57,9 @@ static const char i40evf_copyright[] =*/ static const struct pci_device_id i40evf_pci_tbl[] = { {PCI_VDEVICE (INTEL ,I40E_DEV_ID_VF ),0 }, + {PCI_VDEVICE (INTEL ,I40E_DEV_ID_VF_HV ),0 }, {PCI_VDEVICE (INTEL ,I40E_DEV_ID_X722_VF ),0 }, + {PCI_VDEVICE (INTEL ,I40E_DEV_ID_X722_VF_HV ),0 },/* required last entry */ {0 , } };
Signature · 1 line
2.4.11
Bowers
PATCH 5/7 i40evf: add hyperv dev ids
Quoted 9 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Bimmy Pujari
Sent: Monday, June 20, 2016 9:11 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PTACH S38-v2 5/7] i40evf: add hyperv dev idsFrom: "Joshua Hay" <[email protected]>
Quoted 7 lines
This patch adds the Hyper-V specific VF device ids.
Signed-off-by Joshua Hay <[email protected]>Change-ID I9c4fe6d8dfd34f7f68ebc9fdae225c8768439c89--- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 ++ 1 file changed, 2 insertions(+)
Updated device IDs shown as expected
PATCH 6/7 i40e: refactor rx filter handling
In reply to Bimmy PujariFrom: Mitch Williams <[email protected]>
Properly track filter adds and deletes so the driver doesn't lose filters during resets and up/down cycles. Add a tracking mechanism so that the driver knows when to enter and leave promiscuous mode.
Implement a simple state machine so the driver can track the status of each filter throughout its lifecycle. Properly manage the overflow promiscuous state for the each VSI, and provide a way for the driver to detect when to exit overflow promiscuous mode.
Remove all possible default MAC filters that the firmware may have set up so that the driver can manage these correctly, particularly when VLANs come into play. Remove the LAA flag for filters; instead just send whatever we get through set_mac to the firmware as the LAA for wakeup purposes.
Finally, add the state of each filter to debugfs output so we can see what's going on inside the driver's pointy little head.
---
Testing Hints : Add many filters (at least 2000). See the device go into promiscuous mode. Remove all of these filters and watch the device come back from promiscuous mode. Do resets during all stages of this process and make sure the filter state is consistent throughout using debugfs.
drivers/net/ethernet/intel/i40e/i40e.h | 14 +- drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 16 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 512 ++++++++++++------------- 3 files changed, 262 insertions(+), 280 deletions(-)
drivers/net/ethernet/intel/i40e/i40e.h +12 -2
@@ -448,6 +448,14 @@ struct i40e_pf {u16 phy_led_val; }; +enum i40e_filter_state { +I40E_FILTER_INVALID =0 ,/* Invalid state */ +I40E_FILTER_NEW ,/* New, not sent to FW yet */ +I40E_FILTER_ACTIVE ,/* Added to switch by FW */ +I40E_FILTER_FAILED ,/* Rejected by FW */ +I40E_FILTER_REMOVE ,/* To be removed */ +/* There is no 'removed' state; the filter struct is freed */ +};struct i40e_mac_filter {struct list_head list;u8 macaddr[ETH_ALEN ];
@@ -456,8 +464,7 @@ struct i40e_mac_filter {u8 counter;/* number of instances of this filter */ bool is_vf;/* filter belongs to a VF */ bool is_netdev;/* filter belongs to a netdev */ -bool changed;/* filter needs to be sync'd to the HW */ -bool is_laa;/* filter is a Locally Administered Address */ +enum i40e_filter_state state; };struct i40e_veb {
@@ -523,6 +530,9 @@ struct i40e_vsi {struct i40e_ring **rx_rings;struct i40e_ring **tx_rings; +u32 active_filters; +u32 promisc_threshold; +u16 work_limit;u16 int_rate_limit;/* value in usecs */
drivers/net/ethernet/intel/i40e/i40e_debugfs.c +14 -2
@@ -116,6 +116,14 @@ static ssize_t i40e_dbg_command_read(struct file *filp, char __user *buffer,return len; } +static char *i40e_filter_state_string[] = { +"INVALID" , +"NEW" , +"ACTIVE" , +"FAILED" , +"REMOVE" , +}; +/** * i40e_dbg_dump_vsi_seid - handles dump vsi seid write into command datum * @pf: the i40e_pf created in command write
@@ -160,10 +168,14 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid) pf->hw.mac.port_addr);list_for_each_entry (f, &vsi->mac_filter_list, list) {dev_info (&pf->pdev->dev, -" mac_filter_list: %pM vid=%d, is_netdev=%d is_vf=%d counter=%d\n" , +" mac_filter_list: %pM vid=%d, is_netdev=%d is_vf=%d counter=%d, state %s\n" , f->macaddr, f->vlan, f->is_netdev, f->is_vf, - f->counter); + f->counter, i40e_filter_state_string[f->state]); } +dev_info (&pf->pdev->dev," active_filters %d, promisc_threshold %d, overflow promisc %s\n" , + vsi->active_filters, vsi->promisc_threshold, + (test_bit (__I40E_FILTER_OVERFLOW_PROMISC, &vsi->state) ? +"ON" :"OFF" )); nstat =i40e_get_vsi_stats_struct (vsi); dev_info(&pf->pdev->dev, " net_stats: rx_packets = %lu, rx_bytes = %lu, rx_errors = %lu, rx_dropped = %lu\n",
drivers/net/ethernet/intel/i40e/i40e_main.c +236 -276
825 lines not on this page · raw message
Signature · 1 line
2.4.11
Bowers
PATCH 6/7 i40e: refactor rx filter handling
Quoted 35 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Bimmy Pujari
Sent: Monday, June 20, 2016 9:11 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PTACH S38-v2 6/7] i40e: refactor rx filter handlingFrom: Mitch Williams <[email protected]>
Properly track filter adds and deletes so the driver doesn't lose filters during resets and up/down cycles. Add a tracking mechanism so that the driver knows when to enter and leave promiscuous mode.
Implement a simple state machine so the driver can track the status of each filter throughout its lifecycle. Properly manage the overflow promiscuous state for the each VSI, and provide a way for the driver to detect when to exit overflow promiscuous mode.
Remove all possible default MAC filters that the firmware may have set up so that the driver can manage these correctly, particularly when VLANs come into play. Remove the LAA flag for filters; instead just send whatever we get through
set_macto the firmware as the LAA for wakeup purposes.Finally, add the state of each filter to debugfs output so we can see what's going on inside the driver's pointy little head.
Signed-off-by Mitch Williams <[email protected]>Change-ID I97c5e366fac2254fa01eaff4f65c0af61dcf2e1f---
Testing Hints : Add many filters (at least 2000). See the device go into promiscuous mode. Remove all of these filters and watch the device come back from promiscuous mode. Do resets during all stages of this process and make sure the filter state is consistent throughout using debugfs.
Quoted 5 lines
drivers/net/ethernet/intel/i40e/i40e.h | 14 +- drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 16 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 512 ++++++++++++---------- --- 3 files changed, 262 insertions(+), 280 deletions(-)
Functions as expected
PATCH 7/7 i40e/i40evf-bump version to 1.6.11
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
@@ -46,7 +46,7 @@ static const char i40e_driver_string[] =#define DRV_VERSION_MAJOR 1#define DRV_VERSION_MINOR 6 -#define DRV_VERSION_BUILD 4 +#define DRV_VERSION_BUILD 11#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
@@ -38,7 +38,7 @@ static const char i40evf_driver_string[] =#define DRV_VERSION_MAJOR 1#define DRV_VERSION_MINOR 6 -#define DRV_VERSION_BUILD 4 +#define DRV_VERSION_BUILD 11#define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \ __stringify(DRV_VERSION_MINOR) "." \ __stringify(DRV_VERSION_BUILD) \
Signature · 1 line
2.4.11
Bowers
PATCH 7/7 i40e/i40evf-bump version to 1.6.11
Quoted 8 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Bimmy Pujari
Sent: Monday, June 20, 2016 9:11 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PTACH S38-v2 7/7] i40e/i40evf-bump version to 1.6.11
Quoted 5 lines
Signed-off-by Bimmy Pujari <[email protected]>--- 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