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] [day] [month] [year] [list]
Date:	Wed, 04 Mar 2015 23:55:25 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	pgynther@...gle.com
Cc:	netdev@...r.kernel.org, f.fainelli@...il.com, jaedon.shin@...il.com
Subject: Re: [PATCH net-next v2] net: bcmgenet: simplify
 __bcmgenet_tx_reclaim()

From: Petri Gynther <pgynther@...gle.com>
Date: Wed,  4 Mar 2015 14:30:01 -0800 (PST)

> 1. Use c_index and ring->c_index to determine how many TxCBs/TxBDs are
>    ready for cleanup
>    - c_index = the current value of TDMA_CONS_INDEX
>    - TDMA_CONS_INDEX is HW-incremented and auto-wraparound (0x0-0xFFFF)
>    - ring->c_index = __bcmgenet_tx_reclaim() cleaned up to this point on
>      the previous invocation
> 
> 2. Add bcmgenet_tx_ring->clean_ptr
>    - index of the next TxCB to be cleaned
>    - incremented as TxCBs/TxBDs are processed
>    - value always in range [ring->cb_ptr, ring->end_ptr]
> 
> 3. Fix incrementing of dev->stats.tx_packets
>    - should be incremented only when tx_cb_ptr->skb != NULL
> 
> These changes simplify __bcmgenet_tx_reclaim(). Furthermore, Tx ring size
> can now be any value.
> 
> With the old code, Tx ring size had to be a power-of-2:
>    num_tx_bds = ring->size;
>    c_index &= (num_tx_bds - 1);
>    last_c_index &= (num_tx_bds - 1);
> 
> Signed-off-by: Petri Gynther <pgynther@...gle.com>

Applied, thanks.
--
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