Skip to content

Commit

Permalink
onload_mktest_net_driver: Replacing net driver with v5_3_19_1015
Browse files Browse the repository at this point in the history
  • Loading branch information
ivatet-amd committed Jan 10, 2025
1 parent 84e3b11 commit a0816c1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 33 deletions.
16 changes: 8 additions & 8 deletions src/driver/linux_net/drivers/net/ethernet/sfc/ethtool_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -818,18 +818,18 @@ void efx_ethtool_get_stats(struct net_device *net_dev,
data++;
}
}
}

#if !defined(EFX_USE_KCOMPAT) || defined(EFX_HAVE_XDP_SOCK)
#if defined(CONFIG_XDP_SOCKETS)
efx_for_each_channel(channel, efx) {
tx_queue = efx_channel_get_xsk_tx_queue(channel);
if (tx_queue)
data[0] = tx_queue->tx_packets;
data++;
}
efx_for_each_channel(channel, efx) {
tx_queue = efx_channel_get_xsk_tx_queue(channel);
if (tx_queue)
data[0] = tx_queue->tx_packets;
data++;
}
#endif
#endif
}

efx_ptp_update_stats(efx, data);
}

Expand Down
24 changes: 0 additions & 24 deletions src/driver/linux_net/drivers/net/ethernet/sfc/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,28 +241,4 @@ _efx_writed_page(struct efx_nic *efx, const efx_dword_t *value,
(reg) != 0xa1c), \
page)

/* Write TIMER_COMMAND. This is a page-mapped 32-bit CSR, but a bug
* in the BIU means that writes to TIMER_COMMAND[0] invalidate the
* collector register.
*/
static inline void _efx_writed_page_locked(struct efx_nic *efx,
const efx_dword_t *value,
unsigned int reg,
unsigned int page)
{
unsigned long flags __attribute__ ((unused));

if (page == 0) {
spin_lock_irqsave(&efx->biu_lock, flags);
efx_writed(efx, value, efx_paged_reg(efx, page, reg));
spin_unlock_irqrestore(&efx->biu_lock, flags);
} else {
efx_writed(efx, value, efx_paged_reg(efx, page, reg));
}
}
#define efx_writed_page_locked(efx, value, reg, page) \
_efx_writed_page_locked(efx, value, \
reg + BUILD_BUG_ON_ZERO((reg) != 0x420), \
page)

#endif /* EFX_IO_H */
2 changes: 1 addition & 1 deletion src/driver/linux_net/drivers/net/ethernet/sfc/net_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
**************************************************************************/

#ifdef EFX_NOT_UPSTREAM
#define EFX_DRIVER_VERSION "5.3.19.1013"
#define EFX_DRIVER_VERSION "5.3.19.1015"
#endif

#ifdef DEBUG
Expand Down
9 changes: 9 additions & 0 deletions src/driver/linux_net/drivers/net/ethernet/sfc/ptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,8 @@ struct efx_pps_dev_attr {
* @sw_stats.oversize_sync_windows: Number of corrected sync windows that
* are too large
* @sw_stats.rx_no_timestamp: Number of packets received without a timestamp.
* @sw_stats.pps_fw: Number of internal PPS events (generated from clock source on the NIC)
* @sw_stats.pps_in: Number of external PPS events (generated from PPS_IN external connector)
* @initialised_stats: Indicates if @initial_mc_stats has been populated.
* @initial_mc_stats: Firmware statistics.
* @timeset: Last set of synchronisation statistics.
Expand Down Expand Up @@ -477,6 +479,8 @@ struct efx_ptp_data {
unsigned int undersize_sync_windows;
unsigned int oversize_sync_windows;
unsigned int rx_no_timestamp;
unsigned int pps_fw;
unsigned int pps_in;
} sw_stats;
bool initialised_stats;
__le16 initial_mc_stats[MC_CMD_PTP_OUT_STATUS_LEN / sizeof(__le16)];
Expand Down Expand Up @@ -572,6 +576,8 @@ static const struct efx_hw_stat_desc efx_ptp_stat_desc[] = {
PTP_MC_STAT(ptp_timestamp_packets, TS),
PTP_MC_STAT(ptp_filter_matches, FM),
PTP_MC_STAT(ptp_non_filter_matches, NFM),
PTP_SW_STAT(pps_fw, sw_stats.pps_fw),
PTP_SW_STAT(pps_hw, sw_stats.pps_in),
};
#define PTP_STAT_COUNT ARRAY_SIZE(efx_ptp_stat_desc)
static const unsigned long efx_ptp_stat_mask[] = {
Expand Down Expand Up @@ -3615,6 +3621,8 @@ static void ptp_event_pps(struct efx_nic *efx, struct efx_ptp_data *ptp)
{
if (efx && ptp->pps_workwq)
queue_work(ptp->pps_workwq, &ptp->pps_work);

ptp->sw_stats.pps_fw++;
}

#if defined(EFX_NOT_UPSTREAM)
Expand Down Expand Up @@ -3651,6 +3659,7 @@ static void hw_pps_event_pps(struct efx_nic *efx, struct efx_ptp_data *ptp)
ptp_clock_event(ptp->phc_clock, &ptp_evt);
}
#endif
ptp->sw_stats.pps_in++;
}
#endif

Expand Down

0 comments on commit a0816c1

Please sign in to comment.