From: Jakub Kicinski <kuba@kernel.org>
To: John Daley <johndale@cisco.com>
Cc: andrew+netdev@lunn.ch, benve@cisco.com, davem@davemloft.net,
edumazet@google.com, neescoba@cisco.com, netdev@vger.kernel.org,
pabeni@redhat.com, satishkh@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: Fri, 10 Jan 2025 16:41:52 -0800 [thread overview]
Message-ID: <20250110164152.0ededf8a@kernel.org> (raw)
In-Reply-To: <20250110235204.8536-1-johndale@cisco.com>
On Fri, 10 Jan 2025 15:52:04 -0800 John Daley wrote:
> >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.
>
> Fyi, after making suggested change I used pp_alloc_fail.py but no
> errors were injected. I think the path from page_pool_dev_alloc()
> does not call page_pool_alloc_pages()?
>
> Here is what I beleive the call path is:
> page_pool_dev_alloc(rq->pool, &offset, &truesize)
> page_pool_alloc(pool, offset, size, gfp)
> netmem_to_page(page_pool_alloc_netmem(pool, offset, size, gfp));
> page_pool_alloc_frag_netmem(pool, offset, *size, gfp);
> page_pool_alloc_netmems(pool, gfp);
> __page_pool_alloc_pages_slow(pool, gfp);
>
> If I change the call from page_pool_dev_alloc() to
> page_pool_dev_alloc_pages() in the driver I do see the errors injected.
Ah, good point. I think the netmems conversion broke it :(
If we moved the error injection to happen on page_pool_alloc_netmems
it would work, right? Would I be able to convince you to test that
and send a patch? :)
next prev parent reply other threads:[~2025-01-11 0: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
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 [this message]
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=20250110164152.0ededf8a@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).