From: Maciej Fijalkowski <maciejromanfijalkowski@gmail.com>
To: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>, netdev@vger.kernel.org
Subject: Re: [RFC v2 3/6] i40e: use extack for bpf errors
Date: Fri, 1 Mar 2019 12:31:08 +0100 [thread overview]
Message-ID: <20190301122958.000034ba@gmail.com> (raw)
In-Reply-To: <20190228190645.34c21d8b@cakuba.netronome.com>
On Thu, 28 Feb 2019 19:06:45 -0800
Jakub Kicinski <jakub.kicinski@netronome.com> wrote:
> On Thu, 28 Feb 2019 13:54:38 -0800, Stephen Hemminger wrote:
> > @@ -12140,12 +12144,14 @@ static int i40e_xdp(struct net_device *dev,
> > struct i40e_netdev_priv *np = netdev_priv(dev);
> > struct i40e_vsi *vsi = np->vsi;
> >
> > - if (vsi->type != I40E_VSI_MAIN)
> > + if (vsi->type != I40E_VSI_MAIN) {
> > + NL_SET_ERR_MSG_MOD(xdp->extack, "XDP not allowed on VF");
>
> Is that right? Intel tends to have separate drivers for VFs, I think
> the i40evf got renamed to iavf.
>
Good catch, this sanity check is to make sure that XDP is being enabled on main
VSI of PF, not for example the VSI dedicated for Flow Director management
(I40E_VSI_FDIR). Besides that, vsi->type != I40E_VSI_MAIN doesn't yield the
I40E_VSI_SRIOV type.
So it would be better to have an error message like "XDP is not allowed on VSIs
other than main VSI".
Thoughts?
> I think it would be a good idea to CC maintainers on the driver patches.
>
> > return -EINVAL;
> > + }
> >
>
next prev parent reply other threads:[~2019-03-01 11:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-28 21:54 [RFC v2 0/6] use extack when setting up XDP Stephen Hemminger
2019-02-28 21:54 ` [RFC v2 1/6] bnxt: use extack for xdp error messages Stephen Hemminger
2019-02-28 21:54 ` [RFC v2 2/6] ixgbe: use extack for xdp errors Stephen Hemminger
2019-02-28 21:54 ` [RFC v2 3/6] i40e: use extack for bpf errors Stephen Hemminger
2019-03-01 3:06 ` Jakub Kicinski
2019-03-01 11:31 ` Maciej Fijalkowski [this message]
2019-03-01 16:28 ` Jakub Kicinski
2019-03-01 21:55 ` Stephen Hemminger
2019-03-01 22:03 ` Jakub Kicinski
2019-02-28 21:54 ` [RFC v2 4/6] ixgebvf: report xdp errors through extack Stephen Hemminger
2019-02-28 21:54 ` [RFC v2 5/6] mlx4: report " Stephen Hemminger
2019-03-01 3:07 ` Jakub Kicinski
2019-03-04 11:54 ` Tariq Toukan
2019-02-28 21:54 ` [RFC v2 6/6] mlx5: report XDP " Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190301122958.000034ba@gmail.com \
--to=maciejromanfijalkowski@gmail.com \
--cc=jakub.kicinski@netronome.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.