Re: [PATCH bpf-next v2 1/2] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev

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

 



On Mon, 2019-06-03 at 11:04 +0200, Björn Töpel wrote:
> On Sat, 1 Jun 2019 at 21:42, Jakub Kicinski
> <jakub.kicinski@xxxxxxxxxxxxx> wrote:
> > On Fri, 31 May 2019 19:18:17 +0000, Saeed Mahameed wrote:
> > > On Fri, 2019-05-31 at 11:42 +0200, Björn Töpel wrote:
> > > > From: Björn Töpel <bjorn.topel@xxxxxxxxx>
> > > > 
> > > > All XDP capable drivers need to implement the
> > > > XDP_QUERY_PROG{,_HW}
> > > > command of ndo_bpf. The query code is fairly generic. This
> > > > commit
> > > > refactors the query code up from the drivers to the netdev
> > > > level.
> > > > 
> > > > The struct net_device has gained two new members: xdp_prog_hw
> > > > and
> > > > xdp_flags. The former is the offloaded XDP program, if any, and
> > > > the
> > > > latter tracks the flags that the supplied when attaching the
> > > > XDP
> > > > program. The flags only apply to SKB_MODE or DRV_MODE, not
> > > > HW_MODE.
> > > > 
> > > > The xdp_prog member, previously only used for SKB_MODE, is
> > > > shared
> > > > with
> > > > DRV_MODE. This is OK, due to the fact that SKB_MODE and
> > > > DRV_MODE are
> > > > mutually exclusive. To differentiate between the two modes, a
> > > > new
> > > > internal flag is introduced as well.
> > > 
> > > Just thinking out loud, why can't we allow any combination of
> > > HW/DRV/SKB modes? they are totally different attach points in a
> > > totally
> > > different checkpoints in a frame life cycle.
> > 
> > FWIW see Message-ID: <20190201080236.446d84d4@xxxxxxxxxx>
> > 
> 
> I've always seen the SKB-mode as something that will eventually be
> removed.
> 

I don't think so, we are too deep into SKB-mode.

> Clickable link:
> https://lore.kernel.org/netdev/20190201080236.446d84d4@xxxxxxxxxx/ :-
> P
> 

So we are all hanging on Jesper's refactoring ideas that are not
getting any priority for now :).


> > > Down the road i think we will utilize this fact and start
> > > introducing
> > > SKB helpers for SKB mode and driver helpers for DRV mode..
> > 
> > Any reason why we would want the extra complexity?  There is
> > cls_bpf
> > if someone wants skb features after all..

Donno, SKB mode is earlier in the stack maybe .. 
 





[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