Skip to content

Commit 7033ada

Browse files
iveceraanguy11
authored andcommitted
i40e: Refactor argument of i40e_detect_recover_hung()
Commit 07d4419 ("i40e/i40evf: Detect and recover hung queue scenario") changes i40e_detect_recover_hung() argument type from i40e_pf* to i40e_vsi* to be shareable by both i40e and i40evf. Because the i40evf does not exist anymore and the function is exclusively used by i40e we can revert this change. Reviewed-by: Michal Schmidt <mschmidt@redhat.com> Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> Signed-off-by: Ivan Vecera <ivecera@redhat.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
1 parent 54c4664 commit 7033ada

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11267,7 +11267,7 @@ static void i40e_service_task(struct work_struct *work)
1126711267
return;
1126811268

1126911269
if (!test_bit(__I40E_RECOVERY_MODE, pf->state)) {
11270-
i40e_detect_recover_hung(pf->vsi[pf->lan_vsi]);
11270+
i40e_detect_recover_hung(pf);
1127111271
i40e_sync_filters_subtask(pf);
1127211272
i40e_reset_subtask(pf);
1127311273
i40e_handle_mdd_event(pf);

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -861,13 +861,15 @@ u32 i40e_get_tx_pending(struct i40e_ring *ring, bool in_sw)
861861

862862
/**
863863
* i40e_detect_recover_hung - Function to detect and recover hung_queues
864-
* @vsi: pointer to vsi struct with tx queues
864+
* @pf: pointer to PF struct
865865
*
866-
* VSI has netdev and netdev has TX queues. This function is to check each of
867-
* those TX queues if they are hung, trigger recovery by issuing SW interrupt.
866+
* LAN VSI has netdev and netdev has TX queues. This function is to check
867+
* each of those TX queues if they are hung, trigger recovery by issuing
868+
* SW interrupt.
868869
**/
869-
void i40e_detect_recover_hung(struct i40e_vsi *vsi)
870+
void i40e_detect_recover_hung(struct i40e_pf *pf)
870871
{
872+
struct i40e_vsi *vsi = pf->vsi[pf->lan_vsi];
871873
struct i40e_ring *tx_ring = NULL;
872874
struct net_device *netdev;
873875
unsigned int i;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ void i40e_free_rx_resources(struct i40e_ring *rx_ring);
470470
int i40e_napi_poll(struct napi_struct *napi, int budget);
471471
void i40e_force_wb(struct i40e_vsi *vsi, struct i40e_q_vector *q_vector);
472472
u32 i40e_get_tx_pending(struct i40e_ring *ring, bool in_sw);
473-
void i40e_detect_recover_hung(struct i40e_vsi *vsi);
473+
void i40e_detect_recover_hung(struct i40e_pf *pf);
474474
int __i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size);
475475
bool __i40e_chk_linearize(struct sk_buff *skb);
476476
int i40e_xdp_xmit(struct net_device *dev, int n, struct xdp_frame **frames,

0 commit comments

Comments
 (0)