Skip to content

Commit f23e0f6

Browse files
committed
Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2016-05-14 This series contains updates to i40e and i40evf. Kevin adds support to disable link on all ports and changes bits set for telling firmware the PHY needs to be modified by the driver. Anjali adds a feature to enable/disable all multicast for a trusted VF. Added priv-flag knob to configure global true promiscuous support. Shannon adds the support code for calling the admin queue API call aq_set_switch_config(). Mitch modifies the VF, to log a message if an untrusted VF attempts to configure promiscuous mode, but lies to it and returns everything is ok instead of returning an error. Corrects the logic for reporting the receive packet hash. Fixed the adding of a broadcast filter for VFs, since that all VSIs are configured to receive broadcasts as default, so do not need to add a filter. Catherine refactors the ethtool get_settings to report the possible supported link modes from what we know about the current PHY type and that with the firmware supported PHY types. Jacob changes the driver to use WARN_ONCE in order to highlight the issue, but do not display a warning every time when receive hang message is received. Akeem corrects receive ptype payload layer for non_tunneled IPv6, when it should be layer 4 for UDP, instead of layer 3. Dan Carpenter fixes an uninitialized variable bug. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents bf14e9e + 1c306f7 commit f23e0f6

File tree

13 files changed

+330
-165
lines changed

13 files changed

+330
-165
lines changed

drivers/net/ethernet/intel/i40e/i40e.h

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,12 @@
9797
#define I40E_INT_NAME_STR_LEN (IFNAMSIZ + 16)
9898

9999
/* Ethtool Private Flags */
100-
#define I40E_PRIV_FLAGS_NPAR_FLAG BIT(0)
101-
#define I40E_PRIV_FLAGS_LINKPOLL_FLAG BIT(1)
102-
#define I40E_PRIV_FLAGS_FD_ATR BIT(2)
103-
#define I40E_PRIV_FLAGS_VEB_STATS BIT(3)
104-
#define I40E_PRIV_FLAGS_HW_ATR_EVICT BIT(5)
100+
#define I40E_PRIV_FLAGS_MFP_FLAG BIT(0)
101+
#define I40E_PRIV_FLAGS_LINKPOLL_FLAG BIT(1)
102+
#define I40E_PRIV_FLAGS_FD_ATR BIT(2)
103+
#define I40E_PRIV_FLAGS_VEB_STATS BIT(3)
104+
#define I40E_PRIV_FLAGS_HW_ATR_EVICT BIT(4)
105+
#define I40E_PRIV_FLAGS_TRUE_PROMISC_SUPPORT BIT(5)
105106

106107
#define I40E_NVM_VERSION_LO_SHIFT 0
107108
#define I40E_NVM_VERSION_LO_MASK (0xff << I40E_NVM_VERSION_LO_SHIFT)
@@ -111,7 +112,9 @@
111112
#define I40E_OEM_VER_PATCH_MASK 0xff
112113
#define I40E_OEM_VER_BUILD_SHIFT 8
113114
#define I40E_OEM_VER_SHIFT 24
114-
#define I40E_PHY_DEBUG_PORT BIT(4)
115+
#define I40E_PHY_DEBUG_ALL \
116+
(I40E_AQ_PHY_DEBUG_DISABLE_LINK_FW | \
117+
I40E_AQ_PHY_DEBUG_DISABLE_ALL_LINK_FW)
115118

116119
/* The values in here are decimal coded as hex as is the case in the NVM map*/
117120
#define I40E_CURRENT_NVM_VERSION_HI 0x2
@@ -356,6 +359,7 @@ struct i40e_pf {
356359
#define I40E_FLAG_STOP_FW_LLDP BIT_ULL(47)
357360
#define I40E_FLAG_HAVE_10GBASET_PHY BIT_ULL(48)
358361
#define I40E_FLAG_PF_MAC BIT_ULL(50)
362+
#define I40E_FLAG_TRUE_PROMISC_SUPPORT BIT_ULL(51)
359363

360364
/* tracks features that get auto disabled by errors */
361365
u64 auto_disable_flags;

drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1833,7 +1833,10 @@ struct i40e_aqc_set_phy_debug {
18331833
#define I40E_AQ_PHY_DEBUG_RESET_EXTERNAL_NONE 0x00
18341834
#define I40E_AQ_PHY_DEBUG_RESET_EXTERNAL_HARD 0x01
18351835
#define I40E_AQ_PHY_DEBUG_RESET_EXTERNAL_SOFT 0x02
1836+
/* Disable link manageability on a single port */
18361837
#define I40E_AQ_PHY_DEBUG_DISABLE_LINK_FW 0x10
1838+
/* Disable link manageability on all ports */
1839+
#define I40E_AQ_PHY_DEBUG_DISABLE_ALL_LINK_FW 0x20
18371840
u8 reserved[15];
18381841
};
18391842

drivers/net/ethernet/intel/i40e/i40e_common.c

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ struct i40e_rx_ptype_decoded i40e_ptype_lookup[] = {
696696
/* Non Tunneled IPv6 */
697697
I40E_PTT(88, IP, IPV6, FRG, NONE, NONE, NOF, NONE, PAY3),
698698
I40E_PTT(89, IP, IPV6, NOF, NONE, NONE, NOF, NONE, PAY3),
699-
I40E_PTT(90, IP, IPV6, NOF, NONE, NONE, NOF, UDP, PAY3),
699+
I40E_PTT(90, IP, IPV6, NOF, NONE, NONE, NOF, UDP, PAY4),
700700
I40E_PTT_UNUSED_ENTRY(91),
701701
I40E_PTT(92, IP, IPV6, NOF, NONE, NONE, NOF, TCP, PAY4),
702702
I40E_PTT(93, IP, IPV6, NOF, NONE, NONE, NOF, SCTP, PAY4),
@@ -1972,10 +1972,12 @@ i40e_status i40e_aq_add_vsi(struct i40e_hw *hw,
19721972
* @seid: vsi number
19731973
* @set: set unicast promiscuous enable/disable
19741974
* @cmd_details: pointer to command details structure or NULL
1975+
* @rx_only_promisc: flag to decide if egress traffic gets mirrored in promisc
19751976
**/
19761977
i40e_status i40e_aq_set_vsi_unicast_promiscuous(struct i40e_hw *hw,
19771978
u16 seid, bool set,
1978-
struct i40e_asq_cmd_details *cmd_details)
1979+
struct i40e_asq_cmd_details *cmd_details,
1980+
bool rx_only_promisc)
19791981
{
19801982
struct i40e_aq_desc desc;
19811983
struct i40e_aqc_set_vsi_promiscuous_modes *cmd =
@@ -1988,8 +1990,9 @@ i40e_status i40e_aq_set_vsi_unicast_promiscuous(struct i40e_hw *hw,
19881990

19891991
if (set) {
19901992
flags |= I40E_AQC_SET_VSI_PROMISC_UNICAST;
1991-
if (((hw->aq.api_maj_ver == 1) && (hw->aq.api_min_ver >= 5)) ||
1992-
(hw->aq.api_maj_ver > 1))
1993+
if (rx_only_promisc &&
1994+
(((hw->aq.api_maj_ver == 1) && (hw->aq.api_min_ver >= 5)) ||
1995+
(hw->aq.api_maj_ver > 1)))
19931996
flags |= I40E_AQC_SET_VSI_PROMISC_TX;
19941997
}
19951998

@@ -2282,6 +2285,35 @@ i40e_status i40e_aq_get_switch_config(struct i40e_hw *hw,
22822285
return status;
22832286
}
22842287

2288+
/**
2289+
* i40e_aq_set_switch_config
2290+
* @hw: pointer to the hardware structure
2291+
* @flags: bit flag values to set
2292+
* @valid_flags: which bit flags to set
2293+
* @cmd_details: pointer to command details structure or NULL
2294+
*
2295+
* Set switch configuration bits
2296+
**/
2297+
enum i40e_status_code i40e_aq_set_switch_config(struct i40e_hw *hw,
2298+
u16 flags,
2299+
u16 valid_flags,
2300+
struct i40e_asq_cmd_details *cmd_details)
2301+
{
2302+
struct i40e_aq_desc desc;
2303+
struct i40e_aqc_set_switch_config *scfg =
2304+
(struct i40e_aqc_set_switch_config *)&desc.params.raw;
2305+
enum i40e_status_code status;
2306+
2307+
i40e_fill_default_direct_cmd_desc(&desc,
2308+
i40e_aqc_opc_set_switch_config);
2309+
scfg->flags = cpu_to_le16(flags);
2310+
scfg->valid_flags = cpu_to_le16(valid_flags);
2311+
2312+
status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
2313+
2314+
return status;
2315+
}
2316+
22852317
/**
22862318
* i40e_aq_get_firmware_version
22872319
* @hw: pointer to the hw struct

0 commit comments

Comments
 (0)