From: Larysa Zaremba <larysa.zaremba@intel.com>
To: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: <netdev@vger.kernel.org>, <lorenzo.bianconi@redhat.com>,
<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>, <ioana.ciornei@nxp.com>,
<vladimir.oltean@nxp.com>, <robert-ionut.alexa@nxp.com>,
<radu-andrei.bulie@nxp.com>
Subject: Re: [PATCH net-next] net: dpaa2-eth: do not always set xsk support in xdp_features flag
Date: Wed, 15 Feb 2023 15:27:35 +0100 [thread overview]
Message-ID: <Y+zr1+AKhdkVxb/i@lincoln> (raw)
In-Reply-To: <3dba6ea42dc343a9f2d7d1a6a6a6c173235e1ebf.1676471386.git.lorenzo@kernel.org>
On Wed, Feb 15, 2023 at 03:32:57PM +0100, Lorenzo Bianconi wrote:
> Do not always add NETDEV_XDP_ACT_XSK_ZEROCOPY bit in xdp_features flag
> but check if the NIC really supports it.
>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
> drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com>
>
> diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
> index 746ccfde7255..a62cffaf6ff1 100644
> --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
> +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
> @@ -4598,8 +4598,10 @@ static int dpaa2_eth_netdev_init(struct net_device *net_dev)
> net_dev->hw_features = net_dev->features;
> net_dev->xdp_features = NETDEV_XDP_ACT_BASIC |
> NETDEV_XDP_ACT_REDIRECT |
> - NETDEV_XDP_ACT_XSK_ZEROCOPY |
> NETDEV_XDP_ACT_NDO_XMIT;
> + if (priv->dpni_attrs.wriop_version >= DPAA2_WRIOP_VERSION(3, 0, 0) &&
> + priv->dpni_attrs.num_queues <= 8)
> + net_dev->xdp_features |= NETDEV_XDP_ACT_XSK_ZEROCOPY;
>
> if (priv->dpni_attrs.vlan_filter_entries)
> net_dev->hw_features |= NETIF_F_HW_VLAN_CTAG_FILTER;
> --
> 2.39.1
>
next prev parent reply other threads:[~2023-02-15 14:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-15 14:32 [PATCH net-next] net: dpaa2-eth: do not always set xsk support in xdp_features flag Lorenzo Bianconi
2023-02-15 14:27 ` Larysa Zaremba [this message]
2023-02-20 7:10 ` patchwork-bot+netdevbpf
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=Y+zr1+AKhdkVxb/i@lincoln \
--to=larysa.zaremba@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ioana.ciornei@nxp.com \
--cc=kuba@kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=lorenzo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=radu-andrei.bulie@nxp.com \
--cc=robert-ionut.alexa@nxp.com \
--cc=vladimir.oltean@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