diff mbox series

[net-next] sfc: use hardware tx timestamps for more than PTP

Message ID 510652dc-54b4-0e11-657e-e37ee3ca26a9@gmail.com (mailing list archive)
State Accepted
Commit bd4a2697e5e27a33d345827dfbdebb8f28f4aa87
Delegated to: Netdev Maintainers
Headers show
Series [net-next] sfc: use hardware tx timestamps for more than PTP | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1 this patch: 1
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1 this patch: 1
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Edward Cree April 7, 2022, 3:24 p.m. UTC
From: Bert Kenward <bkenward@solarflare.com>

The 8000 series and newer NICs all get hardware timestamps from the MAC
 and can provide timestamps on a normal TX queue, rather than via a slow
 path through the MC. As such we can use this path for any packet where a
 hardware timestamp is requested.
This also enables support for PTP over transports other than IPv4+UDP.

Signed-off-by: Bert Kenward <bkenward@solarflare.com>
Signed-off-by: Edward Cree <ecree@xilinx.com>
---
 drivers/net/ethernet/sfc/tx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org April 8, 2022, 9:50 p.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 7 Apr 2022 16:24:02 +0100 you wrote:
> From: Bert Kenward <bkenward@solarflare.com>
> 
> The 8000 series and newer NICs all get hardware timestamps from the MAC
>  and can provide timestamps on a normal TX queue, rather than via a slow
>  path through the MC. As such we can use this path for any packet where a
>  hardware timestamp is requested.
> This also enables support for PTP over transports other than IPv4+UDP.
> 
> [...]

Here is the summary with links:
  - [net-next] sfc: use hardware tx timestamps for more than PTP
    https://git.kernel.org/netdev/net-next/c/bd4a2697e5e2

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/sfc/tx.c b/drivers/net/ethernet/sfc/tx.c
index d16e031e95f4..35240eb6e903 100644
--- a/drivers/net/ethernet/sfc/tx.c
+++ b/drivers/net/ethernet/sfc/tx.c
@@ -524,7 +524,8 @@  netdev_tx_t efx_hard_start_xmit(struct sk_buff *skb,
 
 	/* PTP "event" packet */
 	if (unlikely(efx_xmit_with_hwtstamp(skb)) &&
-	    unlikely(efx_ptp_is_ptp_tx(efx, skb))) {
+	    ((efx_ptp_use_mac_tx_timestamps(efx) && efx->ptp_data) ||
+	    unlikely(efx_ptp_is_ptp_tx(efx, skb)))) {
 		/* There may be existing transmits on the channel that are
 		 * waiting for this packet to trigger the doorbell write.
 		 * We need to send the packets at this point.