linux_dsm_epyc7002/drivers/net
Petri Gynther 66d06757d9 net: bcmgenet: simplify __bcmgenet_tx_reclaim()
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@google.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-04 23:54:54 -05:00
..
appletalk net/appletalk: LTPC needs virt_to_bus 2015-02-20 16:28:46 -05:00
arcnet net: Kill dev_rebuild_header 2015-03-02 16:43:41 -05:00
bonding bonding: Implement port churn-machine (AD standard 43.4.17). 2015-02-24 16:05:48 -05:00
caif
can bfin_can: Merge header file from arch dependent location 2015-03-04 09:52:49 +01:00
cris
dsa Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-03-03 21:16:48 -05:00
ethernet net: bcmgenet: simplify __bcmgenet_tx_reclaim() 2015-03-04 23:54:54 -05:00
fddi
hamradio ax25: Stop using magic neighbour cache operations. 2015-03-03 14:44:41 -05:00
hippi
hyperv hyperv: Implement netvsc_get_channels() ethool op 2015-02-28 16:51:36 -05:00
ieee802154 at86rf230: add warning if edge-triggered irq 2015-02-27 18:42:44 +01:00
ipvlan net: Kill dev_rebuild_header 2015-03-02 16:43:41 -05:00
irda
phy amd-xgbe-phy: PHY KX/KR mode differences 2015-02-25 16:57:42 -05:00
plip
ppp net: Remove iocb argument from sendmsg and recvmsg 2015-03-02 13:06:31 -05:00
slip
team Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-03-03 21:16:48 -05:00
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-03-03 21:16:48 -05:00
vmxnet3 Driver: Vmxnet3: Copy TCP header to mapped frame for IPv6 packets 2015-03-01 23:03:42 -05:00
wan wan: cosa: replace current->state by set_current_state() 2015-02-22 15:24:10 -05:00
wimax
wireless Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-03-03 21:16:48 -05:00
xen-netback Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-03-03 21:16:48 -05:00
dummy.c
eql.c
ifb.c
Kconfig ipvlan: Fix text that talks about ip util support 2015-02-20 16:35:44 -05:00
LICENSE.SRC
loopback.c
macvlan.c net: Kill dev_rebuild_header 2015-03-02 16:43:41 -05:00
macvtap.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-03-03 21:16:48 -05:00
Makefile
mdio.c
mii.c
netconsole.c netconsole: Use eth_<foo>_addr instead of memset 2015-03-03 17:01:37 -05:00
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tun.c net: Remove iocb argument from sendmsg and recvmsg 2015-03-02 13:06:31 -05:00
veth.c
virtio_net.c OK, this has the big virtio 1.0 implementation, as specified by OASIS. 2015-02-18 09:24:01 -08:00
vxlan.c vxlan: Use checksum partial with remote checksum offload 2015-02-11 15:12:13 -08:00
xen-netfront.c xen-netfront: Use static attribute groups for sysfs entries 2015-02-05 00:31:12 -08:00