Re: [PATCH v2 net-next 1/9] xdp: introduce mb in xdp_buff/xdp_frame

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

 



On 9/4/20 9:59 AM, Jesper Dangaard Brouer wrote:
>> dev_rx for example seems like it could just be the netdev
>> index rather than a pointer or perhaps can be removed completely. I
>> believe it is only used for 1 use case (redirects to CPUMAP); maybe that
>> code can be refactored to handle the dev outside of xdp_frame.
> 
> The dev_rx is needed when creating an SKB from a xdp_frame (basically
> skb->dev = rx_dev). Yes, that is done in cpumap, but I want to
> generalize this.  The veth also creates SKBs from xdp_frame, but use
> itself as skb->dev.
> 
> And yes, we could save some space storing the index instead, and trade
> space for cycles in a lookup.

I think this can be managed without adding a reference to the xdp_frame.
I'll start a separate thread on that.

>>
>> As for frame_sz, why does it need to be larger than a u16?
> 
> Because PAGE_SIZE can be 64KiB on some archs.
> 

ok, is there any alignment requirement? can frame_sz be number of 32-bit
words? I believe bit shifts are cheap.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux