On Sun, Jun 30, 2019 at 07:45:13PM +0300, Ivan Khoronzhuk wrote:
> On Sun, Jun 30, 2019 at 07:34:17PM +0300, Ilias Apalodimas wrote:
> >Hi Ivan,
> >>
> >>[...]
> >>
> >>>+
> >>>+static int netsec_xdp(struct net_device *ndev, struct netdev_bpf *xdp)
> >>>+{
> >>>+  struct netsec_priv *priv = netdev_priv(ndev);
> >>>+
> >>>+  switch (xdp->command) {
> >>>+  case XDP_SETUP_PROG:
> >>>+          return netsec_xdp_setup(priv, xdp->prog, xdp->extack);
> >>>+  case XDP_QUERY_PROG:
> >>>+          xdp->prog_id = priv->xdp_prog ? priv->xdp_prog->aux->id : 0;
> >>xdp_attachment family to save bpf flags?
> >Sure why not. This can always be added later though since many drivers are
> >already doing it similarly no?
> yes.
> I can work w/o this ofc.
> But netronome and cpsw (me) added this.
Ok let's start using that

> What I've seen it allows to prevent prog update if flag doesn't allow it.
> Usually it doesn't allow, but can be forced with flag. In another case it can
> be updated any time w/o reason...and seems like in your case it's sensitive.
I intend to send a follow up patch anyway to remove the declaration on the top
of the file of netsec_set_tx_de(). I intentionally choose to add that to make
the review easier (since re-arranging would mess that up).

I'll just this optimization as well on the follow up patch since it doesn't
break anything

Thanks
/Ilias

Reply via email to