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]
Date:	Fri, 21 Nov 2014 14:59:20 +0000
From:	"Tantilov, Emil S" <emil.s.tantilov@...el.com>
To:	David Laight <David.Laight@...LAB.COM>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>,
	"davem@...emloft.net" <davem@...emloft.net>
CC:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"nhorman@...hat.com" <nhorman@...hat.com>,
	"sassmann@...hat.com" <sassmann@...hat.com>,
	"jogreene@...hat.com" <jogreene@...hat.com>,
	Alexander Duyck <alexander.h.duyck@...hat.com>
Subject: RE: [net-next v2 08/15] ixgbevf: compare total_rx_packets and
 budget in ixgbevf_clean_rx_irq

>-----Original Message-----
>From: David Laight [mailto:David.Laight@...LAB.COM]
>Sent: Friday, November 21, 2014 3:08 AM
>To: Kirsher, Jeffrey T; davem@...emloft.net
>Cc: Tantilov, Emil S; netdev@...r.kernel.org;
>nhorman@...hat.com; sassmann@...hat.com;
>jogreene@...hat.com; Alexander Duyck
>Subject: RE: [net-next v2 08/15] ixgbevf: compare
>total_rx_packets and budget in ixgbevf_clean_rx_irq
>
>From: Jeff Kirsher
>> From: Emil Tantilov <emil.s.tantilov@...el.com>
>>
>> total_rx_packets is the number of packets we had cleaned, and budget is
>> the total number of packets that we could clean per poll. Instead of
>> altering both of these values we can save ourselves one write to memory by
>> just comparing total_rx_packets to the budget and as long as we are less
>> than budget we continue cleaning.
>>
>> Also change the do{}while logic to while{} in order to avoid processing
>> packets when budget is 0.
>
>Does it matter if one packet is processed when budget is zero?
>The 'do {} while ();' version will generate better code.

Yes. The change is in sync with other drivers to protect against netpoll:
https://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/patch/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c?id=57ba34c9b068f314b219affafc19a39f8735d5e8

Thanks,
Emil

>
>	David
>
>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ