On Fri, 6 Oct 2017 13:17:48 +0200
Jesper Dangaard Brouer <[email protected]> wrote:

> > > -int cpu_map_enqueue(struct bpf_cpu_map_entry *rcpu, struct xdp_buff *xdp)
> > > +int cpu_map_enqueue(struct bpf_cpu_map_entry *rcpu, struct xdp_buff *xdp,
> > > +             struct net_device *dev_rx)
> > >   {
> > >           struct xdp_pkt *xdp_pkt;
> > >           int headroom;
> > > @@ -505,7 +506,7 @@ int cpu_map_enqueue(struct bpf_cpu_map_entry *rcpu, 
> > > struct xdp_buff *xdp)
> > >           xdp_pkt = xdp->data_hard_start;
> > >           xdp_pkt->data = xdp->data;
> > >           xdp_pkt->len  = xdp->data_end - xdp->data;
> > > - xdp_pkt->headroom = headroom;
> > > + xdp_pkt->headroom = headroom - sizeof(*xdp_pkt);    
> > 
> > (Just a note, bit confusing that first two patches add and extend
> >   this, and only in the third you add the xdp->data_meta handling,
> >   makes it harder to review at least.)  
> 
> Sorry.  This is a left-overs from rebasing and measuring the cost of
> transferring only the pointer to the page, and remote put_page().
> And your xdp->data_meta, happen basically while my patches was in-flight.
> 
> I'll move this one-line back to patch 2, to spreading over too many
> patches.

I instead choose to move the creation of cpu_map_enqueue() into this
patch, but in a more simple version stating explicit that this is only
seen as a void pointer enqueue.

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer

Reply via email to