netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: FUJITA Tomonori <fujita.tomonori@gmail.com>
Cc: netdev@vger.kernel.org, andrew@lunn.ch, jiri@resnulli.us,
	horms@kernel.org
Subject: Re: [PATCH net-next v4 4/6] net: tn40xx: add basic Rx handling
Date: Mon, 6 May 2024 18:58:37 -0700	[thread overview]
Message-ID: <20240506185837.0f1db786@kernel.org> (raw)
In-Reply-To: <20240501230552.53185-5-fujita.tomonori@gmail.com>

On Thu,  2 May 2024 08:05:50 +0900 FUJITA Tomonori wrote:
> @@ -745,6 +1248,21 @@ static irqreturn_t tn40_isr_napi(int irq, void *dev)
>  	return IRQ_HANDLED;
>  }
>  
> +static int tn40_poll(struct napi_struct *napi, int budget)
> +{
> +	struct tn40_priv *priv = container_of(napi, struct tn40_priv, napi);
> +	int work_done;
> +
> +	tn40_tx_cleanup(priv);
> +
> +	work_done = tn40_rx_receive(priv, &priv->rxd_fifo0, budget);
> +	if (work_done < budget) {
> +		napi_complete(napi);

napi_complete_done() works better with busy polling and such 

> +		tn40_enable_interrupts(priv);
> +	}
> +	return work_done;
> +}
> +

> +	netif_napi_del(&priv->napi);
> +	napi_disable(&priv->napi);

These two lines are likely in the wrong order

  parent reply	other threads:[~2024-05-07  1:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-01 23:05 [PATCH net-next v4 0/6] add ethernet driver for Tehuti Networks TN40xx chips FUJITA Tomonori
2024-05-01 23:05 ` [PATCH net-next v4 1/6] net: tn40xx: add pci " FUJITA Tomonori
2024-05-07  1:38   ` Jakub Kicinski
2024-05-08  7:36     ` FUJITA Tomonori
2024-05-08 13:49       ` Jakub Kicinski
2024-05-01 23:05 ` [PATCH net-next v4 2/6] net: tn40xx: add register defines FUJITA Tomonori
2024-05-01 23:05 ` [PATCH net-next v4 3/6] net: tn40xx: add basic Tx handling FUJITA Tomonori
2024-05-07  1:51   ` Jakub Kicinski
2024-05-08  7:41     ` FUJITA Tomonori
2024-05-01 23:05 ` [PATCH net-next v4 4/6] net: tn40xx: add basic Rx handling FUJITA Tomonori
2024-05-06  9:20   ` Paolo Abeni
2024-05-08  7:26     ` FUJITA Tomonori
2024-05-07  1:58   ` Jakub Kicinski [this message]
2024-05-08  7:43     ` FUJITA Tomonori
2024-05-01 23:05 ` [PATCH net-next v4 5/6] net: tn40xx: add mdio bus support FUJITA Tomonori
2024-05-01 23:05 ` [PATCH net-next v4 6/6] net: tn40xx: add PHYLIB support FUJITA Tomonori
2024-05-08 12:21   ` Andrew Lunn
2024-05-08 13:18     ` FUJITA Tomonori
2024-05-08 14:03       ` Andrew Lunn
2024-05-09  4:23       ` FUJITA Tomonori
2024-05-09 13:37         ` Andrew Lunn
2024-05-12  5:20           ` FUJITA Tomonori

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=20240506185837.0f1db786@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=fujita.tomonori@gmail.com \
    --cc=horms@kernel.org \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    /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).