From: Camelia Alexandra Groza <camelia.groza@nxp.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: "brouer@redhat.com" <brouer@redhat.com>,
"saeed@kernel.org" <saeed@kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>,
"Madalin Bucur (OSS)" <madalin.bucur@oss.nxp.com>,
Ioana Ciornei <ioana.ciornei@nxp.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: RE: [PATCH net-next v2 2/7] dpaa_eth: add basic XDP support
Date: Thu, 19 Nov 2020 13:50:50 +0000 [thread overview]
Message-ID: <VI1PR04MB58074E743AF8D28D85EC1D7AF2E00@VI1PR04MB5807.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20201118162137.149625e3@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net>
> -----Original Message-----
> From: Jakub Kicinski <kuba@kernel.org>
> Sent: Thursday, November 19, 2020 02:22
> To: Camelia Alexandra Groza <camelia.groza@nxp.com>
> Cc: brouer@redhat.com; saeed@kernel.org; davem@davemloft.net;
> Madalin Bucur (OSS) <madalin.bucur@oss.nxp.com>; Ioana Ciornei
> <ioana.ciornei@nxp.com>; netdev@vger.kernel.org
> Subject: Re: [PATCH net-next v2 2/7] dpaa_eth: add basic XDP support
>
> On Mon, 16 Nov 2020 16:42:28 +0200 Camelia Groza wrote:
> > + if (likely(fd_format == qm_fd_contig)) {
> > + xdp_act = dpaa_run_xdp(priv, (struct qm_fd *)fd, vaddr,
> > + &xdp_meta_len);
> > + if (xdp_act != XDP_PASS) {
> > + percpu_stats->rx_packets++;
> > + percpu_stats->rx_bytes += qm_fd_get_length(fd);
> > + return qman_cb_dqrr_consume;
> > + }
> > skb = contig_fd_to_skb(priv, fd);
> > - else
> > + } else {
> > + WARN_ONCE(priv->xdp_prog, "S/G frames not supported
> under XDP\n");
> > skb = sg_fd_to_skb(priv, fd);
>
> It'd be safer to drop the packet if the format does not allow XDP
> to run. Otherwise someone can bypass whatever policy XDP is trying
> to enforce.
I agree on the policy enforcement issue. I'll drop instead. Thanks.
next prev parent reply other threads:[~2020-11-19 13:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-16 14:42 [PATCH net-next v2 0/7] dpaa_eth: add XDP support Camelia Groza
2020-11-16 14:42 ` [PATCH net-next v2 1/7] dpaa_eth: add struct for software backpointers Camelia Groza
2020-11-16 14:42 ` [PATCH net-next v2 2/7] dpaa_eth: add basic XDP support Camelia Groza
2020-11-19 0:21 ` Jakub Kicinski
2020-11-19 13:50 ` Camelia Alexandra Groza [this message]
2020-11-16 14:42 ` [PATCH net-next v2 3/7] dpaa_eth: limit the possible MTU range when XDP is enabled Camelia Groza
2020-11-16 14:42 ` [PATCH net-next v2 4/7] dpaa_eth: add XDP_TX support Camelia Groza
2020-11-16 14:42 ` [PATCH net-next v2 5/7] dpaa_eth: add XDP_REDIRECT support Camelia Groza
2020-11-16 14:42 ` [PATCH net-next v2 6/7] dpaa_eth: rename current skb A050385 erratum workaround Camelia Groza
2020-11-16 14:42 ` [PATCH net-next v2 7/7] dpaa_eth: implement the A050385 erratum workaround for XDP Camelia Groza
2020-11-16 15:39 ` [PATCH net-next v2 0/7] dpaa_eth: add XDP support Madalin Bucur (OSS)
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=VI1PR04MB58074E743AF8D28D85EC1D7AF2E00@VI1PR04MB5807.eurprd04.prod.outlook.com \
--to=camelia.groza@nxp.com \
--cc=brouer@redhat.com \
--cc=davem@davemloft.net \
--cc=ioana.ciornei@nxp.com \
--cc=kuba@kernel.org \
--cc=madalin.bucur@oss.nxp.com \
--cc=netdev@vger.kernel.org \
--cc=saeed@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).