* [Intel-wired-lan] [PATCH S46 2/9] ice: Always clear QRXFLXP_CNTXT before writing new value
2020-05-16 0:54 [Intel-wired-lan] [PATCH S46 1/9] ice: Reset VF for all port VLAN changes from host Tony Nguyen
@ 2020-05-16 0:54 ` Tony Nguyen
2020-05-28 23:18 ` Bowers, AndrewX
2020-05-16 0:55 ` [Intel-wired-lan] [PATCH S46 3/9] ice: Fix inability to set channels when down Tony Nguyen
` (7 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Tony Nguyen @ 2020-05-16 0:54 UTC (permalink / raw)
To: intel-wired-lan
From: Brett Creeley <brett.creeley@intel.com>
Always clear the previous value in QRXFLXP_CNTXT before writing a new
value. This will make it so re-used queues will not accidentally take the
previously configured settings.
Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ice/ice_base.c | 33 ++++++++---------------
drivers/net/ethernet/intel/ice/ice_lib.c | 26 ++++++++++++++++++
drivers/net/ethernet/intel/ice/ice_lib.h | 3 +++
3 files changed, 40 insertions(+), 22 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_base.c b/drivers/net/ethernet/intel/ice/ice_base.c
index 798b173e81e0..04be6f2d1861 100644
--- a/drivers/net/ethernet/intel/ice/ice_base.c
+++ b/drivers/net/ethernet/intel/ice/ice_base.c
@@ -2,6 +2,7 @@
/* Copyright (c) 2019, Intel Corporation. */
#include "ice_base.h"
+#include "ice_lib.h"
#include "ice_dcb_lib.h"
/**
@@ -285,7 +286,6 @@ static int ice_setup_rx_ctx(struct ice_ring *ring)
u32 rxdid = ICE_RXDID_FLEX_NIC;
struct ice_rlan_ctx rlan_ctx;
struct ice_hw *hw;
- u32 regval;
u16 pf_q;
int err;
@@ -346,27 +346,16 @@ static int ice_setup_rx_ctx(struct ice_ring *ring)
/* Rx queue threshold in units of 64 */
rlan_ctx.lrxqthresh = 1;
- /* Enable Flexible Descriptors in the queue context which
- * allows this driver to select a specific receive descriptor format
- */
- regval = rd32(hw, QRXFLXP_CNTXT(pf_q));
- if (vsi->type != ICE_VSI_VF) {
- regval |= (rxdid << QRXFLXP_CNTXT_RXDID_IDX_S) &
- QRXFLXP_CNTXT_RXDID_IDX_M;
-
- /* increasing context priority to pick up profile ID;
- * default is 0x01; setting to 0x03 to ensure profile
- * is programming if prev context is of same priority
- */
- regval |= (0x03 << QRXFLXP_CNTXT_RXDID_PRIO_S) &
- QRXFLXP_CNTXT_RXDID_PRIO_M;
-
- } else {
- regval &= ~(QRXFLXP_CNTXT_RXDID_IDX_M |
- QRXFLXP_CNTXT_RXDID_PRIO_M |
- QRXFLXP_CNTXT_TS_M);
- }
- wr32(hw, QRXFLXP_CNTXT(pf_q), regval);
+ /* Enable Flexible Descriptors in the queue context which
+ * allows this driver to select a specific receive descriptor format
+ * increasing context priority to pick up profile ID; default is 0x01;
+ * setting to 0x03 to ensure profile is programming if prev context is
+ * of same priority
+ */
+ if (vsi->type != ICE_VSI_VF)
+ ice_write_qrxflxp_cntxt(hw, pf_q, rxdid, 0x3);
+ else
+ ice_write_qrxflxp_cntxt(hw, pf_q, ICE_RXDID_LEGACY_1, 0x3);
/* Absolute queue number out of 2K needs to be passed */
err = ice_write_rxq_ctx(hw, &rlan_ctx, pf_q);
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index 7ab7408b3a05..7cd4afcade13 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -1630,6 +1630,32 @@ void ice_vsi_cfg_frame_size(struct ice_vsi *vsi)
}
}
+/**
+ * ice_write_qrxflxp_cntxt - write/configure QRXFLXP_CNTXT register
+ * @hw: HW pointer
+ * @pf_q: index of the Rx queue in the PF's queue space
+ * @rxdid: flexible descriptor RXDID
+ * @prio: priority for the RXDID for this queue
+ */
+void
+ice_write_qrxflxp_cntxt(struct ice_hw *hw, u16 pf_q, u32 rxdid, u32 prio)
+{
+ int regval = rd32(hw, QRXFLXP_CNTXT(pf_q));
+
+ /* clear any previous values */
+ regval &= ~(QRXFLXP_CNTXT_RXDID_IDX_M |
+ QRXFLXP_CNTXT_RXDID_PRIO_M |
+ QRXFLXP_CNTXT_TS_M);
+
+ regval |= (rxdid << QRXFLXP_CNTXT_RXDID_IDX_S) &
+ QRXFLXP_CNTXT_RXDID_IDX_M;
+
+ regval |= (prio << QRXFLXP_CNTXT_RXDID_PRIO_S) &
+ QRXFLXP_CNTXT_RXDID_PRIO_M;
+
+ wr32(hw, QRXFLXP_CNTXT(pf_q), regval);
+}
+
/**
* ice_vsi_cfg_rxqs - Configure the VSI for Rx
* @vsi: the VSI being configured
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.h b/drivers/net/ethernet/intel/ice/ice_lib.h
index 0d11a3dbed78..9223d3e88869 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.h
+++ b/drivers/net/ethernet/intel/ice/ice_lib.h
@@ -76,6 +76,9 @@ int ice_vsi_rebuild(struct ice_vsi *vsi, bool init_vsi);
bool ice_is_reset_in_progress(unsigned long *state);
+void
+ice_write_qrxflxp_cntxt(struct ice_hw *hw, u16 pf_q, u32 rxdid, u32 prio);
+
void ice_vsi_put_qs(struct ice_vsi *vsi);
void ice_vsi_dis_irq(struct ice_vsi *vsi);
--
2.20.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Intel-wired-lan] [PATCH S46 2/9] ice: Always clear QRXFLXP_CNTXT before writing new value
2020-05-16 0:54 ` [Intel-wired-lan] [PATCH S46 2/9] ice: Always clear QRXFLXP_CNTXT before writing new value Tony Nguyen
@ 2020-05-28 23:18 ` Bowers, AndrewX
0 siblings, 0 replies; 18+ messages in thread
From: Bowers, AndrewX @ 2020-05-28 23:18 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Tony Nguyen
> Sent: Friday, May 15, 2020 5:55 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH S46 2/9] ice: Always clear QRXFLXP_CNTXT
> before writing new value
>
> From: Brett Creeley <brett.creeley@intel.com>
>
> Always clear the previous value in QRXFLXP_CNTXT before writing a new
> value. This will make it so re-used queues will not accidentally take the
> previously configured settings.
>
> Signed-off-by: Brett Creeley <brett.creeley@intel.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_base.c | 33 ++++++++---------------
> drivers/net/ethernet/intel/ice/ice_lib.c | 26 ++++++++++++++++++
> drivers/net/ethernet/intel/ice/ice_lib.h | 3 +++
> 3 files changed, 40 insertions(+), 22 deletions(-)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Intel-wired-lan] [PATCH S46 3/9] ice: Fix inability to set channels when down
2020-05-16 0:54 [Intel-wired-lan] [PATCH S46 1/9] ice: Reset VF for all port VLAN changes from host Tony Nguyen
2020-05-16 0:54 ` [Intel-wired-lan] [PATCH S46 2/9] ice: Always clear QRXFLXP_CNTXT before writing new value Tony Nguyen
@ 2020-05-16 0:55 ` Tony Nguyen
2020-05-28 23:18 ` Bowers, AndrewX
2020-05-16 0:55 ` [Intel-wired-lan] [PATCH S46 4/9] ice: Allow VF to request reset as soon as it's initialized Tony Nguyen
` (6 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Tony Nguyen @ 2020-05-16 0:55 UTC (permalink / raw)
To: intel-wired-lan
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
Currently the driver prevents a user from doing
modprobe ice
ethtool -L eth0 combined 5
ip link set eth0 up
The ethtool command fails, because the driver is checking to see if the
interface is down before allowing the get_channels to proceed (even for
a set_channels).
Remove this check and allow the user to configure the interface
before bringing it up, which is a much better usability case.
Fixes: 87324e747fde ("ice: Implement ethtool ops for channels")
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
---
drivers/net/ethernet/intel/ice/ice_ethtool.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c
index fd1849155d85..68c38004a088 100644
--- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
+++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
@@ -3189,10 +3189,6 @@ ice_get_channels(struct net_device *dev, struct ethtool_channels *ch)
struct ice_vsi *vsi = np->vsi;
struct ice_pf *pf = vsi->back;
- /* check to see if VSI is active */
- if (test_bit(__ICE_DOWN, vsi->state))
- return;
-
/* report maximum channels */
ch->max_rx = ice_get_max_rxq(pf);
ch->max_tx = ice_get_max_txq(pf);
--
2.20.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Intel-wired-lan] [PATCH S46 3/9] ice: Fix inability to set channels when down
2020-05-16 0:55 ` [Intel-wired-lan] [PATCH S46 3/9] ice: Fix inability to set channels when down Tony Nguyen
@ 2020-05-28 23:18 ` Bowers, AndrewX
0 siblings, 0 replies; 18+ messages in thread
From: Bowers, AndrewX @ 2020-05-28 23:18 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Tony Nguyen
> Sent: Friday, May 15, 2020 5:55 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH S46 3/9] ice: Fix inability to set channels
> when down
>
> From: Jesse Brandeburg <jesse.brandeburg@intel.com>
>
> Currently the driver prevents a user from doing modprobe ice ethtool -L eth0
> combined 5 ip link set eth0 up
>
> The ethtool command fails, because the driver is checking to see if the
> interface is down before allowing the get_channels to proceed (even for a
> set_channels).
>
> Remove this check and allow the user to configure the interface before
> bringing it up, which is a much better usability case.
>
> Fixes: 87324e747fde ("ice: Implement ethtool ops for channels")
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_ethtool.c | 4 ----
> 1 file changed, 4 deletions(-)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Intel-wired-lan] [PATCH S46 4/9] ice: Allow VF to request reset as soon as it's initialized
2020-05-16 0:54 [Intel-wired-lan] [PATCH S46 1/9] ice: Reset VF for all port VLAN changes from host Tony Nguyen
2020-05-16 0:54 ` [Intel-wired-lan] [PATCH S46 2/9] ice: Always clear QRXFLXP_CNTXT before writing new value Tony Nguyen
2020-05-16 0:55 ` [Intel-wired-lan] [PATCH S46 3/9] ice: Fix inability to set channels when down Tony Nguyen
@ 2020-05-16 0:55 ` Tony Nguyen
2020-05-28 23:18 ` Bowers, AndrewX
2020-05-16 0:55 ` [Intel-wired-lan] [PATCH S46 5/9] ice: fix function signature style format Tony Nguyen
` (5 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Tony Nguyen @ 2020-05-16 0:55 UTC (permalink / raw)
To: intel-wired-lan
From: Brett Creeley <brett.creeley@intel.com>
A VF driver has the ability to request reset via VIRTCHNL_OP_RESET_VF.
This is a required step in VF driver load. Currently, the PF is only
allowing a VF to request reset using this method after the VF has
already communicated resources via VIRTCHNL_OP_GET_VF_RESOURCES.
However, this is incorrect because the VF can request reset before
requesting resources. Fix this by allowing the VF to request a reset
once it has been initialized.
Signed-off-by: Brett Creeley <brett.creeley@intel.com>
---
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
index 0ca614fa97bb..48ab7d89729e 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
@@ -1989,7 +1989,7 @@ static int ice_vc_get_vf_res_msg(struct ice_vf *vf, u8 *msg)
*/
static void ice_vc_reset_vf_msg(struct ice_vf *vf)
{
- if (test_bit(ICE_VF_STATE_ACTIVE, vf->vf_states))
+ if (test_bit(ICE_VF_STATE_INIT, vf->vf_states))
ice_reset_vf(vf, false);
}
--
2.20.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Intel-wired-lan] [PATCH S46 4/9] ice: Allow VF to request reset as soon as it's initialized
2020-05-16 0:55 ` [Intel-wired-lan] [PATCH S46 4/9] ice: Allow VF to request reset as soon as it's initialized Tony Nguyen
@ 2020-05-28 23:18 ` Bowers, AndrewX
0 siblings, 0 replies; 18+ messages in thread
From: Bowers, AndrewX @ 2020-05-28 23:18 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Tony Nguyen
> Sent: Friday, May 15, 2020 5:55 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH S46 4/9] ice: Allow VF to request reset as
> soon as it's initialized
>
> From: Brett Creeley <brett.creeley@intel.com>
>
> A VF driver has the ability to request reset via VIRTCHNL_OP_RESET_VF.
> This is a required step in VF driver load. Currently, the PF is only allowing a VF
> to request reset using this method after the VF has already communicated
> resources via VIRTCHNL_OP_GET_VF_RESOURCES.
> However, this is incorrect because the VF can request reset before
> requesting resources. Fix this by allowing the VF to request a reset once it
> has been initialized.
>
> Signed-off-by: Brett Creeley <brett.creeley@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Intel-wired-lan] [PATCH S46 5/9] ice: fix function signature style format
2020-05-16 0:54 [Intel-wired-lan] [PATCH S46 1/9] ice: Reset VF for all port VLAN changes from host Tony Nguyen
` (2 preceding siblings ...)
2020-05-16 0:55 ` [Intel-wired-lan] [PATCH S46 4/9] ice: Allow VF to request reset as soon as it's initialized Tony Nguyen
@ 2020-05-16 0:55 ` Tony Nguyen
2020-05-28 23:19 ` Bowers, AndrewX
2020-05-16 0:55 ` [Intel-wired-lan] [PATCH S46 6/9] ice: fix PCI device serial number to be lowercase values Tony Nguyen
` (4 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Tony Nguyen @ 2020-05-16 0:55 UTC (permalink / raw)
To: intel-wired-lan
From: Bruce Allan <bruce.w.allan@intel.com>
Where possible, cuddle multiple lines of function signatures to be
consistent throughout the code.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
---
drivers/net/ethernet/intel/ice/ice_controlq.c | 3 +--
drivers/net/ethernet/intel/ice/ice_sched.c | 12 ++++--------
drivers/net/ethernet/intel/ice/ice_switch.c | 9 +++------
3 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_controlq.c b/drivers/net/ethernet/intel/ice/ice_controlq.c
index 479a74efc536..1e18021aa073 100644
--- a/drivers/net/ethernet/intel/ice/ice_controlq.c
+++ b/drivers/net/ethernet/intel/ice/ice_controlq.c
@@ -769,8 +769,7 @@ enum ice_status ice_create_all_ctrlq(struct ice_hw *hw)
*
* Destroys the send and receive queue locks for a given control queue.
*/
-static void
-ice_destroy_ctrlq_locks(struct ice_ctl_q_info *cq)
+static void ice_destroy_ctrlq_locks(struct ice_ctl_q_info *cq)
{
mutex_destroy(&cq->sq_lock);
mutex_destroy(&cq->rq_lock);
diff --git a/drivers/net/ethernet/intel/ice/ice_sched.c b/drivers/net/ethernet/intel/ice/ice_sched.c
index e2bc7cfea254..5cfb3637dc3e 100644
--- a/drivers/net/ethernet/intel/ice/ice_sched.c
+++ b/drivers/net/ethernet/intel/ice/ice_sched.c
@@ -1771,8 +1771,7 @@ ice_sched_cfg_vsi(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u16 maxqs,
* This function removes single aggregator VSI info entry from
* aggregator list.
*/
-static void
-ice_sched_rm_agg_vsi_info(struct ice_port_info *pi, u16 vsi_handle)
+static void ice_sched_rm_agg_vsi_info(struct ice_port_info *pi, u16 vsi_handle)
{
struct ice_sched_agg_info *agg_info;
struct ice_sched_agg_info *atmp;
@@ -2006,8 +2005,7 @@ ice_sched_cfg_node_bw_alloc(struct ice_hw *hw, struct ice_sched_node *node,
*
* Save or clear CIR bandwidth (BW) in the passed param bw_t_info.
*/
-static void
-ice_set_clear_cir_bw(struct ice_bw_type_info *bw_t_info, u32 bw)
+static void ice_set_clear_cir_bw(struct ice_bw_type_info *bw_t_info, u32 bw)
{
if (bw == ICE_SCHED_DFLT_BW) {
clear_bit(ICE_BW_TYPE_CIR, bw_t_info->bw_t_bitmap);
@@ -2026,8 +2024,7 @@ ice_set_clear_cir_bw(struct ice_bw_type_info *bw_t_info, u32 bw)
*
* Save or clear EIR bandwidth (BW) in the passed param bw_t_info.
*/
-static void
-ice_set_clear_eir_bw(struct ice_bw_type_info *bw_t_info, u32 bw)
+static void ice_set_clear_eir_bw(struct ice_bw_type_info *bw_t_info, u32 bw)
{
if (bw == ICE_SCHED_DFLT_BW) {
clear_bit(ICE_BW_TYPE_EIR, bw_t_info->bw_t_bitmap);
@@ -2052,8 +2049,7 @@ ice_set_clear_eir_bw(struct ice_bw_type_info *bw_t_info, u32 bw)
*
* Save or clear shared bandwidth (BW) in the passed param bw_t_info.
*/
-static void
-ice_set_clear_shared_bw(struct ice_bw_type_info *bw_t_info, u32 bw)
+static void ice_set_clear_shared_bw(struct ice_bw_type_info *bw_t_info, u32 bw)
{
if (bw == ICE_SCHED_DFLT_BW) {
clear_bit(ICE_BW_TYPE_SHARED, bw_t_info->bw_t_bitmap);
diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c
index 5760f2a3a8a4..9d5b527d5e38 100644
--- a/drivers/net/ethernet/intel/ice/ice_switch.c
+++ b/drivers/net/ethernet/intel/ice/ice_switch.c
@@ -1639,8 +1639,7 @@ ice_remove_rule_internal(struct ice_hw *hw, u8 recp_id,
* check for duplicates in this case, removing duplicates from a given
* list should be taken care of in the caller of this function.
*/
-enum ice_status
-ice_add_mac(struct ice_hw *hw, struct list_head *m_list)
+enum ice_status ice_add_mac(struct ice_hw *hw, struct list_head *m_list)
{
struct ice_aqc_sw_rules_elem *s_rule, *r_iter;
struct ice_fltr_list_entry *m_list_itr;
@@ -1941,8 +1940,7 @@ ice_add_vlan_internal(struct ice_hw *hw, struct ice_fltr_list_entry *f_entry)
* @hw: pointer to the hardware structure
* @v_list: list of VLAN entries and forwarding information
*/
-enum ice_status
-ice_add_vlan(struct ice_hw *hw, struct list_head *v_list)
+enum ice_status ice_add_vlan(struct ice_hw *hw, struct list_head *v_list)
{
struct ice_fltr_list_entry *v_list_itr;
@@ -2172,8 +2170,7 @@ ice_find_ucast_rule_entry(struct ice_hw *hw, u8 recp_id,
* the entries passed into m_list were added previously. It will not attempt to
* do a partial remove of entries that were found.
*/
-enum ice_status
-ice_remove_mac(struct ice_hw *hw, struct list_head *m_list)
+enum ice_status ice_remove_mac(struct ice_hw *hw, struct list_head *m_list)
{
struct ice_fltr_list_entry *list_itr, *tmp;
struct mutex *rule_lock; /* Lock to protect filter rule list */
--
2.20.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Intel-wired-lan] [PATCH S46 5/9] ice: fix function signature style format
2020-05-16 0:55 ` [Intel-wired-lan] [PATCH S46 5/9] ice: fix function signature style format Tony Nguyen
@ 2020-05-28 23:19 ` Bowers, AndrewX
0 siblings, 0 replies; 18+ messages in thread
From: Bowers, AndrewX @ 2020-05-28 23:19 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Tony Nguyen
> Sent: Friday, May 15, 2020 5:55 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH S46 5/9] ice: fix function signature style
> format
>
> From: Bruce Allan <bruce.w.allan@intel.com>
>
> Where possible, cuddle multiple lines of function signatures to be consistent
> throughout the code.
>
> Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_controlq.c | 3 +--
> drivers/net/ethernet/intel/ice/ice_sched.c | 12 ++++--------
> drivers/net/ethernet/intel/ice/ice_switch.c | 9 +++------
> 3 files changed, 8 insertions(+), 16 deletions(-)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Intel-wired-lan] [PATCH S46 6/9] ice: fix PCI device serial number to be lowercase values
2020-05-16 0:54 [Intel-wired-lan] [PATCH S46 1/9] ice: Reset VF for all port VLAN changes from host Tony Nguyen
` (3 preceding siblings ...)
2020-05-16 0:55 ` [Intel-wired-lan] [PATCH S46 5/9] ice: fix function signature style format Tony Nguyen
@ 2020-05-16 0:55 ` Tony Nguyen
2020-05-28 23:19 ` Bowers, AndrewX
2020-05-16 0:55 ` [Intel-wired-lan] [PATCH S46 7/9] ice: Use coalesce values from q_vector 0 when increasing q_vectors Tony Nguyen
` (3 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Tony Nguyen @ 2020-05-16 0:55 UTC (permalink / raw)
To: intel-wired-lan
From: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Commit ceb2f00707f9 ("ice: Use pci_get_dsn()") changed the code to
use a new function to get the Device Serial Number. It also changed
the case of the filename for loading a package on a specific NIC
from lowercase to uppercase. Change the filename back to
lowercase since that is what we specified.
Fixes: ceb2f00707f9 ("ice: Use pci_get_dsn()")
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
---
drivers/net/ethernet/intel/ice/ice_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 4107f6982543..7f444a24be07 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -3273,7 +3273,7 @@ static char *ice_get_opt_fw_name(struct ice_pf *pf)
if (!opt_fw_filename)
return NULL;
- snprintf(opt_fw_filename, NAME_MAX, "%sice-%016llX.pkg",
+ snprintf(opt_fw_filename, NAME_MAX, "%sice-%016llx.pkg",
ICE_DDP_PKG_PATH, dsn);
return opt_fw_filename;
--
2.20.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Intel-wired-lan] [PATCH S46 6/9] ice: fix PCI device serial number to be lowercase values
2020-05-16 0:55 ` [Intel-wired-lan] [PATCH S46 6/9] ice: fix PCI device serial number to be lowercase values Tony Nguyen
@ 2020-05-28 23:19 ` Bowers, AndrewX
0 siblings, 0 replies; 18+ messages in thread
From: Bowers, AndrewX @ 2020-05-28 23:19 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Tony Nguyen
> Sent: Friday, May 15, 2020 5:55 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH S46 6/9] ice: fix PCI device serial number to
> be lowercase values
>
> From: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
>
> Commit ceb2f00707f9 ("ice: Use pci_get_dsn()") changed the code to use a
> new function to get the Device Serial Number. It also changed the case of the
> filename for loading a package on a specific NIC from lowercase to
> uppercase. Change the filename back to lowercase since that is what we
> specified.
>
> Fixes: ceb2f00707f9 ("ice: Use pci_get_dsn()")
> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Intel-wired-lan] [PATCH S46 7/9] ice: Use coalesce values from q_vector 0 when increasing q_vectors
2020-05-16 0:54 [Intel-wired-lan] [PATCH S46 1/9] ice: Reset VF for all port VLAN changes from host Tony Nguyen
` (4 preceding siblings ...)
2020-05-16 0:55 ` [Intel-wired-lan] [PATCH S46 6/9] ice: fix PCI device serial number to be lowercase values Tony Nguyen
@ 2020-05-16 0:55 ` Tony Nguyen
2020-05-28 23:20 ` Bowers, AndrewX
2020-05-16 0:55 ` [Intel-wired-lan] [PATCH S46 8/9] ice: fix aRFS after flow director delete Tony Nguyen
` (2 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Tony Nguyen @ 2020-05-16 0:55 UTC (permalink / raw)
To: intel-wired-lan
From: Brett Creeley <brett.creeley@intel.com>
Currently when a VSI is built (i.e. reset, set channels, etc.)
the coalesce settings will be preserved in most cases. However, when the
number of q_vectors are increased the settings for the new q_vectors
will be set to the driver defaults of AIM on, Rx/Tx ITR 50, and INTRL 0.
This is causing issues with how the ethtool layer gets the current
coalesce settings since it only uses q_vector 0. So, assume that the user
set the coalesce settings globally (i.e. ethtool -C eth0) and use q_vector
0's settings for all of the new q_vectors.
Signed-off-by: Brett Creeley <brett.creeley@intel.com>
---
drivers/net/ethernet/intel/ice/ice_lib.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index 7cd4afcade13..392fb6e7de5d 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -2753,15 +2753,13 @@ ice_vsi_rebuild_set_coalesce(struct ice_vsi *vsi,
ice_vsi_rebuild_update_coalesce(vsi->q_vectors[i],
&coalesce[i]);
- for (; i < vsi->num_q_vectors; i++) {
- struct ice_coalesce_stored coalesce_dflt = {
- .itr_tx = ICE_DFLT_TX_ITR,
- .itr_rx = ICE_DFLT_RX_ITR,
- .intrl = 0
- };
+ /* number of q_vectors increased, so assume coalesce settings were
+ * changed globally (i.e. ethtool -C eth0 instead of per-queue) and use
+ * the previous settings from q_vector 0 for all of the new q_vectors
+ */
+ for (; i < vsi->num_q_vectors; i++)
ice_vsi_rebuild_update_coalesce(vsi->q_vectors[i],
- &coalesce_dflt);
- }
+ &coalesce[0]);
}
/**
--
2.20.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Intel-wired-lan] [PATCH S46 7/9] ice: Use coalesce values from q_vector 0 when increasing q_vectors
2020-05-16 0:55 ` [Intel-wired-lan] [PATCH S46 7/9] ice: Use coalesce values from q_vector 0 when increasing q_vectors Tony Nguyen
@ 2020-05-28 23:20 ` Bowers, AndrewX
0 siblings, 0 replies; 18+ messages in thread
From: Bowers, AndrewX @ 2020-05-28 23:20 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Tony Nguyen
> Sent: Friday, May 15, 2020 5:55 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH S46 7/9] ice: Use coalesce values from
> q_vector 0 when increasing q_vectors
>
> From: Brett Creeley <brett.creeley@intel.com>
>
> Currently when a VSI is built (i.e. reset, set channels, etc.) the coalesce
> settings will be preserved in most cases. However, when the number of
> q_vectors are increased the settings for the new q_vectors will be set to the
> driver defaults of AIM on, Rx/Tx ITR 50, and INTRL 0.
> This is causing issues with how the ethtool layer gets the current coalesce
> settings since it only uses q_vector 0. So, assume that the user set the
> coalesce settings globally (i.e. ethtool -C eth0) and use q_vector 0's settings
> for all of the new q_vectors.
>
> Signed-off-by: Brett Creeley <brett.creeley@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_lib.c | 14 ++++++--------
> 1 file changed, 6 insertions(+), 8 deletions(-)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Intel-wired-lan] [PATCH S46 8/9] ice: fix aRFS after flow director delete
2020-05-16 0:54 [Intel-wired-lan] [PATCH S46 1/9] ice: Reset VF for all port VLAN changes from host Tony Nguyen
` (5 preceding siblings ...)
2020-05-16 0:55 ` [Intel-wired-lan] [PATCH S46 7/9] ice: Use coalesce values from q_vector 0 when increasing q_vectors Tony Nguyen
@ 2020-05-16 0:55 ` Tony Nguyen
2020-05-28 23:20 ` Bowers, AndrewX
2020-05-16 0:55 ` [Intel-wired-lan] [PATCH S46 9/9] ice: Ignore EMODE when setting PHY config Tony Nguyen
2020-05-28 23:17 ` [Intel-wired-lan] [PATCH S46 1/9] ice: Reset VF for all port VLAN changes from host Bowers, AndrewX
8 siblings, 1 reply; 18+ messages in thread
From: Tony Nguyen @ 2020-05-16 0:55 UTC (permalink / raw)
To: intel-wired-lan
From: Henry Tieman <henry.w.tieman@intel.com>
The logic was missing for adding back perfect flows after flow director
filter delete. The code now adds perfect flows into the HW tables after
filter delete.
Signed-off-by: Henry Tieman <henry.w.tieman@intel.com>
---
.../net/ethernet/intel/ice/ice_ethtool_fdir.c | 27 ++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c b/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c
index 22cc4167b974..b92017b8ae4a 100644
--- a/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c
+++ b/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c
@@ -1363,6 +1363,31 @@ void ice_vsi_manage_fdir(struct ice_vsi *vsi, bool ena)
mutex_unlock(&hw->fdir_fltr_lock);
}
+/**
+ * ice_fdir_do_rem_flow - delete flow and possibly add perfect flow
+ * @pf: PF structure
+ * @flow_type: FDir flow type to release
+ */
+static void
+ice_fdir_do_rem_flow(struct ice_pf *pf, enum ice_fltr_ptype flow_type)
+{
+ struct ice_hw *hw = &pf->hw;
+ bool need_perfect = false;
+
+ if (flow_type == ICE_FLTR_PTYPE_NONF_IPV4_TCP ||
+ flow_type == ICE_FLTR_PTYPE_NONF_IPV4_UDP ||
+ flow_type == ICE_FLTR_PTYPE_NONF_IPV6_TCP ||
+ flow_type == ICE_FLTR_PTYPE_NONF_IPV6_UDP)
+ need_perfect = true;
+
+ if (need_perfect && test_bit(flow_type, hw->fdir_perfect_fltr))
+ return;
+
+ ice_fdir_rem_flow(hw, ICE_BLK_FD, flow_type);
+ if (need_perfect)
+ ice_create_init_fdir_rule(pf, flow_type);
+}
+
/**
* ice_fdir_update_list_entry - add or delete a filter from the filter list
* @pf: PF structure
@@ -1393,7 +1418,7 @@ ice_fdir_update_list_entry(struct ice_pf *pf, struct ice_fdir_fltr *input,
/* we just deleted the last filter of flow_type so we
* should also delete the HW filter info.
*/
- ice_fdir_rem_flow(hw, ICE_BLK_FD, old_fltr->flow_type);
+ ice_fdir_do_rem_flow(pf, old_fltr->flow_type);
list_del(&old_fltr->fltr_node);
devm_kfree(ice_hw_to_dev(hw), old_fltr);
}
--
2.20.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Intel-wired-lan] [PATCH S46 8/9] ice: fix aRFS after flow director delete
2020-05-16 0:55 ` [Intel-wired-lan] [PATCH S46 8/9] ice: fix aRFS after flow director delete Tony Nguyen
@ 2020-05-28 23:20 ` Bowers, AndrewX
0 siblings, 0 replies; 18+ messages in thread
From: Bowers, AndrewX @ 2020-05-28 23:20 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Tony Nguyen
> Sent: Friday, May 15, 2020 5:55 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH S46 8/9] ice: fix aRFS after flow director
> delete
>
> From: Henry Tieman <henry.w.tieman@intel.com>
>
> The logic was missing for adding back perfect flows after flow director filter
> delete. The code now adds perfect flows into the HW tables after filter
> delete.
>
> Signed-off-by: Henry Tieman <henry.w.tieman@intel.com>
> ---
> .../net/ethernet/intel/ice/ice_ethtool_fdir.c | 27 ++++++++++++++++++-
> 1 file changed, 26 insertions(+), 1 deletion(-)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Intel-wired-lan] [PATCH S46 9/9] ice: Ignore EMODE when setting PHY config
2020-05-16 0:54 [Intel-wired-lan] [PATCH S46 1/9] ice: Reset VF for all port VLAN changes from host Tony Nguyen
` (6 preceding siblings ...)
2020-05-16 0:55 ` [Intel-wired-lan] [PATCH S46 8/9] ice: fix aRFS after flow director delete Tony Nguyen
@ 2020-05-16 0:55 ` Tony Nguyen
2020-05-28 23:21 ` Bowers, AndrewX
2020-05-28 23:17 ` [Intel-wired-lan] [PATCH S46 1/9] ice: Reset VF for all port VLAN changes from host Bowers, AndrewX
8 siblings, 1 reply; 18+ messages in thread
From: Tony Nguyen @ 2020-05-16 0:55 UTC (permalink / raw)
To: intel-wired-lan
From: Chinh T Cao <chinh.t.cao@intel.com>
When setting the PHY cfg (CQ cmd 0x0601), if the firmware responds
with an EMODE error, software will ignore the error as it simply
means that manageability (ex: BMC) is in control of the link and that
the new setting may not be applied.
Signed-off-by: Chinh T Cao <chinh.t.cao@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 1 +
drivers/net/ethernet/intel/ice/ice_common.c | 7 ++++++-
drivers/net/ethernet/intel/ice/ice_main.c | 2 ++
3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
index bba47f11e546..3c28379dfb3e 100644
--- a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
@@ -1858,6 +1858,7 @@ enum ice_aq_err {
ICE_AQ_RC_EINVAL = 14, /* Invalid argument */
ICE_AQ_RC_ENOSPC = 16, /* No space left or allocation failure */
ICE_AQ_RC_ENOSYS = 17, /* Function not implemented */
+ ICE_AQ_RC_EMODE = 21, /* Op not allowed in current dev mode */
ICE_AQ_RC_ENOSEC = 24, /* Missing security manifest */
ICE_AQ_RC_EBADSIG = 25, /* Bad RSA signature */
ICE_AQ_RC_ESVN = 26, /* SVN number prohibits this package */
diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c
index ce578fe4ab3e..da724b0e524d 100644
--- a/drivers/net/ethernet/intel/ice/ice_common.c
+++ b/drivers/net/ethernet/intel/ice/ice_common.c
@@ -2248,6 +2248,7 @@ ice_aq_set_phy_cfg(struct ice_hw *hw, u8 lport,
struct ice_aqc_set_phy_cfg_data *cfg, struct ice_sq_cd *cd)
{
struct ice_aq_desc desc;
+ enum ice_status status;
if (!cfg)
return ICE_ERR_PARAM;
@@ -2276,7 +2277,11 @@ ice_aq_set_phy_cfg(struct ice_hw *hw, u8 lport,
ice_debug(hw, ICE_DBG_LINK, "eeer_value = 0x%x\n", cfg->eeer_value);
ice_debug(hw, ICE_DBG_LINK, "link_fec_opt = 0x%x\n", cfg->link_fec_opt);
- return ice_aq_send_cmd(hw, &desc, cfg, sizeof(*cfg), cd);
+ status = ice_aq_send_cmd(hw, &desc, cfg, sizeof(*cfg), cd);
+ if (hw->adminq.sq_last_status == ICE_AQ_RC_EMODE)
+ status = 0;
+
+ return status;
}
/**
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 7f444a24be07..a2d3cba19565 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -5245,6 +5245,8 @@ const char *ice_aq_str(enum ice_aq_err aq_err)
return "ICE_AQ_RC_ENOSPC";
case ICE_AQ_RC_ENOSYS:
return "ICE_AQ_RC_ENOSYS";
+ case ICE_AQ_RC_EMODE:
+ return "ICE_AQ_RC_EMODE";
case ICE_AQ_RC_ENOSEC:
return "ICE_AQ_RC_ENOSEC";
case ICE_AQ_RC_EBADSIG:
--
2.20.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Intel-wired-lan] [PATCH S46 9/9] ice: Ignore EMODE when setting PHY config
2020-05-16 0:55 ` [Intel-wired-lan] [PATCH S46 9/9] ice: Ignore EMODE when setting PHY config Tony Nguyen
@ 2020-05-28 23:21 ` Bowers, AndrewX
0 siblings, 0 replies; 18+ messages in thread
From: Bowers, AndrewX @ 2020-05-28 23:21 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Tony Nguyen
> Sent: Friday, May 15, 2020 5:55 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH S46 9/9] ice: Ignore EMODE when setting
> PHY config
>
> From: Chinh T Cao <chinh.t.cao@intel.com>
>
> When setting the PHY cfg (CQ cmd 0x0601), if the firmware responds with an
> EMODE error, software will ignore the error as it simply means that
> manageability (ex: BMC) is in control of the link and that the new setting may
> not be applied.
>
> Signed-off-by: Chinh T Cao <chinh.t.cao@intel.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 1 +
> drivers/net/ethernet/intel/ice/ice_common.c | 7 ++++++-
> drivers/net/ethernet/intel/ice/ice_main.c | 2 ++
> 3 files changed, 9 insertions(+), 1 deletion(-)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Intel-wired-lan] [PATCH S46 1/9] ice: Reset VF for all port VLAN changes from host
2020-05-16 0:54 [Intel-wired-lan] [PATCH S46 1/9] ice: Reset VF for all port VLAN changes from host Tony Nguyen
` (7 preceding siblings ...)
2020-05-16 0:55 ` [Intel-wired-lan] [PATCH S46 9/9] ice: Ignore EMODE when setting PHY config Tony Nguyen
@ 2020-05-28 23:17 ` Bowers, AndrewX
8 siblings, 0 replies; 18+ messages in thread
From: Bowers, AndrewX @ 2020-05-28 23:17 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Tony Nguyen
> Sent: Friday, May 15, 2020 5:55 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH S46 1/9] ice: Reset VF for all port VLAN
> changes from host
>
> From: Brett Creeley <brett.creeley@intel.com>
>
> Currently the PF is modifying the VF's port VLAN on the fly when configured
> via iproute. This is okay for most cases, but if the VF already has guest VLANs
> configured the PF has to remove all of those filters so only VLAN tagged
> traffic that matches the port VLAN will pass. Instead of adding functionality to
> track which guest VLANs have been added, just reset the VF each time port
> VLAN parameters are modified.
>
> Signed-off-by: Brett Creeley <brett.creeley@intel.com>
> ---
> .../net/ethernet/intel/ice/ice_virtchnl_pf.c | 42 +++----------------
> 1 file changed, 5 insertions(+), 37 deletions(-)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
^ permalink raw reply [flat|nested] 18+ messages in thread