From: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
To: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: netdev@vger.kernel.org, jaswinder.singh@linaro.org,
ard.biesheuvel@linaro.org, bjorn.topel@intel.com,
magnus.karlsson@intel.com, brouer@redhat.com,
daniel@iogearbox.net, ast@kernel.org,
makita.toshiaki@lab.ntt.co.jp, jakub.kicinski@netronome.com,
john.fastabend@gmail.com, davem@davemloft.net,
maciejromanfijalkowski@gmail.com
Subject: Re: [net-next, PATCH 3/3, v2] net: netsec: add XDP support
Date: Sun, 30 Jun 2019 19:20:43 +0300 [thread overview]
Message-ID: <20190630162042.GA12704@khorivan> (raw)
In-Reply-To: <1561785805-21647-4-git-send-email-ilias.apalodimas@linaro.org>
On Sat, Jun 29, 2019 at 08:23:25AM +0300, Ilias Apalodimas wrote:
[...]
>+
>+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?
>+ return 0;
>+ default:
>+ return -EINVAL;
>+ }
>+}
>+
> static const struct net_device_ops netsec_netdev_ops = {
> .ndo_init = netsec_netdev_init,
> .ndo_uninit = netsec_netdev_uninit,
>@@ -1537,6 +1842,8 @@ static const struct net_device_ops netsec_netdev_ops = {
> .ndo_set_mac_address = eth_mac_addr,
> .ndo_validate_addr = eth_validate_addr,
> .ndo_do_ioctl = netsec_netdev_ioctl,
>+ .ndo_xdp_xmit = netsec_xdp_xmit,
>+ .ndo_bpf = netsec_xdp,
> };
>
> static int netsec_of_probe(struct platform_device *pdev,
>--
>2.20.1
>
--
Regards,
Ivan Khoronzhuk
next prev parent reply other threads:[~2019-06-30 16:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-29 5:23 [PATCH 0/3, net-next, v2] net: netsec: Add XDP Support Ilias Apalodimas
2019-06-29 5:23 ` [net-next, PATCH 1/3, v2] net: netsec: Use page_pool API Ilias Apalodimas
2019-06-29 5:23 ` [net-next, PATCH 2/3, v2] net: page_pool: add helper function for retrieving dma direction Ilias Apalodimas
2019-06-29 5:23 ` [net-next, PATCH 3/3, v2] net: netsec: add XDP support Ilias Apalodimas
2019-06-29 10:36 ` Jesper Dangaard Brouer
2019-06-30 16:20 ` Ivan Khoronzhuk [this message]
2019-06-30 16:34 ` Ilias Apalodimas
2019-06-30 16:45 ` Ivan Khoronzhuk
2019-06-30 16:50 ` Ilias Apalodimas
2019-06-30 16:25 ` Ivan Khoronzhuk
2019-06-30 16:32 ` Ilias Apalodimas
2019-06-30 16:41 ` Ivan Khoronzhuk
2019-06-30 16:47 ` Ilias Apalodimas
2019-06-30 16:51 ` Ivan Khoronzhuk
2019-06-30 17:09 ` Ivan Khoronzhuk
2019-07-02 2:27 ` [PATCH 0/3, net-next, v2] net: netsec: Add XDP Support David Miller
2019-07-02 3:18 ` Ilias Apalodimas
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=20190630162042.GA12704@khorivan \
--to=ivan.khoronzhuk@linaro.org \
--cc=ard.biesheuvel@linaro.org \
--cc=ast@kernel.org \
--cc=bjorn.topel@intel.com \
--cc=brouer@redhat.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=ilias.apalodimas@linaro.org \
--cc=jakub.kicinski@netronome.com \
--cc=jaswinder.singh@linaro.org \
--cc=john.fastabend@gmail.com \
--cc=maciejromanfijalkowski@gmail.com \
--cc=magnus.karlsson@intel.com \
--cc=makita.toshiaki@lab.ntt.co.jp \
--cc=netdev@vger.kernel.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.