netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: John Daley <johndale@cisco.com>
Cc: benve@cisco.com, satishkh@cisco.com, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
	netdev@vger.kernel.org, Nelson Escobar <neescoba@cisco.com>
Subject: Re: [PATCH net-next v4 4/6] enic: Use the Page Pool API for RX when MTU is less than page size
Date: Sat, 4 Jan 2025 17:41:52 -0800	[thread overview]
Message-ID: <20250104174152.67e3f687@kernel.org> (raw)
In-Reply-To: <20250102222427.28370-5-johndale@cisco.com>

On Thu,  2 Jan 2025 14:24:25 -0800 John Daley wrote:
> The Page Pool API improves bandwidth and CPU overhead by recycling
> pages instead of allocating new buffers in the driver. Make use of
> page pool fragment allocation for smaller MTUs so that multiple
> packets can share a page.

Why the MTU limitation? You can set page_pool_params.order 
to appropriate value always use the page pool.

> Added 'pp_alloc_error' per RQ ethtool statistic to count
> page_pool_dev_alloc() failures.

SG, but please don't report it via ethtool. Add it in 
enic_get_queue_stats_rx() as alloc_fail (and enic_get_base_stats()).
As one of the benefits you'll be able to use
tools/testing/selftests/drivers/net/hw/pp_alloc_fail.py
to test this stat and error handling in the driver.

> +void enic_rq_page_cleanup(struct enic_rq *rq)
> +{
> +	struct vnic_rq *vrq = &rq->vrq;
> +	struct enic *enic = vnic_dev_priv(vrq->vdev);
> +	struct napi_struct *napi = &enic->napi[vrq->index];
> +
> +	napi_free_frags(napi);

why?

> +	page_pool_destroy(rq->pool);
> +}
-- 
pw-bot: cr

  reply	other threads:[~2025-01-05  1:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-02 22:24 [PATCH net-next v4 0/6] enic: Use Page Pool API for receiving packets John Daley
2025-01-02 22:24 ` [PATCH net-next v4 1/6] enic: Refactor RX path common code into helper functions John Daley
2025-01-02 22:24 ` [PATCH net-next v4 2/6] enic: Remove an unnecessary parameter from function enic_queue_rq_desc John Daley
2025-01-02 22:24 ` [PATCH net-next v4 3/6] enic: Use function pointers for buf alloc, free and RQ service John Daley
2025-01-02 22:24 ` [PATCH net-next v4 4/6] enic: Use the Page Pool API for RX when MTU is less than page size John Daley
2025-01-05  1:41   ` Jakub Kicinski [this message]
2025-01-06 21:54     ` John Daley
2025-01-07  0:19       ` Jakub Kicinski
2025-01-07  3:00         ` John Daley
2025-01-10  4:03           ` John Daley
2025-01-11  0:38             ` Jakub Kicinski
2025-01-14 21:23               ` John Daley
2025-01-10 23:52     ` John Daley
2025-01-11  0:41       ` Jakub Kicinski
2025-01-14 21:13         ` John Daley
2025-01-02 22:24 ` [PATCH net-next v4 5/6] enic: Move RX coalescing set function John Daley
2025-01-02 22:24 ` [PATCH net-next v4 6/6] enic: Obtain the Link speed only after the link comes up John Daley

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=20250104174152.67e3f687@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=benve@cisco.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=johndale@cisco.com \
    --cc=neescoba@cisco.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=satishkh@cisco.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).