Commit Graph

14 Commits

Author SHA1 Message Date
Chas Williams
cf3d07b1e6 net/bnx2x: remove unused Rx queue code
Fixes: 540a211084 ("bnx2x: driver core")

Signed-off-by: Chas Williams <3chas3@gmail.com>
Acked-by: Harish Patil <harish.patil@qlogic.com>
2016-10-13 15:30:59 +02:00
Jan Viktorin
2f3193cf0f pci: inherit common driver in PCI driver
Remove the 'name' member from rte_pci_driver and move to generic
rte_driver.

Most of the PMD drivers were initially using DRIVER_REGISTER_PCI(<name>..)
as well as assigning a name to eth_driver.pci_drv.name member.
In this patch, only the original DRIVER_REGISTER_PCI(<name>..) name has
been populated into the rte_driver.name member - assignments through
eth_driver has been removed.

Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
[Shreyansh: Rebase and expand changes to newly added files]
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: David Marchand <david.marchand@6wind.com>
2016-10-03 16:33:55 +02:00
Charles (Chas) Williams
102be0a6cb net/bnx2x: fix incorrect buffer length on Rx
The Rx function should not be setting the mbuf buffer length, so remove
the assignment.

Fixes: 540a211084 ("bnx2x: driver core")

Signed-off-by: Charles (Chas) Williams <ciwillia@brocade.com>
Acked-by: Harish Patil <harish.patil@qlogic.com>
2016-06-24 18:28:09 +02:00
Rasesh Mody
3570f700b3 net/bnx2x: use single doorbell for Tx
Change the Tx routine to ring the doorbell once per burst
and not on every Tx packet. This driver-level optimization
is necessary to achieve line rates for larger frame
sizes (1k or more).

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
Signed-off-by: Harish Patil <harish.patil@qlogic.com>
2016-06-15 17:13:55 +02:00
Rasesh Mody
827ed2a118 net/bnx2x: restructure Tx routine
- Process Tx completions based on configured Tx free threshold and
  determine how much TX BDs are required before invoking bnx2x_tx_encap()
- Change bnx2x_tx_encap() to void function as it can now never fail

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
Signed-off-by: Harish Patil <harish.patil@qlogic.com>
2016-06-15 17:13:55 +02:00
Rasesh Mody
ec9c605fd3 net/bnx2x: fix dropped packet count in stats
Fix stats_get() routine to display drop counters under imissed counter.

Fixes: 540a211084 ("bnx2x: driver core")

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
Signed-off-by: Harish Patil <harish.patil@qlogic.com>
2016-06-15 17:13:55 +02:00
Olivier Matz
fbfd99551c mbuf: add raw allocation function
Many drivers provide their own implementation of rte_mbuf_raw_alloc(),
duplicating the code. Introduce a new public function in rte_mbuf to
allocate a raw mbuf (uninitialized).

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2016-05-17 08:31:33 +02:00
Huawei Xie
693f715da4 remove extra parentheses in return statement
fix the error reported by checkpatch:
  "ERROR: return is not a function, parentheses are not required"

remove parentheses in return like:
  "return (logical expressions)"

remove parentheses in return a function like:
  "return (rte_mempool_lookup(...))"

Fixes: 6307b909b8 ("lib: remove extra parenthesis after return")

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
2016-02-10 15:47:50 +01:00
Rasesh Mody
99d47f445e bnx2x: fix 32-bit build
Compile tested.

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
2015-12-13 01:58:10 +01:00
Rasesh Mody
059113cced bnx2x: add license file
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
2015-12-13 01:58:10 +01:00
Rasesh Mody
c6eedc5220 bnx2x: skip Rx producer refresh when no packet
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
2015-12-13 01:46:07 +01:00
Rasesh Mody
638f2066a6 bnx2x: fix Tx error check
Correct the error check in PMD transmit routine.

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
2015-12-13 01:45:31 +01:00
Chas Williams
7ee177a72f bnx2x: fix restart
If you stop and start the driver, the rx queue will have the previous
index values when programming the adapter.  Therefore, we should always
reset the queue indices when the rx ring is setup.  Note:  We need to
clear (write) the status block's completion queue index since it is
possibly in a read cache.

Tidy some init code to make it clearer what the defaults are.

Signed-off-by: Chas Williams <3chas3@gmail.com>
2015-12-13 01:44:51 +01:00
Stephen Hemminger
540a211084 bnx2x: driver core
This is the first of several parts for a new driver supporting
Broadcom/Qlogic NetXtremeII 10 gigabit devices.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Harish Patil <harish.patil@qlogic.com>
2015-07-27 04:27:05 +02:00