Re: [PATCH 1/5] net: timestamp: add helper returning skb's tx tstamp
From: Pavel Begunkov <asml.silence@gmail.com>
Date: 2025-06-04 08:50:34
Also in:
io-uring
From: Pavel Begunkov <asml.silence@gmail.com>
Date: 2025-06-04 08:50:34
Also in:
io-uring
On 6/2/25 14:31, Willem de Bruijn wrote:
Pavel Begunkov wrote:quoted
On 6/1/25 14:52, Willem de Bruijn wrote:quoted
Pavel Begunkov wrote:quoted
Add a helper function skb_get_tx_timestamp() that returns a tx timestamp associated with an skb from an queue queue.
...>> ...>> diff --git a/net/socket.c b/net/socket.c
quoted
quoted
quoted
index 9a0e720f0859..d1dc8ab28e46 100644--- a/net/socket.c +++ b/net/socket.c@@ -843,6 +843,55 @@ static void put_ts_pktinfo(struct msghdr *msg, struct sk_buff *skb, sizeof(ts_pktinfo), &ts_pktinfo); } +bool skb_has_tx_timestamp(struct sk_buff *skb, struct sock *sk)Here and elsewhere: consider const pointers where possiblewill do
I constantized the sock pointer in v2 but can't do same with skb as skb_hwtstamps() and other helpers don't work with const. I can follow up on top preparing those helpers, but to avoid cross tree conflicts it's probably better to leave the helpers from this patch without const untill all is merged and pulled, hope that's works for you. -- Pavel Begunkov