|
@@ -231,6 +231,7 @@ static const char i40e_gstrings_test[][ETH_GSTRING_LEN] = {
|
|
|
static const char i40e_priv_flags_strings[][ETH_GSTRING_LEN] = {
|
|
|
"NPAR",
|
|
|
"LinkPolling",
|
|
|
+ "flow-director-atr",
|
|
|
};
|
|
|
|
|
|
#define I40E_PRIV_FLAGS_STR_LEN ARRAY_SIZE(i40e_priv_flags_strings)
|
|
@@ -2666,6 +2667,8 @@ static u32 i40e_get_priv_flags(struct net_device *dev)
|
|
|
I40E_PRIV_FLAGS_NPAR_FLAG : 0;
|
|
|
ret_flags |= pf->flags & I40E_FLAG_LINK_POLLING_ENABLED ?
|
|
|
I40E_PRIV_FLAGS_LINKPOLL_FLAG : 0;
|
|
|
+ ret_flags |= pf->flags & I40E_FLAG_FD_ATR_ENABLED ?
|
|
|
+ I40E_PRIV_FLAGS_FD_ATR : 0;
|
|
|
|
|
|
return ret_flags;
|
|
|
}
|
|
@@ -2686,6 +2689,17 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)
|
|
|
else
|
|
|
pf->flags &= ~I40E_FLAG_LINK_POLLING_ENABLED;
|
|
|
|
|
|
+ /* allow the user to control the state of the Flow
|
|
|
+ * Director ATR (Application Targeted Routing) feature
|
|
|
+ * of the driver
|
|
|
+ */
|
|
|
+ if (flags & I40E_PRIV_FLAGS_FD_ATR) {
|
|
|
+ pf->flags |= I40E_FLAG_FD_ATR_ENABLED;
|
|
|
+ } else {
|
|
|
+ pf->flags &= ~I40E_FLAG_FD_ATR_ENABLED;
|
|
|
+ pf->auto_disable_flags |= I40E_FLAG_FD_ATR_ENABLED;
|
|
|
+ }
|
|
|
+
|
|
|
return 0;
|
|
|
}
|
|
|
|