Re: [RFC PATCH v9 09/26] RDMA/rxe: Introduce RXECB(skb)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/28/22 12:29, Jason Gunthorpe wrote:
> On Thu, Jan 27, 2022 at 03:37:38PM -0600, Bob Pearson wrote:
>> Add a #define RXECB(skb) to rxe_hdr.h as a short cut to
>> refer to single members of rxe_pkt_info which is stored in skb->cb
>> in the receive path. Use this to make some cleanups in rxe_recv.c
>>
>> Signed-off-by: Bob Pearson <rpearsonhpe@xxxxxxxxx>
>>  drivers/infiniband/sw/rxe/rxe_hdr.h  |  3 ++
>>  drivers/infiniband/sw/rxe/rxe_recv.c | 55 +++++++++++++---------------
>>  2 files changed, 29 insertions(+), 29 deletions(-)
>>
>> diff --git a/drivers/infiniband/sw/rxe/rxe_hdr.h b/drivers/infiniband/sw/rxe/rxe_hdr.h
>> index e432f9e37795..2a85d1e40e6a 100644
>> +++ b/drivers/infiniband/sw/rxe/rxe_hdr.h
>> @@ -36,6 +36,9 @@ static inline struct sk_buff *PKT_TO_SKB(struct rxe_pkt_info *pkt)
>>  	return container_of((void *)pkt, struct sk_buff, cb);
>>  }
>>  
>> +/* alternative to access a single element of rxe_pkt_info from skb */
>> +#define RXECB(skb) ((struct rxe_pkt_info *)((skb)->cb))
> 
> May as well make this a static inline
> 
> Jason

Mostly these seem to be #defines. See e.g. IPCB, IP6CB, NAPI_GRO_CB, etc. Not sure why but
I copied those.

Bob



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux