Re: [RFC PATCH bpf-next v5 2/2] net: Add additional bit to support clockid_t timestamp type
From: Abhishek Chauhan (ABC)
Date: Tue Apr 30 2024 - 16:00:11 EST
On 4/26/2024 4:55 PM, Martin KaFai Lau wrote:
> On 4/24/24 3:20 PM, Abhishek Chauhan wrote:
>> diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
>> index a9e819115622..63e4cc30d18d 100644
>> --- a/net/ipv6/ip6_output.c
>> +++ b/net/ipv6/ip6_output.c
>> @@ -955,7 +955,7 @@ int ip6_fragment(struct net *net, struct sock *sk, struct sk_buff *skb,
>> if (iter.frag)
>> ip6_fraglist_prepare(skb, &iter);
>> - skb_set_delivery_time(skb, tstamp, tstamp_type);
>> + skb_set_tstamp_type_frm_clkid(skb, tstamp, tstamp_type);
>> err = output(net, sk, skb);
>> if (!err)
>> IP6_INC_STATS(net, ip6_dst_idev(&rt->dst),
>> @@ -1016,7 +1016,7 @@ int ip6_fragment(struct net *net, struct sock *sk, struct sk_buff *skb,
>> /*
>> * Put this fragment into the sending queue.
>> */
>> - skb_set_delivery_time(frag, tstamp, tstamp_type);
>> + skb_set_tstamp_type_frm_clkid(frag, tstamp, tstamp_type);
>> err = output(net, sk, frag);
>> if (err)
>> goto fail;
>
> When replying another thread and looking closer at the ip6 changes, these two line changes should not be needed.
Similar code exists in ip_output.c for ipv4 packets => ip_do_fragment => I was thinking do we need
require that code or not.
Since in both functionality are the same, only difference is protocol.
>From what i see is the for Frag cases in both ipv4 and ipv6, previously skb->tstamp_type was being
set for each fragments.
If we are planning to not do it for ip6 the same should follow for ip4 too.