lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240508.164356.95077580739186400.fujita.tomonori@gmail.com>
Date: Wed, 08 May 2024 16:43:56 +0900 (JST)
From: FUJITA Tomonori <fujita.tomonori@...il.com>
To: kuba@...nel.org
Cc: fujita.tomonori@...il.com, netdev@...r.kernel.org, andrew@...n.ch,
 jiri@...nulli.us, horms@...nel.org
Subject: Re: [PATCH net-next v4 4/6] net: tn40xx: add basic Rx handling

Hi,

On Mon, 6 May 2024 18:58:37 -0700
Jakub Kicinski <kuba@...nel.org> wrote:

> 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 

Understood, fixed.

I also fixed the function to handle the cases where budget is zero.


>> +		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

Ah, fixed.


Thanks a lot!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ