On Thu, 8 Aug 2019 12:52:11 -0700, Y Song wrote:
> > Ah ok. In this scenario if driver has a native xdp support we would be 
> > invoking
> > its ndo_bpf even if there's no prog currently attached and it wouldn't 
> > return
> > error value.
> >
> > Looking at dev_xdp_uninstall, setting driver's prog to NULL is being done 
> > only
> > when prog is attached. Maybe we should consider querying the driver in
> > dev_change_xdp_fd regardless of passed fd value? E.g. don't query only when
> > prog >= 0.
> >
> > I don't recall whether this was brought up previously.  
> 
> Thanks for explanation. I think return an error is better in
> such error cases. Otherwise, people mistakenly write wrong
> device name and they may think xdp is detached and it is
> actually not.
> 
> But this probably should not prevent
> this patch as it is more like a kernel issue.

Agreed, we'd probably need a flag here, similar to IF_NOEXIST to keep
backward compat.

Reply via email to