From: Jakub Kicinski <kuba@kernel.org>
To: Shinas Rasheed <srasheed@marvell.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<hgani@marvell.com>, <vimleshk@marvell.com>, <sedara@marvell.com>,
<egallen@redhat.com>, <mschmidt@redhat.com>, <pabeni@redhat.com>,
<horms@kernel.org>, <wizhao@redhat.com>, <kheib@redhat.com>,
<konguyen@redhat.com>, Veerasenareddy Burru <vburru@marvell.com>,
Satananda Burla <sburla@marvell.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net-next v3 6/8] octeon_ep_vf: add Tx/Rx processing and interrupt support
Date: Fri, 5 Jan 2024 19:30:29 -0800 [thread overview]
Message-ID: <20240105193029.004ee174@kernel.org> (raw)
In-Reply-To: <20240105203823.2953604-7-srasheed@marvell.com>
On Fri, 5 Jan 2024 12:38:21 -0800 Shinas Rasheed wrote:
> +static int octep_vf_iq_full_check(struct octep_vf_iq *iq)
> +{
> + if (likely((IQ_INSTR_SPACE(iq)) >
> + OCTEP_VF_WAKE_QUEUE_THRESHOLD))
> + return 0;
> +
> + /* Stop the queue if unable to send */
> + netif_stop_subqueue(iq->netdev, iq->q_no);
> +
> + /* check again and restart the queue, in case NAPI has just freed
> + * enough Tx ring entries.
> + */
> + if (unlikely(IQ_INSTR_SPACE(iq) >
> + OCTEP_VF_WAKE_QUEUE_THRESHOLD)) {
> + netif_start_subqueue(iq->netdev, iq->q_no);
> + iq->stats.restart_cnt++;
> + return 0;
> + }
Please use the macros from netdev_queues.h here as well.
Looks like you may be missing a memory barrier here.
And please call this function after queuing an skb to
make sure NETDEV_TX_BUSY is almost never returned.
See Documentation/networking/driver.rst
next prev parent reply other threads:[~2024-01-06 3:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-05 20:38 [PATCH net-next v3 0/8] add octeon_ep_vf driver Shinas Rasheed
2024-01-05 20:38 ` [PATCH net-next v3 1/8] octeon_ep_vf: Add driver framework and device initialization Shinas Rasheed
2024-01-05 20:38 ` [PATCH net-next v3 2/8] octeon_ep_vf: add hardware configuration APIs Shinas Rasheed
2024-01-05 20:38 ` [PATCH net-next v3 3/8] octeon_ep_vf: add VF-PF mailbox communication Shinas Rasheed
2024-01-05 20:38 ` [PATCH net-next v3 4/8] octeon_ep_vf: add Tx/Rx ring resource setup and cleanup Shinas Rasheed
2024-01-05 20:38 ` [PATCH net-next v3 5/8] octeon_ep_vf: add support for ndo ops Shinas Rasheed
2024-01-05 20:38 ` [PATCH net-next v3 6/8] octeon_ep_vf: add Tx/Rx processing and interrupt support Shinas Rasheed
2024-01-06 3:30 ` Jakub Kicinski [this message]
2024-01-05 20:38 ` [PATCH net-next v3 7/8] octeon_ep_vf: add ethtool support Shinas Rasheed
2024-01-06 3:32 ` Jakub Kicinski
2024-01-08 9:40 ` [EXT] " Shinas Rasheed
2024-01-05 20:38 ` [PATCH net-next v3 8/8] octeon_ep_vf: update MAINTAINERS Shinas Rasheed
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=20240105193029.004ee174@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=egallen@redhat.com \
--cc=hgani@marvell.com \
--cc=horms@kernel.org \
--cc=kheib@redhat.com \
--cc=konguyen@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mschmidt@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sburla@marvell.com \
--cc=sedara@marvell.com \
--cc=srasheed@marvell.com \
--cc=vburru@marvell.com \
--cc=vimleshk@marvell.com \
--cc=wizhao@redhat.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).