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: <059ad0d0-db28-46ef-8f53-06bc2f2ce30c@davidwei.uk>
Date: Tue, 26 Nov 2024 21:36:33 -0800
From: David Wei <dw@...idwei.uk>
To: Somnath Kotur <somnath.kotur@...adcom.com>
Cc: netdev@...r.kernel.org, Michael Chan <michael.chan@...adcom.com>,
 Andy Gospodarek <andrew.gospodarek@...adcom.com>,
 Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net v1 1/3] bnxt_en: refactor tpa_info alloc/free into
 helpers

On 2024-11-25 22:30, Somnath Kotur wrote:
> On Mon, Nov 25, 2024 at 9:54 AM David Wei <dw@...idwei.uk> wrote:
>>
>> Refactor bnxt_rx_ring_info->tpa_info operations into helpers that work
>> on a single tpa_info in prep for queue API using them.
>>
>> There are 2 pairs of operations:
>>
>> * bnxt_alloc_one_tpa_info()
>> * bnxt_free_one_tpa_info()
>>
>> These alloc/free the tpa_info array itself.
>>
>> * bnxt_alloc_one_tpa_info_data()
>> * bnxt_free_one_tpa_info_data()
>>
>> These alloc/free the frags stored in tpa_info array.
>>
>> Signed-off-by: David Wei <dw@...idwei.uk>
>> ---
>>  drivers/net/ethernet/broadcom/bnxt/bnxt.c | 148 ++++++++++++++--------
>>  1 file changed, 95 insertions(+), 53 deletions(-)
>>
...
>> @@ -3461,13 +3468,17 @@ static void bnxt_free_one_rx_ring_skbs(struct bnxt *bp, int ring_nr)
>>
>>  static void bnxt_free_rx_skbs(struct bnxt *bp)
>>  {
>> +       struct bnxt_rx_ring_info *rxr;
>>         int i;
>>
>>         if (!bp->rx_ring)
>>                 return;
>>
>> -       for (i = 0; i < bp->rx_nr_rings; i++)
>> -               bnxt_free_one_rx_ring_skbs(bp, i);
>> +       for (i = 0; i < bp->rx_nr_rings; i++) {
>> +               rxr = &bp->rx_ring[i];
>> +
>> +               bnxt_free_one_rx_ring_skbs(bp, rxr);
> Minor nit; Could avoid a declaration and an assignment here by
> directly calling this API with the 2nd param set to &bp->rx_ring[i] ?

Sounds good!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ