i40evf: Do not clear MSI-X PBA manually
Subsystems (2)
PATCH 1/9 i40evf: Do not clear MSI-X PBA manually
From: Alexander Duyck <[email protected]>
We should not be clearing the pending bit array for each vector manually. The documentation for the hardware states that when in MSI-X mode the pending bit array wil be cleared automatically. Us clearing it ourselves just results in multiple opportunities for us to drop an interrupt.
--- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-)
drivers/net/ethernet/intel/i40evf/i40evf_main.c +5 -13
@@ -276,8 +276,7 @@ void i40evf_irq_enable_queues(struct i40evf_adapter *adapter, u32 mask)if (mask &BIT (i -1 )) {wr32 (hw,I40E_VFINT_DYN_CTLN1 (i -1 ),I40E_VFINT_DYN_CTLN1_INTENA_MASK | -I40E_VFINT_DYN_CTLN1_ITR_INDX_MASK | -I40E_VFINT_DYN_CTLN1_CLEARPBA_MASK ); +I40E_VFINT_DYN_CTLN1_ITR_INDX_MASK ); } } }
@@ -296,16 +295,14 @@ static void i40evf_fire_sw_int(struct i40evf_adapter *adapter, u32 mask)if (mask &1 ) { dyn_ctl =rd32 (hw,I40E_VFINT_DYN_CTL01 ); dyn_ctl |=I40E_VFINT_DYN_CTLN1_SWINT_TRIG_MASK | -I40E_VFINT_DYN_CTLN1_ITR_INDX_MASK | -I40E_VFINT_DYN_CTLN1_CLEARPBA_MASK ; +I40E_VFINT_DYN_CTLN1_ITR_INDX_MASK ;wr32 (hw,I40E_VFINT_DYN_CTL01 , dyn_ctl); }for (i =1 ; i < adapter->num_msix_vectors; i++) {if (mask &BIT (i)) { dyn_ctl =rd32 (hw,I40E_VFINT_DYN_CTLN1 (i -1 )); dyn_ctl |=I40E_VFINT_DYN_CTLN1_SWINT_TRIG_MASK | -I40E_VFINT_DYN_CTLN1_ITR_INDX_MASK | -I40E_VFINT_DYN_CTLN1_CLEARPBA_MASK ; +I40E_VFINT_DYN_CTLN1_ITR_INDX_MASK ;wr32 (hw,I40E_VFINT_DYN_CTLN1 (i -1 ), dyn_ctl); } }
@@ -337,15 +334,10 @@ static irqreturn_t i40evf_msix_aq(int irq, void *data)struct net_device *netdev = data;struct i40evf_adapter *adapter =netdev_priv (netdev);struct i40e_hw *hw = &adapter->hw; -u32 val;/* handle non-queue interrupts, these reads clear the registers */ - val =rd32 (hw,I40E_VFINT_ICR01 ); - val =rd32 (hw,I40E_VFINT_ICR0_ENA1 ); - - val =rd32 (hw,I40E_VFINT_DYN_CTL01 ) | -I40E_VFINT_DYN_CTL01_CLEARPBA_MASK ; -wr32 (hw,I40E_VFINT_DYN_CTL01 , val); +rd32 (hw,I40E_VFINT_ICR01 ); +rd32 (hw,I40E_VFINT_ICR0_ENA1 );/* schedule work on the private workqueue */ schedule_work (&adapter->adminq_task);
Signature · 1 line
2.9.5
PATCH 2/9 i40evf: Clean-up flags for promisc mode to avoid high polling rate
From: Alexander Duyck <[email protected]>
If you enabled and disabled promiscuous mode on a VF you could easily put it into a state where it would start firing interrupts on all queues at a rate of 50+ interrupts per second even though there was no traffic present. The issue seems to have been a stray admin queue feature flag set that was leaving us in a high polling rate for the adminq task.
--- drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c +4 -2
@@ -739,8 +739,10 @@ void i40evf_set_promiscuous(struct i40evf_adapter *adapter, int flags) }if (!flags) { - adapter->flags &= ~I40EVF_FLAG_PROMISC_ON ; - adapter->aq_required &= ~I40EVF_FLAG_AQ_RELEASE_PROMISC ; + adapter->flags &= ~(I40EVF_FLAG_PROMISC_ON | +I40EVF_FLAG_ALLMULTI_ON ); + adapter->aq_required &= ~(I40EVF_FLAG_AQ_RELEASE_PROMISC | +I40EVF_FLAG_AQ_RELEASE_ALLMULTI );dev_info (&adapter->pdev->dev,"Leaving promiscuous mode\n" ); }
Signature · 1 line
2.9.5
PATCH 3/9 i40evf: Drop i40evf_fire_sw_int as it is prone to races
In reply to Alice MichaelFrom: Alexander Duyck <[email protected]>
Having the interrupts firing while we are polling causes extra overhead and isn't needed for most systems out there. If an interrupt is lost us experiencing a 2s latency spike before recovering is still not acceptable and masks the issue. We are better off just identifying systems that lose interrupts and instead enable workarounds for those systems.
To that end I am dropping the code that was strobing the interrupts as there is a narrow window where having them enabled can actually cause race issues anyway where a few stray packets might get misses if the interrupt is re-enabled and fires before we call napi_complete.
Also replace one line where we were using bit 31 instead of the define for the bit to represent masking the interrupt enable bit.
--- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 34 ------------------------- 1 file changed, 34 deletions(-)
drivers/net/ethernet/intel/i40evf/i40evf_main.c +0 -34
@@ -282,33 +282,6 @@ void i40evf_irq_enable_queues(struct i40evf_adapter *adapter, u32 mask) }/** -* i40evf_fire_sw_int - Generate SW interrupt for specified vectors -* @adapter: board private structure -* @mask: bitmap of vectors to trigger -**/ -static void i40evf_fire_sw_int (struct i40evf_adapter *adapter,u32 mask) -{ -struct i40e_hw *hw = &adapter->hw; -int i; -u32 dyn_ctl; - -if (mask &1 ) { - dyn_ctl =rd32 (hw,I40E_VFINT_DYN_CTL01 ); - dyn_ctl |=I40E_VFINT_DYN_CTLN1_SWINT_TRIG_MASK | -I40E_VFINT_DYN_CTLN1_ITR_INDX_MASK ; -wr32 (hw,I40E_VFINT_DYN_CTL01 , dyn_ctl); - } -for (i =1 ; i < adapter->num_msix_vectors; i++) { -if (mask &BIT (i)) { - dyn_ctl =rd32 (hw,I40E_VFINT_DYN_CTLN1 (i -1 )); - dyn_ctl |=I40E_VFINT_DYN_CTLN1_SWINT_TRIG_MASK | -I40E_VFINT_DYN_CTLN1_ITR_INDX_MASK ; -wr32 (hw,I40E_VFINT_DYN_CTLN1 (i -1 ), dyn_ctl); - } - } -} - -/** * i40evf_irq_enable - Enable default interrupt generation settings * @adapter: board private structure * @flush: boolean value whether to run rd32()
@@ -1743,13 +1716,6 @@ static void i40evf_watchdog_task(struct work_struct *work)if (adapter->state == __I40EVF_RUNNING)i40evf_request_stats (adapter); watchdog_done: -if (adapter->state == __I40EVF_RUNNING) { -i40evf_irq_enable_queues (adapter, ~0 ); -i40evf_fire_sw_int (adapter,0xFF ); - }else { -i40evf_fire_sw_int (adapter,0x1 ); - } -clear_bit (__I40EVF_IN_CRITICAL_TASK, &adapter->crit_section); restart_watchdog:if (adapter->state == __I40EVF_REMOVE)
Signature · 1 line
2.9.5
PATCH 3/9 i40evf: Drop i40evf_fire_sw_int as it is prone to races
Quoted 8 lines · Alice Michael
From: Alexander Duyck <[email protected]>
Having the interrupts firing while we are polling causes extra overhead and isn't needed for most systems out there. If an interrupt is lost us experiencing a 2s latency spike before recovering is still not acceptable and masks the issue. We are better off just identifying systems that lose interrupts and instead enable workarounds for those systems.
Quoted 7 lines
To that end I am dropping the code that was strobing the interrupts as there is a narrow window where having them enabled can actually cause race issues anyway where a few stray packets might get misses if the interrupt is re-enabled and fires before we call
napi_complete.Also replace one line where we were using bit 31 instead of the define for the bit to represent masking the interrupt enable bit.
I don't think I see any code change for this comment... did this get stripped out?
sln
Quoted 59 lines
Signed-off-by Alexander Duyck <[email protected]>--- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 34 ------------------------- 1 file changed, 34 deletions(-)drivers/net/ethernet/intel/i40evf/i40evf_main.c +0
-34@@ -282,33 +282,6 @@ void i40evf_irq_enable_queues(struct i40evf_adapter *adapter, u32 mask) }/** -* i40evf_fire_sw_int - Generate SW interrupt for specified vectors -* @adapter: board private structure -* @mask: bitmap of vectors to trigger -**/ -static void i40evf_fire_sw_int (struct i40evf_adapter *adapter,u32 mask) -{ -struct i40e_hw *hw = &adapter->hw; -int i; -u32 dyn_ctl; - -if (mask &1 ) { - dyn_ctl =rd32 (hw,I40E_VFINT_DYN_CTL01 ); - dyn_ctl |=I40E_VFINT_DYN_CTLN1_SWINT_TRIG_MASK | -I40E_VFINT_DYN_CTLN1_ITR_INDX_MASK ; -wr32 (hw,I40E_VFINT_DYN_CTL01 , dyn_ctl); - } -for (i =1 ; i < adapter->num_msix_vectors; i++) { -if (mask &BIT (i)) { - dyn_ctl =rd32 (hw,I40E_VFINT_DYN_CTLN1 (i -1 )); - dyn_ctl |=I40E_VFINT_DYN_CTLN1_SWINT_TRIG_MASK | -I40E_VFINT_DYN_CTLN1_ITR_INDX_MASK ; -wr32 (hw,I40E_VFINT_DYN_CTLN1 (i -1 ), dyn_ctl); - } - } -} - -/** * i40evf_irq_enable - Enable default interrupt generation settings * @adapter: board private structure * @flush: boolean value whether to run rd32() @@ -1743,13 +1716,6 @@ static void i40evf_watchdog_task(struct work_struct *work)if (adapter->state == __I40EVF_RUNNING)i40evf_request_stats (adapter); watchdog_done: -if (adapter->state == __I40EVF_RUNNING) { -i40evf_irq_enable_queues (adapter, ~0 ); -i40evf_fire_sw_int (adapter,0xFF ); - }else { -i40evf_fire_sw_int (adapter,0x1 ); - } -clear_bit (__I40EVF_IN_CRITICAL_TASK, &adapter->crit_section); restart_watchdog:if (adapter->state == __I40EVF_REMOVE)
PATCH 4/9 i40e: change ppp name to ddp
In reply to Alice MichaelFrom: Jingjing Wu <[email protected]>
PPP name was going to be confusing since PPP already means point to point protocol. It is decided to change pipeline personalization profile(ppp) to dynamic device personalization(ddp).
--- drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 10 ++++---- drivers/net/ethernet/intel/i40e/i40e_common.c | 22 ++++++++--------- drivers/net/ethernet/intel/i40e/i40e_prototype.h | 16 +++++++------ drivers/net/ethernet/intel/i40e/i40e_type.h | 28 +++++++++++----------- .../net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 10 ++++---- drivers/net/ethernet/intel/i40evf/i40e_common.c | 26 ++++++++++---------- drivers/net/ethernet/intel/i40evf/i40e_prototype.h | 16 +++++++------ drivers/net/ethernet/intel/i40evf/i40e_type.h | 28 +++++++++++----------- 8 files changed, 80 insertions(+), 76 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h +5 -5
@@ -198,7 +198,7 @@ enum i40e_admin_queue_opc { i40e_aqc_opc_add_mirror_rule =0x0260 , i40e_aqc_opc_delete_mirror_rule =0x0261 , -/* Pipeline Personalization Profile */ +/* Dynamic Device Personalization */ i40e_aqc_opc_write_personalization_profile =0x0270 , i40e_aqc_opc_get_personalization_profile_list = 0x0271,
@@ -1594,7 +1594,7 @@ struct i40e_aqc_add_delete_mirror_rule_completion {I40E_CHECK_CMD_LENGTH (i40e_aqc_add_delete_mirror_rule_completion); -/* Pipeline Personalization Profile */ +/* Dynamic Device Personalization */ struct i40e_aqc_write_personalization_profile {u8 flags;u8 reserved[3 ];
@@ -1605,7 +1605,7 @@ struct i40e_aqc_write_personalization_profile {I40E_CHECK_CMD_LENGTH (i40e_aqc_write_personalization_profile); -struct i40e_aqc_write_ppp_resp { +struct i40e_aqc_write_ddp_resp {__le32 error_offset;__le32 error_info;__le32 addr_high;
@@ -1614,8 +1614,8 @@ struct i40e_aqc_write_ppp_resp {struct i40e_aqc_get_applied_profiles {u8 flags; -#define I40E_AQC_GET_PPP_GET_CONF 0x1 -#define I40E_AQC_GET_PPP_GET_RDPU_CONF 0x2 +#define I40E_AQC_GET_DDP_GET_CONF 0x1 +#define I40E_AQC_GET_DDP_GET_RDPU_CONF 0x2u8 rsv[3 ];__le32 reserved;__le32 addr_high;
drivers/net/ethernet/intel/i40e/i40e_common.c +11 -11
@@ -5229,7 +5229,7 @@ i40e_status i40e_aq_get_phy_register(struct i40e_hw *hw, }/** -* i40e_aq_write_ppp - Write pipeline personalization profile (ppp) +* i40e_aq_write_ddp - Write dynamic device personalization (ddp) * @hw: pointer to the hw struct * @buff: command buffer (size in bytes = buff_size) * @buff_size: buffer size in bytes
@@ -5239,7 +5239,7 @@ i40e_status i40e_aq_get_phy_register(struct i40e_hw *hw,* @cmd_details: pointer to command details structure or NULL **/ enum -i40e_status_code i40e_aq_write_ppp (struct i40e_hw *hw,void *buff, +i40e_status_code i40e_aq_write_ddp (struct i40e_hw *hw,void *buff,u16 buff_size,u32 track_id,u32 *error_offset,u32 *error_info,struct i40e_asq_cmd_details *cmd_details)
@@ -5248,7 +5248,7 @@ i40e_status_code i40e_aq_write_ppp(struct i40e_hw *hw, void *buff,struct i40e_aqc_write_personalization_profile *cmd = (struct i40e_aqc_write_personalization_profile *) &desc.params.raw; -struct i40e_aqc_write_ppp_resp *resp; +struct i40e_aqc_write_ddp_resp *resp;i40e_status status; i40e_fill_default_direct_cmd_desc(&desc,
@@ -5264,7 +5264,7 @@ i40e_status_code i40e_aq_write_ppp(struct i40e_hw *hw, void *buff, status =i40e_asq_send_command (hw, &desc, buff, buff_size, cmd_details);if (!status) { - resp = (struct i40e_aqc_write_ppp_resp *)&desc.params.raw; + resp = (struct i40e_aqc_write_ddp_resp *)&desc.params.raw;if (error_offset) *error_offset =le32_to_cpu (resp->error_offset);if (error_info)
@@ -5275,14 +5275,14 @@ i40e_status_code i40e_aq_write_ppp(struct i40e_hw *hw, void *buff, }/** -* i40e_aq_get_ppp_list - Read pipeline personalization profile (ppp) +* i40e_aq_get_ddp_list - Read dynamic device personalization (ddp) * @hw: pointer to the hw struct * @buff: command buffer (size in bytes = buff_size) * @buff_size: buffer size in bytes * @cmd_details: pointer to command details structure or NULL **/ enum -i40e_status_code i40e_aq_get_ppp_list (struct i40e_hw *hw,void *buff, +i40e_status_code i40e_aq_get_ddp_list (struct i40e_hw *hw,void *buff,u16 buff_size,u8 flags,struct i40e_asq_cmd_details *cmd_details) {
@@ -5371,7 +5371,7 @@ i40e_write_profile(struct i40e_hw *hw, struct i40e_profile_segment *profile,break ; }if (i == dev_cnt) { -i40e_debug (hw,I40E_DEBUG_PACKAGE ,"Device doesn't support PPP" ); +i40e_debug (hw,I40E_DEBUG_PACKAGE ,"Device doesn't support DDP" );return I40E_ERR_DEVICE_NOT_SUPPORTED ; }
@@ -5390,7 +5390,7 @@ i40e_write_profile(struct i40e_hw *hw, struct i40e_profile_segment *profile,sizeof (struct i40e_profile_section_header );/* Write profile */ - status =i40e_aq_write_ppp (hw, (void *)sec, (u16 )section_size, + status =i40e_aq_write_ddp (hw, (void *)sec, (u16 )section_size, track_id, &offset, &info,NULL );if (status) { i40e_debug(hw, I40E_DEBUG_PACKAGE,
@@ -5432,10 +5432,10 @@ i40e_add_pinfo_to_list(struct i40e_hw *hw, sec->section.offset); pinfo->track_id = track_id; pinfo->version = profile->version; - pinfo->op =I40E_PPP_ADD_TRACKID ; -memcpy (pinfo->name, profile->name,I40E_PPP_NAME_SIZE ); + pinfo->op =I40E_DDP_ADD_TRACKID ; +memcpy (pinfo->name, profile->name,I40E_DDP_NAME_SIZE ); - status =i40e_aq_write_ppp (hw, (void *)sec, sec->data_end, + status =i40e_aq_write_ddp (hw, (void *)sec, sec->data_end, track_id, &offset, &info,NULL );return status;
drivers/net/ethernet/intel/i40e/i40e_prototype.h +9 -7
@@ -431,13 +431,15 @@ i40e_status i40e_write_phy_register(struct i40e_hw *hw, u8 page, u16 reg,u8 i40e_get_phy_address (struct i40e_hw *hw,u8 dev_num);i40e_status i40e_blink_phy_link_led (struct i40e_hw *hw,u32 time,u32 interval); -i40e_status i40e_aq_write_ppp (struct i40e_hw *hw,void *buff, -u16 buff_size,u32 track_id, -u32 *error_offset,u32 *error_info, -struct i40e_asq_cmd_details *cmd_details); -i40e_status i40e_aq_get_ppp_list (struct i40e_hw *hw,void *buff, -u16 buff_size,u8 flags, -struct i40e_asq_cmd_details *cmd_details); +i40e_status i40e_aq_write_ddp (struct i40e_hw *hw,void *buff, +u16 buff_size,u32 track_id, +u32 *error_offset,u32 *error_info, +struct i40e_asq_cmd_details * + cmd_details); +i40e_status i40e_aq_get_ddp_list (struct i40e_hw *hw,void *buff, +u16 buff_size,u8 flags, +struct i40e_asq_cmd_details * + cmd_details);struct i40e_generic_seg_header *i40e_find_segment_in_package (u32 segment_type,struct i40e_package_header *pkg_header);
drivers/net/ethernet/intel/i40e/i40e_type.h +14 -14
@@ -1502,19 +1502,19 @@ struct i40e_lldp_variables {#define I40E_FLEX_57_SHIFT 6#define I40E_FLEX_57_MASK (0x1ULL << I40E_FLEX_57_SHIFT) -/* Version format for PPP */ -struct i40e_ppp_version { +/* Version format for Dynamic Device Personalization(DDP) */ +struct i40e_ddp_version {u8 major;u8 minor;u8 update;u8 draft; }; -#define I40E_PPP_NAME_SIZE 32 +#define I40E_DDP_NAME_SIZE 32/* Package header */ struct i40e_package_header { -struct i40e_ppp_version version; +struct i40e_ddp_version version;u32 segment_count;u32 segment_offset[1 ]; };
@@ -1526,16 +1526,16 @@ struct i40e_generic_seg_header {#define SEGMENT_TYPE_I40E 0x00000011#define SEGMENT_TYPE_X722 0x00000012u32 type; -struct i40e_ppp_version version; +struct i40e_ddp_version version;u32 size; -char name[I40E_PPP_NAME_SIZE ]; +char name[I40E_DDP_NAME_SIZE ]; };struct i40e_metadata_segment {struct i40e_generic_seg_header header; -struct i40e_ppp_version version; +struct i40e_ddp_version version;u32 track_id; -char name[I40E_PPP_NAME_SIZE ]; +char name[I40E_DDP_NAME_SIZE ]; };struct i40e_device_id_entry {
@@ -1545,8 +1545,8 @@ struct i40e_device_id_entry {struct i40e_profile_segment {struct i40e_generic_seg_header header; -struct i40e_ppp_version version; -char name[I40E_PPP_NAME_SIZE ]; +struct i40e_ddp_version version; +char name[I40E_DDP_NAME_SIZE ];u32 device_table_count;struct i40e_device_id_entry device_table[1 ]; };
@@ -1573,11 +1573,11 @@ struct i40e_profile_section_header {struct i40e_profile_info {u32 track_id; -struct i40e_ppp_version version; +struct i40e_ddp_version version;u8 op; -#define I40E_PPP_ADD_TRACKID 0x01 -#define I40E_PPP_REMOVE_TRACKID 0x02 +#define I40E_DDP_ADD_TRACKID 0x01 +#define I40E_DDP_REMOVE_TRACKID 0x02u8 reserved[7 ]; -u8 name[I40E_PPP_NAME_SIZE ]; +u8 name[I40E_DDP_NAME_SIZE ]; };#endif /* _I40E_TYPE_H_ */
drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h +5 -5
@@ -198,7 +198,7 @@ enum i40e_admin_queue_opc { i40e_aqc_opc_add_mirror_rule =0x0260 , i40e_aqc_opc_delete_mirror_rule =0x0261 , -/* Pipeline Personalization Profile */ +/* Dynamic Device Personalization */ i40e_aqc_opc_write_personalization_profile =0x0270 , i40e_aqc_opc_get_personalization_profile_list = 0x0271,
@@ -1562,7 +1562,7 @@ struct i40e_aqc_add_delete_mirror_rule_completion {I40E_CHECK_CMD_LENGTH (i40e_aqc_add_delete_mirror_rule_completion); -/* Pipeline Personalization Profile */ +/* Dynamic Device Personalization */ struct i40e_aqc_write_personalization_profile {u8 flags;u8 reserved[3 ];
@@ -1573,7 +1573,7 @@ struct i40e_aqc_write_personalization_profile {I40E_CHECK_CMD_LENGTH (i40e_aqc_write_personalization_profile); -struct i40e_aqc_write_ppp_resp { +struct i40e_aqc_write_ddp_resp {__le32 error_offset;__le32 error_info;__le32 addr_high;
@@ -1582,8 +1582,8 @@ struct i40e_aqc_write_ppp_resp {struct i40e_aqc_get_applied_profiles {u8 flags; -#define I40E_AQC_GET_PPP_GET_CONF 0x1 -#define I40E_AQC_GET_PPP_GET_RDPU_CONF 0x2 +#define I40E_AQC_GET_DDP_GET_CONF 0x1 +#define I40E_AQC_GET_DDP_GET_RDPU_CONF 0x2u8 rsv[3 ];__le32 reserved;__le32 addr_high;
drivers/net/ethernet/intel/i40evf/i40e_common.c +13 -13
@@ -1202,7 +1202,7 @@ i40e_status i40e_vf_reset(struct i40e_hw *hw) }/** -* i40evf_aq_write_ppp - Write pipeline personalization profile (ppp) +* i40evf_aq_write_ddp - Write dynamic device personalization (ddp) * @hw: pointer to the hw struct * @buff: command buffer (size in bytes = buff_size) * @buff_size: buffer size in bytes
@@ -1212,7 +1212,7 @@ i40e_status i40e_vf_reset(struct i40e_hw *hw)* @cmd_details: pointer to command details structure or NULL **/ enum -i40e_status_code i40evf_aq_write_ppp (struct i40e_hw *hw,void *buff, +i40e_status_code i40evf_aq_write_ddp (struct i40e_hw *hw,void *buff,u16 buff_size,u32 track_id,u32 *error_offset,u32 *error_info,struct i40e_asq_cmd_details *cmd_details)
@@ -1221,7 +1221,7 @@ i40e_status_code i40evf_aq_write_ppp(struct i40e_hw *hw, void *buff,struct i40e_aqc_write_personalization_profile *cmd = (struct i40e_aqc_write_personalization_profile *) &desc.params.raw; -struct i40e_aqc_write_ppp_resp *resp; +struct i40e_aqc_write_ddp_resp *resp;i40e_status status; i40evf_fill_default_direct_cmd_desc(&desc,
@@ -1237,7 +1237,7 @@ i40e_status_code i40evf_aq_write_ppp(struct i40e_hw *hw, void *buff, status =i40evf_asq_send_command (hw, &desc, buff, buff_size, cmd_details);if (!status) { - resp = (struct i40e_aqc_write_ppp_resp *)&desc.params.raw; + resp = (struct i40e_aqc_write_ddp_resp *)&desc.params.raw;if (error_offset) *error_offset =le32_to_cpu (resp->error_offset);if (error_info)
@@ -1248,16 +1248,16 @@ i40e_status_code i40evf_aq_write_ppp(struct i40e_hw *hw, void *buff, }/** -* i40evf_aq_get_ppp_list - Read pipeline personalization profile (ppp) +* i40evf_aq_get_ddp_list - Read dynamic device personalization (ddp) * @hw: pointer to the hw struct * @buff: command buffer (size in bytes = buff_size) * @buff_size: buffer size in bytes * @cmd_details: pointer to command details structure or NULL **/ enum -i40e_status_code i40evf_aq_get_ppp_list (struct i40e_hw *hw,void *buff, +i40e_status_code i40evf_aq_get_ddp_list (struct i40e_hw *hw,void *buff,u16 buff_size,u8 flags, -struct i40e_asq_cmd_details *cmd_details) +struct i40e_asq_cmd_details *cmd_details) {struct i40e_aq_desc desc; struct i40e_aqc_get_applied_profiles *cmd =
@@ -1344,7 +1344,7 @@ i40evf_write_profile(struct i40e_hw *hw, struct i40e_profile_segment *profile,break ; }if (i == dev_cnt) { -i40e_debug (hw,I40E_DEBUG_PACKAGE ,"Device doesn't support PPP" ); +i40e_debug (hw,I40E_DEBUG_PACKAGE ,"Device doesn't support DDP" );return I40E_ERR_DEVICE_NOT_SUPPORTED ; }
@@ -1363,7 +1363,7 @@ i40evf_write_profile(struct i40e_hw *hw, struct i40e_profile_segment *profile,sizeof (struct i40e_profile_section_header );/* Write profile */ - status =i40evf_aq_write_ppp (hw, (void *)sec, (u16 )section_size, + status =i40evf_aq_write_ddp (hw, (void *)sec, (u16 )section_size, track_id, &offset, &info,NULL );if (status) { i40e_debug(hw, I40E_DEBUG_PACKAGE,
@@ -1405,10 +1405,10 @@ i40evf_add_pinfo_to_list(struct i40e_hw *hw, sec->section.offset); pinfo->track_id = track_id; pinfo->version = profile->version; - pinfo->op =I40E_PPP_ADD_TRACKID ; -memcpy (pinfo->name, profile->name,I40E_PPP_NAME_SIZE ); + pinfo->op =I40E_DDP_ADD_TRACKID ; +memcpy (pinfo->name, profile->name,I40E_DDP_NAME_SIZE ); - status =i40evf_aq_write_ppp (hw, (void *)sec, sec->data_end, - track_id, &offset, &info,NULL ); + status =i40evf_aq_write_ddp (hw, (void *)sec, sec->data_end, + track_id, &offset, &info,NULL );return status; }
drivers/net/ethernet/intel/i40evf/i40e_prototype.h +9 -7
@@ -131,13 +131,15 @@ i40e_status i40e_write_phy_register(struct i40e_hw *hw, u8 page, u16 reg,u8 i40e_get_phy_address (struct i40e_hw *hw,u8 dev_num);i40e_status i40e_blink_phy_link_led (struct i40e_hw *hw,u32 time,u32 interval); -i40e_status i40evf_aq_write_ppp (struct i40e_hw *hw,void *buff, -u16 buff_size,u32 track_id, -u32 *error_offset,u32 *error_info, -struct i40e_asq_cmd_details *cmd_details); -i40e_status i40evf_aq_get_ppp_list (struct i40e_hw *hw,void *buff, -u16 buff_size,u8 flags, -struct i40e_asq_cmd_details *cmd_details); +i40e_status i40evf_aq_write_ddp (struct i40e_hw *hw,void *buff, +u16 buff_size,u32 track_id, +u32 *error_offset,u32 *error_info, +struct i40e_asq_cmd_details * + cmd_details); +i40e_status i40evf_aq_get_ddp_list (struct i40e_hw *hw,void *buff, +u16 buff_size,u8 flags, +struct i40e_asq_cmd_details * + cmd_details);struct i40e_generic_seg_header *i40evf_find_segment_in_package (u32 segment_type,struct i40e_package_header *pkg_header);
drivers/net/ethernet/intel/i40evf/i40e_type.h +14 -14
@@ -1422,19 +1422,19 @@ enum i40e_reset_type {#define I40E_FD_INSET_FLEX_WORD57_MASK (0x1ULL << \ I40E_FD_INSET_FLEX_WORD57_SHIFT) -/* Version format for PPP */ -struct i40e_ppp_version { +/* Version format for Dynamic Device Personalization(DDP) */ +struct i40e_ddp_version {u8 major;u8 minor;u8 update;u8 draft; }; -#define I40E_PPP_NAME_SIZE 32 +#define I40E_DDP_NAME_SIZE 32/* Package header */ struct i40e_package_header { -struct i40e_ppp_version version; +struct i40e_ddp_version version;u32 segment_count;u32 segment_offset[1 ]; };
@@ -1446,16 +1446,16 @@ struct i40e_generic_seg_header {#define SEGMENT_TYPE_I40E 0x00000011#define SEGMENT_TYPE_X722 0x00000012u32 type; -struct i40e_ppp_version version; +struct i40e_ddp_version version;u32 size; -char name[I40E_PPP_NAME_SIZE ]; +char name[I40E_DDP_NAME_SIZE ]; };struct i40e_metadata_segment {struct i40e_generic_seg_header header; -struct i40e_ppp_version version; +struct i40e_ddp_version version;u32 track_id; -char name[I40E_PPP_NAME_SIZE ]; +char name[I40E_DDP_NAME_SIZE ]; };struct i40e_device_id_entry {
@@ -1465,8 +1465,8 @@ struct i40e_device_id_entry {struct i40e_profile_segment {struct i40e_generic_seg_header header; -struct i40e_ppp_version version; -char name[I40E_PPP_NAME_SIZE ]; +struct i40e_ddp_version version; +char name[I40E_DDP_NAME_SIZE ];u32 device_table_count;struct i40e_device_id_entry device_table[1 ]; };
@@ -1493,11 +1493,11 @@ struct i40e_profile_section_header {struct i40e_profile_info {u32 track_id; -struct i40e_ppp_version version; +struct i40e_ddp_version version;u8 op; -#define I40E_PPP_ADD_TRACKID 0x01 -#define I40E_PPP_REMOVE_TRACKID 0x02 +#define I40E_DDP_ADD_TRACKID 0x01 +#define I40E_DDP_REMOVE_TRACKID 0x02u8 reserved[7 ]; -u8 name[I40E_PPP_NAME_SIZE ]; +u8 name[I40E_DDP_NAME_SIZE ]; };#endif /* _I40E_TYPE_H_ */
Signature · 1 line
2.9.5
PATCH 5/9 i40e: track id can be 0
In reply to Alice MichaelFrom: Jingjing Wu <[email protected]>
track_id == 0 is valid for ?read only? profiles when profile does not have any ?write? commands.
--- drivers/net/ethernet/intel/i40e/i40e_common.c | 5 ----- drivers/net/ethernet/intel/i40evf/i40e_common.c | 5 ----- 2 files changed, 10 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_common.c +0 -5
@@ -5357,11 +5357,6 @@ i40e_write_profile(struct i40e_hw *hw, struct i40e_profile_segment *profile,u32 offset =0 , info =0 ;u32 i; -if (!track_id) { -i40e_debug (hw,I40E_DEBUG_PACKAGE ,"Track_id can't be 0." ); -return I40E_NOT_SUPPORTED ; - } - dev_cnt = profile->device_table_count;for (i =0 ; i < dev_cnt; i++) {
drivers/net/ethernet/intel/i40evf/i40e_common.c +0 -5
@@ -1330,11 +1330,6 @@ i40evf_write_profile(struct i40e_hw *hw, struct i40e_profile_segment *profile,u32 offset =0 , info =0 ;u32 i; -if (!track_id) { -i40e_debug (hw,I40E_DEBUG_PACKAGE ,"Track_id can't be 0." ); -return I40E_NOT_SUPPORTED ; - } - dev_cnt = profile->device_table_count;for (i =0 ; i < dev_cnt; i++) {
Signature · 1 line
2.9.5
PATCH 6/9 i40e: Fix FLR reset timeout issue
In reply to Alice MichaelFrom: Filip Sadowski <[email protected]>
This patch allows detection of upcoming core reset in case NIC gets stuck while performing FLR reset. The i40e_pf_reset() function returns I40E_ERR_NOT_READY when global reset was detected.
--- drivers/net/ethernet/intel/i40e/i40e_common.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/net/ethernet/intel/i40e/i40e_common.c +7 -0
@@ -1269,6 +1269,7 @@ i40e_status i40e_pf_reset(struct i40e_hw *hw)* we don't need to do the PF Reset */ if (!cnt) { +u32 reg2 =0 ;if (hw->revision_id ==0 ) cnt =I40E_PF_RESET_WAIT_COUNT_A0 ;else
@@ -1280,6 +1281,12 @@ i40e_status i40e_pf_reset(struct i40e_hw *hw) reg =rd32 (hw,I40E_PFGEN_CTRL );if (!(reg &I40E_PFGEN_CTRL_PFSWR_MASK ))break ; + reg2 =rd32 (hw,I40E_GLGEN_RSTAT ); +if (reg2 &I40E_GLGEN_RSTAT_DEVSTATE_MASK ) { +hw_dbg (hw,"Core reset upcoming.\n" ); +hw_dbg (hw,"I40E_GLGEN_RSTAT = 0x%x\n" , reg2); +return I40E_ERR_NOT_READY ; + }usleep_range (1000 ,2000 ); }if (reg &I40E_PFGEN_CTRL_PFSWR_MASK ) {
Signature · 1 line
2.9.5
PATCH 6/9 i40e: Fix FLR reset timeout issue
Quoted 24 lines · Alice Michael
From: Filip Sadowski <[email protected]>
This patch allows detection of upcoming core reset in case NIC gets stuck while performing FLR reset. The
i40e_pf_reset()function returnsI40E_ERR_NOT_READYwhen global reset was detected.Signed-off-by Filip Sadowski <[email protected]>--- drivers/net/ethernet/intel/i40e/i40e_common.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/net/ethernet/intel/i40e/i40e_common.c +1
-0@@ -1269,6 +1269,7 @@ i40e_status i40e_pf_reset(struct i40e_hw *hw)* we don't need to do the PF Reset */ if (!cnt) { +u32 reg2 =0 ;if (hw->revision_id ==0 ) cnt =I40E_PF_RESET_WAIT_COUNT_A0 ;else
drivers/net/ethernet/intel/i40e/i40e_common.c i40e_status i40e_pf_reset(struct i40e_hw *hw) · line 1287
Quoted 7 lines
drivers/net/ethernet/intel/i40e/i40e_common.c +4
-0@@ -1280,6 +1281,12 @@ i40e_status i40e_pf_reset(struct i40e_hw *hw) reg =rd32 (hw,I40E_PFGEN_CTRL );if (!(reg &I40E_PFGEN_CTRL_PFSWR_MASK ))break ; + reg2 =rd32 (hw,I40E_GLGEN_RSTAT ); +if (reg2 &I40E_GLGEN_RSTAT_DEVSTATE_MASK ) { +hw_dbg (hw,"Core reset upcoming.\n" ); +hw_dbg (hw,"I40E_GLGEN_RSTAT = 0x%x\n" , reg2);
And my first thought at seeing this message would be "so what?" There needs to be something that says this request is getting skipped.
sln
Quoted 6 lines
drivers/net/ethernet/intel/i40e/i40e_common.c +2
-0+return I40E_ERR_NOT_READY ; + }usleep_range (1000 ,2000 ); }if (reg &I40E_PFGEN_CTRL_PFSWR_MASK ) {
PATCH 7/9 i40e: link_down_on_close private flag support
In reply to Alice MichaelFrom: Mariusz Stachura <[email protected]>
This patch introduces new ethtool private flag used for forcing true link state. Function i40e_force_link_state that implements this functionality was added, it sets phy_type = 0 in order to work-around firmware's LESM. False positive error messages were suppressed.
--- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 + drivers/net/ethernet/intel/i40e/i40e_main.c | 71 ++++++++++++++++++++++++++ 2 files changed, 73 insertions(+)
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +2 -0
@@ -230,6 +230,8 @@ static const struct i40e_priv_flags i40e_gstrings_priv_flags[] = {I40E_PRIV_FLAG ("flow-director-atr" ,I40E_FLAG_FD_ATR_ENABLED ,0 ),I40E_PRIV_FLAG ("veb-stats" ,I40E_FLAG_VEB_STATS_ENABLED ,0 ),I40E_PRIV_FLAG ("hw-atr-eviction" ,I40E_FLAG_HW_ATR_EVICT_ENABLED ,0 ), +I40E_PRIV_FLAG ("link-down-on-close" , +I40E_FLAG_LINK_DOWN_ON_CLOSE_ENABLED ,0 ),I40E_PRIV_FLAG ("legacy-rx" ,I40E_FLAG_LEGACY_RX ,0 ),I40E_PRIV_FLAG ("disable-source-pruning" , I40E_FLAG_SOURCE_PRUNING_DISABLED, 0),
drivers/net/ethernet/intel/i40e/i40e_main.c +71 -0
89 lines not on this page · raw message
Signature · 1 line
2.9.5
PATCH 8/9 i40evf: fix client notify of l2 params
In reply to Alice MichaelFrom: Alan Brady <[email protected]>
The current method for notifying clients of l2 parameters is broken because we fail to copy the new parameters to the client instance struct, we need to do the notification before the client 'open' function pointer gets called, and lastly we should set the l2 parameters when first adding a client instance.
This patch first introduces the i40evf_client_get_params function to prevent code duplication in the i40evf_client_add_instance and the i40evf_notify_client_l2_params functions. We then fix the notify l2 params function to actually copy the parameters to client instance struct and do the same in the *_add_instance' function. Lastly this patch reorganizes the priority in which client tasks fire so that if the flag for notifying l2 params is set, it will trigger before the open because the client needs these new parameters as part of a client open task.
--- drivers/net/ethernet/intel/i40evf/i40evf_client.c | 38 ++++++++++++++++------- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 10 +++--- 2 files changed, 31 insertions(+), 17 deletions(-)
drivers/net/ethernet/intel/i40evf/i40evf_client.c +26 -12
@@ -25,6 +25,26 @@ static struct i40e_ops i40evf_lan_ops = { };/** +* i40evf_client_get_params - retrieve relevant client parameters +* @vsi: VSI with parameters +* @params: client param struct +**/ +static +void i40evf_client_get_params (struct i40e_vsi *vsi,struct i40e_params *params) +{ +int i; + +memset (params,0 ,sizeof (struct i40e_params )); + params->mtu = vsi->netdev->mtu; + params->link_up = vsi->back->link_up; + +for (i =0 ; i <I40E_MAX_USER_PRIORITY ; i++) { + params->qos.prio_qos[i].tc =0 ; + params->qos.prio_qos[i].qs_handle = vsi->qs_handle; + } +} + +/** * i40evf_notify_client_message - call the client message receive callback * @vsi: the VSI associated with this client * @msg: message buffer
@@ -65,10 +85,6 @@ void i40evf_notify_client_l2_params(struct i40e_vsi *vsi)return ; cinst = vsi->back->cinst; -memset (¶ms,0 ,sizeof (params)); - params.mtu = vsi->netdev->mtu; - params.link_up = vsi->back->link_up; - params.qos.prio_qos[0 ].qs_handle = vsi->qs_handle;if (!cinst || !cinst->client || !cinst->client->ops || !cinst->client->ops->l2_param_change) {
@@ -76,6 +92,8 @@ void i40evf_notify_client_l2_params(struct i40e_vsi *vsi) "Cannot locate client instance l2_param_change function\n");return ; } +i40evf_client_get_params (vsi, ¶ms); + cinst->lan_info.params = params; cinst->client->ops->l2_param_change (&cinst->lan_info, cinst->client, ¶ms); }
@@ -165,9 +183,9 @@ static struct i40e_client_instance * i40evf_client_add_instance(struct i40evf_adapter *adapter) {struct i40e_client_instance *cinst =NULL ; -struct netdev_hw_addr *mac =NULL ;struct i40e_vsi *vsi = &adapter->vsi; -int i; +struct netdev_hw_addr *mac =NULL ; +struct i40e_params params;if (!vf_registered_client) goto out;
@@ -191,18 +209,14 @@ i40evf_client_add_instance(struct i40evf_adapter *adapter) cinst->lan_info.version.major =I40EVF_CLIENT_VERSION_MAJOR ; cinst->lan_info.version.minor =I40EVF_CLIENT_VERSION_MINOR ; cinst->lan_info.version.build =I40EVF_CLIENT_VERSION_BUILD ; +i40evf_client_get_params (vsi, ¶ms); + cinst->lan_info.params = params;set_bit (__I40E_CLIENT_INSTANCE_NONE, &cinst->state); cinst->lan_info.msix_count = adapter->num_iwarp_msix; cinst->lan_info.msix_entries = &adapter->msix_entries[adapter->iwarp_base_vector]; -for (i =0 ; i <I40E_MAX_USER_PRIORITY ; i++) { - cinst->lan_info.params.qos.prio_qos[i].tc =0 ; - cinst->lan_info.params.qos.prio_qos[i].qs_handle = - vsi->qs_handle; - } - mac =list_first_entry (&cinst->lan_info.netdev->dev_addrs.list, struct netdev_hw_addr, list);if (mac)
drivers/net/ethernet/intel/i40evf/i40evf_main.c +5 -5
@@ -2074,6 +2074,11 @@ static void i40evf_client_task(struct work_struct *work) adapter->flags &= ~I40EVF_FLAG_SERVICE_CLIENT_REQUESTED ; goto out; } +if (adapter->flags &I40EVF_FLAG_CLIENT_NEEDS_L2_PARAMS ) { +i40evf_notify_client_l2_params (&adapter->vsi); + adapter->flags &= ~I40EVF_FLAG_CLIENT_NEEDS_L2_PARAMS ; + goto out; + }if (adapter->flags &I40EVF_FLAG_CLIENT_NEEDS_CLOSE ) {i40evf_notify_client_close (&adapter->vsi, false); adapter->flags &= ~I40EVF_FLAG_CLIENT_NEEDS_CLOSE ;
@@ -2082,11 +2087,6 @@ static void i40evf_client_task(struct work_struct *work)if (adapter->flags &I40EVF_FLAG_CLIENT_NEEDS_OPEN ) {i40evf_notify_client_open (&adapter->vsi); adapter->flags &= ~I40EVF_FLAG_CLIENT_NEEDS_OPEN ; - goto out; - } -if (adapter->flags &I40EVF_FLAG_CLIENT_NEEDS_L2_PARAMS ) { -i40evf_notify_client_l2_params (&adapter->vsi); - adapter->flags &= ~I40EVF_FLAG_CLIENT_NEEDS_L2_PARAMS ; } out:clear_bit (__I40EVF_IN_CLIENT_TASK, &adapter->crit_section);
Signature · 1 line
2.9.5
PATCH 9/9 i40e: Suppress compilation warning on kernels older than 3.12
In reply to Alice MichaelFrom: Pawe? Jab?o?ski <[email protected]>
In kernels before 3.12 the second parameter in netif_set_xps_queue function has no const qualifier. It is generating warning in older kernels. get_cpu_mask function always returns a pointer with const qualifier. Adding the cast is enough to remove compilation warning.
--- drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +1 -2
@@ -3062,8 +3062,7 @@ static void i40e_config_xps_tx_ring(struct i40e_ring *ring)return ; cpu =cpumask_local_spread (ring->q_vector->v_idx,-1 ); -netif_set_xps_queue (ring->netdev,get_cpu_mask (cpu), - ring->queue_index); +netif_set_xps_queue (ring->netdev,get_cpu_mask (cpu), ring->queue_index); }/**
Signature · 1 line
2.9.5
PATCH 9/9 i40e: Suppress compilation warning on kernels older than 3.12
Quoted 17 lines · Alice Michael
From: Pawe? Jab?o?ski <[email protected]>
In kernels before 3.12 the second parameter in
netif_set_xps_queuefunction has no const qualifier. It is generating warning in older kernels.get_cpu_maskfunction always returns a pointer with const qualifier. Adding the cast is enough to remove compilation warning.Signed-off-by Pawe? Jab?o?ski <[email protected]>--- drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/net/ethernet/intel/i40e/i40e_main.c +0
-0
drivers/net/ethernet/intel/i40e/i40e_main.c static void i40e_config_xps_tx_ring(struct i40e_ring *ring) · line 3065
Quoted 6 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +1
-2@@ -3062,8 +3062,7 @@ static void i40e_config_xps_tx_ring(struct i40e_ring *ring)return ; cpu =cpumask_local_spread (ring->q_vector->v_idx,-1 ); -netif_set_xps_queue (ring->netdev,get_cpu_mask (cpu), - ring->queue_index); +netif_set_xps_queue (ring->netdev,get_cpu_mask (cpu), ring->queue_index);
I see no actual code change here, no cast as advertised. sln
Quoted 4 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +0
-0}/**
Jablonski
PATCH 9/9 i40e: Suppress compilation warning on kernels older than 3.12
This patch is only for older kernels (where the driver is compiling form source on older systems). In newest ones is not needed.
-----Original Message-----
From: Shannon Nelson [mailto:shannon.nelson at oracle.com]
Sent: Friday, November 3, 2017 9:13 PM
To: Michael, Alice <[email protected]>; intel-wired-lan at lists.osuosl.org
Cc: Jablonski, Pawel <[email protected]>
Subject: Re: [Intel-wired-lan] [next PATCH S82 9/9] i40e: Suppress compilation warning on kernels older than 3.12
Quoted 18 lines · Alice Michael
From: Pawe? Jab?o?ski <[email protected]>
In kernels before 3.12 the second parameter in
netif_set_xps_queuefunction has no const qualifier. It is generating warning in older kernels.get_cpu_maskfunction always returns a pointer with const qualifier. Adding the cast is enough to remove compilation warning.Signed-off-by Pawe? Jab?o?ski <[email protected]>--- drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/net/ethernet/intel/i40e/i40e_main.c +0
-0
drivers/net/ethernet/intel/i40e/i40e_main.c static void i40e_config_xps_tx_ring(struct i40e_ring *ring) · line 3066
Quoted 7 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +2
-2@@ -3062,8 +3062,7 @@ static void i40e_config_xps_tx_ring(struct i40e_ring *ring)return ; cpu =cpumask_local_spread (ring->q_vector->v_idx,-1 ); -netif_set_xps_queue (ring->netdev,get_cpu_mask (cpu), - ring->queue_index); +netif_set_xps_queue (ring->netdev,get_cpu_mask (cpu), +ring->queue_index);
I see no actual code change here, no cast as advertised. sln
drivers/net/ethernet/intel/i40e/i40e_main.c static void i40e_config_xps_tx_ring(struct i40e_ring *ring)
Quoted 4 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +0
-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.
PATCH 9/9 i40e: Suppress compilation warning on kernels older than 3.12
Quoted 1 line · Pawel
This patch is only for older kernels (where the driver is compiling form source on older systems). In newest ones is not needed.
Then there's no need for it to be pushed upstream. sln
Quoted 52 lines
-----Original Message-----
From: Shannon Nelson [mailto:shannon.nelson at oracle.com]
Sent: Friday, November 3, 2017 9:13 PM
To: Michael, Alice <[email protected]>; intel-wired-lan at lists.osuosl.org
Cc: Jablonski, Pawel <[email protected]>
Subject: Re: [Intel-wired-lan] [next PATCH S82 9/9] i40e: Suppress compilation warning on kernels older than 3.12Quoted 18 lines · Alice Michael
From: Pawe? Jab?o?ski <[email protected]>
In kernels before 3.12 the second parameter in
netif_set_xps_queuefunction has no const qualifier. It is generating warning in older kernels.get_cpu_maskfunction always returns a pointer with const qualifier. Adding the cast is enough to remove compilation warning.Signed-off-by Pawe? Jab?o?ski <[email protected]>--- drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/net/ethernet/intel/i40e/i40e_main.c +0
-0drivers/net/ethernet/intel/i40e/i40e_main.c static void i40e_config_xps_tx_ring(struct i40e_ring *ring) · line 3066
Quoted 7 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +2
-2@@ -3062,8 +3062,7 @@ static void i40e_config_xps_tx_ring(struct i40e_ring *ring)return ; cpu =cpumask_local_spread (ring->q_vector->v_idx,-1 ); -netif_set_xps_queue (ring->netdev,get_cpu_mask (cpu), - ring->queue_index); +netif_set_xps_queue (ring->netdev,get_cpu_mask (cpu), +ring->queue_index);I see no actual code change here, no cast as advertised. sln
drivers/net/ethernet/intel/i40e/i40e_main.c static void i40e_config_xps_tx_ring(struct i40e_ring *ring)
Quoted 4 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +0
-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.