lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZbvJpQfyz-QG8EdQ@lore-desk>
Date: Thu, 1 Feb 2024 17:41:09 +0100
From: Lorenzo Bianconi <lorenzo@...nel.org>
To: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, lorenzo.bianconi@...hat.com,
	davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com,
	bpf@...r.kernel.org, toke@...hat.com,
	willemdebruijn.kernel@...il.com, jasowang@...hat.com,
	sdf@...gle.com, hawk@...nel.org, ilias.apalodimas@...aro.org
Subject: Re: [PATCH v6 net-next 3/5] xdp: add multi-buff support for xdp
 running in generic mode

> On Thu, 1 Feb 2024 12:34:26 +0100 Lorenzo Bianconi wrote:
> > > nit: doesn't look all that related to a netif, I'd put it in skbuff.c  
> > 
> > ack, fine. skb_segment_for_xdp() in this case?
> 
> I think the closest thing we have now is skb_cow_data(),
> so how about skb_cow_data_pp() or skb_cow_fragged() or
> skb_cow_something? :)

I like skb_cow_something :)

> 
> I'm on the fence whether we should split the XDP-ness out.
> I mean the only two xdp-related things are the headroom and
> check for xdp_has_frags, so we could also:
> 
> skb_cow_data_pp(struct page_pool *pool, struct sk_buff **pskb,
> 		unsigned int headroom)
> {
> 	...
> }
> 
> skb_cow_data_xdp(struct page_pool *pool, struct sk_buff **pskb,
> 		 struct bpf_prog *prog)
> {
> 	if (!prog->aux->xdp_has_frags)
> 		return -EINVAL;
> 
> 	return skb_cow_data_pp(pool, pskb, XDP_PACKET_HEADROOM);
> }
> 
> 
> I think it'd increase the chances of reuse. But that's speculative 
> so I'll let you decide if you prefer that or to keep it simple.

ack, I agree. I will fix it in v7.

Regards,
Lorenzo

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ