Re: [PATCH bpf-next] net: xdp: introduce XDP_PACKET_HEADROOM_MIN for veth and generic-xdp

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

 



On Mar 18, Jakub Kicinski wrote:
> On Fri, 18 Mar 2022 20:19:29 +0100 Lorenzo Bianconi wrote:
> > diff --git a/net/core/dev.c b/net/core/dev.c
> > index ba69ddf85af6..92d560e648ab 100644
> > --- a/net/core/dev.c
> > +++ b/net/core/dev.c
> > @@ -4737,7 +4737,7 @@ static u32 netif_receive_generic_xdp(struct sk_buff *skb,
> >  	 * native XDP provides, thus we need to do it here as well.
> >  	 */
> >  	if (skb_cloned(skb) || skb_is_nonlinear(skb) ||
> > -	    skb_headroom(skb) < XDP_PACKET_HEADROOM) {
> > +	    skb_headroom(skb) < XDP_PACKET_HEADROOM_MIN) {
> >  		int hroom = XDP_PACKET_HEADROOM - skb_headroom(skb);
> >  		int troom = skb->tail + skb->data_len - skb->end;
> >  
> 
> IIUC the initial purpose of SKB mode was to be able to test or
> experiment with XDP "until drivers add support". If that's still
> the case the semantics of XDP SKB should be as close to ideal
> XDP implementation as possible.

XDP in skb-mode is useful if we want to perform a XDP_REDIRECT from
an ethernet driver into a wlan device since mac80211 requires a skb.

> 
> We had a knob for specifying needed headroom, is that thing not 
> working / not a potentially cleaner direction?
> 

which one do you mean? I guess it would be useful :)

Regards,
Lorenzo

Attachment: signature.asc
Description: PGP signature


[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