From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Ratheesh Kannoth <rkannoth@marvell.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<sgoutham@marvell.com>, <gakula@marvell.com>,
<sbhatta@marvell.com>, <hkelam@marvell.com>,
<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>
Subject: Re: [PATCH net] octeontx2-pf: Set maximum queue size to 16K
Date: Wed, 2 Aug 2023 18:11:35 +0200 [thread overview]
Message-ID: <18fec8cd-fc91-736e-7c01-453a18f4e9c5@intel.com> (raw)
In-Reply-To: <20230802105227.3691713-1-rkannoth@marvell.com>
From: Ratheesh Kannoth <rkannoth@marvell.com>
Date: Wed, 2 Aug 2023 16:22:27 +0530
> page_pool_init() return error on requesting ring size > 32K.
> PF uses page pool for rx. octeon-tx2 Supported queue size
> are 16, 64, 256, 1K, 2K, 4K, 16K, 64K. If user try to
> configure larger ring size for rx, return error.
>
> Fixes: b2e3406a38f0 ("octeontx2-pf: Add support for page pool")
> Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>
> ---
> drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
> index c47d91da32dc..978e371008d6 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
> @@ -378,7 +378,7 @@ static void otx2_get_ringparam(struct net_device *netdev,
> struct otx2_nic *pfvf = netdev_priv(netdev);
> struct otx2_qset *qs = &pfvf->qset;
>
> - ring->rx_max_pending = Q_COUNT(Q_SIZE_MAX);
> + ring->rx_max_pending = 16384; /* Page pool support on RX */
This is very hardcodish. Why not limit the Page Pool size when creating
instead? It's perfectly fine to have a queue with 64k descriptors and a
Page Pool with only ("only" :D) 16k elements.
Page Pool size affects only the size of the embedded ptr_ring, which is
used for indirect (locking) recycling. I would even recommend to not go
past 2k for PP sizes, it makes no sense and only consumes memory.
> ring->rx_pending = qs->rqe_cnt ? qs->rqe_cnt : Q_COUNT(Q_SIZE_256);
> ring->tx_max_pending = Q_COUNT(Q_SIZE_MAX);
> ring->tx_pending = qs->sqe_cnt ? qs->sqe_cnt : Q_COUNT(Q_SIZE_4K);
Thanks,
Olek
next prev parent reply other threads:[~2023-08-02 16:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-02 10:52 Ratheesh Kannoth
2023-08-02 16:11 ` Alexander Lobakin [this message]
2023-08-03 1:13 ` Jakub Kicinski
2023-08-03 2:08 ` Ratheesh Kannoth
2023-08-03 15:07 ` Alexander Lobakin
2023-08-04 2:25 ` [EXT] " Ratheesh Kannoth
2023-08-04 14:43 ` Alexander Lobakin
2023-08-04 20:35 ` Jakub Kicinski
2023-08-07 2:51 ` Ratheesh Kannoth
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=18fec8cd-fc91-736e-7c01-453a18f4e9c5@intel.com \
--to=aleksander.lobakin@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=hkelam@marvell.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rkannoth@marvell.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.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
all inboxes | Powered by JetHome®