Skip to content

Commit bbbe714

Browse files
author
Ben Hutchings
committed
sfc: Remove unnecessary condition for processing the TX timestamp queue
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
1 parent a45a3a5 commit bbbe714

File tree

1 file changed

+4
-12
lines changed
  • drivers/net/ethernet/sfc

1 file changed

+4
-12
lines changed

drivers/net/ethernet/sfc/ptp.c

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -890,13 +890,10 @@ static enum ptp_packet_state efx_ptp_match_rx(struct efx_nic *efx,
890890
/* Process any queued receive events and corresponding packets
891891
*
892892
* q is returned with all the packets that are ready for delivery.
893-
* true is returned if at least one of those packets requires
894-
* synchronisation.
895893
*/
896-
static bool efx_ptp_process_events(struct efx_nic *efx, struct sk_buff_head *q)
894+
static void efx_ptp_process_events(struct efx_nic *efx, struct sk_buff_head *q)
897895
{
898896
struct efx_ptp_data *ptp = efx->ptp_data;
899-
bool rc = false;
900897
struct sk_buff *skb;
901898

902899
while ((skb = skb_dequeue(&ptp->rxq))) {
@@ -907,7 +904,6 @@ static bool efx_ptp_process_events(struct efx_nic *efx, struct sk_buff_head *q)
907904
__skb_queue_tail(q, skb);
908905
} else if (efx_ptp_match_rx(efx, skb) ==
909906
PTP_PACKET_STATE_MATCHED) {
910-
rc = true;
911907
__skb_queue_tail(q, skb);
912908
} else if (time_after(jiffies, match->expiry)) {
913909
match->state = PTP_PACKET_STATE_TIMED_OUT;
@@ -921,8 +917,6 @@ static bool efx_ptp_process_events(struct efx_nic *efx, struct sk_buff_head *q)
921917
break;
922918
}
923919
}
924-
925-
return rc;
926920
}
927921

928922
/* Complete processing of a received packet */
@@ -1088,12 +1082,10 @@ static void efx_ptp_worker(struct work_struct *work)
10881082
efx_ptp_drop_time_expired_events(efx);
10891083

10901084
__skb_queue_head_init(&tempq);
1091-
if (efx_ptp_process_events(efx, &tempq) ||
1092-
!skb_queue_empty(&ptp_data->txq)) {
1085+
efx_ptp_process_events(efx, &tempq);
10931086

1094-
while ((skb = skb_dequeue(&ptp_data->txq)))
1095-
efx_ptp_xmit_skb(efx, skb);
1096-
}
1087+
while ((skb = skb_dequeue(&ptp_data->txq)))
1088+
efx_ptp_xmit_skb(efx, skb);
10971089

10981090
while ((skb = __skb_dequeue(&tempq)))
10991091
efx_ptp_process_rx(efx, skb);

0 commit comments

Comments
 (0)