[PATCH 01/41] rxrpc: Fix RTT determination to use PING ACKs as a source

Jeffrey E Altman jaltman at auristor.com
Fri Nov 10 08:12:13 PST 2023


On 11/10/2023 9:15 AM, Jeffrey E Altman wrote:
>
>> I'm not sure how expanding it internally to 64-bits actually helps 
>> since the
>> upper 32 bits is not visible to the peer.
> rxrpc_complete_rtt_probe contains the following logic that relies on 
> after() being able to detect
> a serial number wrap.
>
>         /* If a later serial is being acked, then mark this slot as
>          * being available.
>          */
>
>         if (after(acked_serial, orig_serial)) {
>             trace_rxrpc_rtt_rx(call, rxrpc_rtt_rx_obsolete, i,
>                        orig_serial, acked_serial, 0, 0);
>             clear_bit(i + RXRPC_CALL_RTT_PEND_SHIFT, &call->rtt_avail);
>             smp_wmb();
>             set_bit(i, &call->rtt_avail);
>         }
>
> Otherwise, acked_serial = 0x01 will be considered smaller than 
> orig_serial = 0xfffffffe and the slot will not be marked available.
>
> I will note that there is a similar problem with rxrpc_seq_t values 
> which are u32 on the wire but which will wrap for calls that transmit 
> more than approximately 5.5TB of data. Calls of this size are unlikely 
> for a cache manager but are common for any service transmitting volume 
> dumps. 

I misread the definition of after() which is

     static inline bool after(u32 seq1, u32 seq2)
     {
             return (s32)(seq1 - seq2) > 0;
     }

This is sufficient to detect the serial number and sequence number wrapping.

What it doesn't provide is a method for rxrpc tracing and /proc file to 
report on the total number of packets that have been sent or received on 
a call or connection which might or might not be important depending 
upon the use case.

Jeffrey Altman

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4039 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.infradead.org/pipermail/linux-afs/attachments/20231110/4ae5f3d8/attachment-0001.p7s>


More information about the linux-afs mailing list