i40e: Add support for a new feature: Total Port Shutdown
Subsystems (2)
PATCH 1/1 i40e: Add support for a new feature: Total Port Shutdown
From: Arkadiusz Kubalewski <[email protected]>
Currently after requesting to down a link on a physical network port, the traffic is no longer being processed but the physical link with a link partner is still established.
Total Port Shutdown allows to completely shutdown the port on the link-down procedure by physically removing the link from the port.
Introduced changes:
- probe NVM if the feature was enabled at initialization of the port
- special handling on link-down procedure to let FW physically shutdown the port if the feature was enabled
Testing Hints (required if no HSD):
Link up/down, link-down-on-close
Signed-off-by Arkadiusz Kubalewski <[email protected]>
Signed-off-by Piotr Kwapulinski <[email protected]>
Signed-off-by Aleksandr Loktionov <[email protected]>
--- drivers/net/ethernet/intel/i40e/i40e.h | 1 + .../net/ethernet/intel/i40e/i40e_ethtool.c | 8 ++ drivers/net/ethernet/intel/i40e/i40e_main.c | 125 +++++++++++++++--- 3 files changed, 113 insertions(+), 21 deletions(-)
drivers/net/ethernet/intel/i40e/i40e.h +1 -0
@@ -567,6 +567,7 @@ struct i40e_pf {#define I40E_FLAG_DISABLE_FW_LLDP BIT(24)#define I40E_FLAG_RS_FEC BIT(25)#define I40E_FLAG_BASE_R_FEC BIT(26) +#define I40E_FLAG_TOTAL_PORT_SHUTDOWN BIT(27)struct i40e_client_instance *cinst;bool stat_offsets_loaded;
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +8 -0
@@ -428,6 +428,7 @@ struct i40e_priv_flags {static const struct i40e_priv_flags i40e_gstrings_priv_flags[] = {/* NOTE: MFP setting cannot be changed */ I40E_PRIV_FLAG ("MFP" ,I40E_FLAG_MFP_ENABLED ,1 ), +I40E_PRIV_FLAG ("total-port-shutdown" ,I40E_FLAG_TOTAL_PORT_SHUTDOWN ,1 ),I40E_PRIV_FLAG ("LinkPolling" ,I40E_FLAG_LINK_POLLING_ENABLED ,0 ),I40E_PRIV_FLAG ("flow-director-atr" ,I40E_FLAG_FD_ATR_ENABLED ,0 ),I40E_PRIV_FLAG ("veb-stats" ,I40E_FLAG_VEB_STATS_ENABLED ,0 ),
@@ -5006,6 +5007,13 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)dev_warn (&pf->pdev->dev,"Cannot change FEC config\n" ); } +if ((changed_flags &I40E_FLAG_LINK_DOWN_ON_CLOSE_ENABLED ) && + (orig_flags &I40E_FLAG_TOTAL_PORT_SHUTDOWN )) { +dev_err (&pf->pdev->dev, +"Setting link-down-on-close not supported on this port\n" ); +return -EOPNOTSUPP ; + } +if ((changed_flags & new_flags &I40E_FLAG_LINK_DOWN_ON_CLOSE_ENABLED ) && (new_flags &I40E_FLAG_MFP_ENABLED ))
drivers/net/ethernet/intel/i40e/i40e_main.c +104 -21
190 lines not on this page · raw message
Signature · 11 lines
2.26.0 -------------------------------------------------------------------- Intel Technology Poland sp. z o.o. ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN. Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione. This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.