netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Ioana Ciocoi Radulescu <ruxandra.radulescu@nxp.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>
Cc: Ioana Ciornei <ioana.ciornei@nxp.com>
Subject: Re: [PATCH net-next 1/8] dpaa2-eth: Add basic XDP support
Date: Sat, 24 Nov 2018 14:49:17 -0700	[thread overview]
Message-ID: <0e531d69-41bd-13f0-a784-fe1110cf68ff@gmail.com> (raw)
In-Reply-To: <1542992186-26028-2-git-send-email-ruxandra.radulescu@nxp.com>

On 11/23/18 9:56 AM, Ioana Ciocoi Radulescu wrote:
> @@ -215,6 +255,7 @@ static void dpaa2_eth_rx(struct dpaa2_eth_priv *priv,
>  	struct dpaa2_fas *fas;
>  	void *buf_data;
>  	u32 status = 0;
> +	u32 xdp_act;
>  
>  	/* Tracing point */
>  	trace_dpaa2_rx_fd(priv->net_dev, fd);
> @@ -231,8 +272,14 @@ static void dpaa2_eth_rx(struct dpaa2_eth_priv *priv,
>  	percpu_extras = this_cpu_ptr(priv->percpu_extras);
>  
>  	if (fd_format == dpaa2_fd_single) {
> +		xdp_act = run_xdp(priv, ch, (struct dpaa2_fd *)fd, vaddr);
> +		if (xdp_act != XDP_PASS)
> +			return;

please bump the rx counters (packets and bytes) regardless of what XDP
outcome is.

Same for Tx; packets and bytes counter should be bumped for packets
redirected by XDP.

  reply	other threads:[~2018-11-25  8:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-23 16:56 [PATCH net-next 0/8] dpaa2-eth: Introduce XDP support Ioana Ciocoi Radulescu
2018-11-23 16:56 ` [PATCH net-next 2/8] dpaa2-eth: Allow XDP header adjustments Ioana Ciocoi Radulescu
2018-11-23 16:56 ` [PATCH net-next 1/8] dpaa2-eth: Add basic XDP support Ioana Ciocoi Radulescu
2018-11-24 21:49   ` David Ahern [this message]
2018-11-26  7:32     ` Ioana Ciocoi Radulescu
2018-11-23 16:56 ` [PATCH net-next 3/8] dpaa2-eth: Move function Ioana Ciocoi Radulescu
2018-11-23 16:56 ` [PATCH net-next 5/8] dpaa2-eth: Map Rx buffers as bidirectional Ioana Ciocoi Radulescu
2018-11-23 16:56 ` [PATCH net-next 4/8] dpaa2-eth: Release buffers back to pool on XDP_DROP Ioana Ciocoi Radulescu
2018-11-23 16:56 ` [PATCH net-next 6/8] dpaa2-eth: Add support for XDP_TX Ioana Ciocoi Radulescu
2018-11-23 16:56 ` [PATCH net-next 7/8] dpaa2-eth: Cleanup channel stats Ioana Ciocoi Radulescu
2018-11-23 16:56 ` [PATCH net-next 8/8] dpaa2-eth: Add xdp counters Ioana Ciocoi Radulescu
  -- strict thread matches above, loose matches on Subject: below --
2018-11-26 11:36 [PATCH net-next 1/8] dpaa2-eth: Add basic XDP support Camelia Alexandra Groza

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=0e531d69-41bd-13f0-a784-fe1110cf68ff@gmail.com \
    --to=dsahern@gmail.com \
    --cc=davem@davemloft.net \
    --cc=ioana.ciornei@nxp.com \
    --cc=netdev@vger.kernel.org \
    --cc=ruxandra.radulescu@nxp.com \
    /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).