From: Jon Kohler <jon@nutanix.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Christian Benvenuti <benve@cisco.com>,
Satish Kharat <satishkh@cisco.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] enic: add ethtool get_channel support
Date: Wed, 26 Jun 2024 00:37:25 +0000 [thread overview]
Message-ID: <EF2C8FF1-BD91-4F46-BFE4-D2855A43F739@nutanix.com> (raw)
In-Reply-To: <20240625170325.77b9ddd5@kernel.org>
> On Jun 25, 2024, at 8:03 PM, Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Mon, 24 Jun 2024 11:49:00 -0700 Jon Kohler wrote:
>> + switch (vnic_dev_get_intr_mode(enic->vdev)) {
>> + case VNIC_DEV_INTR_MODE_MSIX:
>> + channels->max_rx = ENIC_RQ_MAX;
>> + channels->max_tx = ENIC_WQ_MAX;
>> + channels->rx_count = enic->rq_count;
>> + channels->tx_count = enic->wq_count;
>> + break;
>> + case VNIC_DEV_INTR_MODE_MSI:
>> + channels->max_rx = 1;
>> + channels->max_tx = 1;
>> + channels->rx_count = 1;
>> + channels->tx_count = 1;
>> + break;
>> + case VNIC_DEV_INTR_MODE_INTX:
>> + channels->max_combined = 1;
>> + channels->combined_count = 1;
>> + default:
>> + break;
>> + }
>
> sorry for not responding properly to your earlier email, but I think
> MSI should also be combined. What matters is whether the IRQ serves
> just one of {Rx, Tx} or both.
>
> For MSI, I see:
>
> 1 . enic_dev_init() does:
> netif_napi_add(netdev, &enic->napi[0], enic_poll);
> ^^^^^^^^^
>
> 2. enic_request_intr() does
> request_irq(enic->pdev->irq, enic_isr_msi, ...
> ^^^^^^^^^^^^
>
> 3. enic_isr_msi() does
> napi_schedule_irqoff(&enic->napi[0]);
> thus matching the NAPI from step #1.
>
> 4. enic_poll() calls both enic_wq_service, and enic_rq_service
>
> So it's combined, AFAICT, similar to INTX in the relevant parts.
Ok, thanks for the tip, I appreciate it. I’ll send out a v3 shortly
> --
> pw-bot: cr
prev parent reply other threads:[~2024-06-26 0:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-24 18:49 Jon Kohler
2024-06-25 17:44 ` Sai Krishna Gajula
2024-06-25 18:11 ` Jon Kohler
2024-06-26 0:03 ` Jakub Kicinski
2024-06-26 0:37 ` Jon Kohler [this message]
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=EF2C8FF1-BD91-4F46-BFE4-D2855A43F739@nutanix.com \
--to=jon@nutanix.com \
--cc=benve@cisco.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®