Commit Graph

16 Commits

Author SHA1 Message Date
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
Charles (Chas) Williams
9ec8127c3d bnx2x: determine queue sizes sooner
The VF needs to determine the queues sizes before .dev_infos_get
so that it can hint to the upper layer the proper sizes.  Move
bnx2x_vf_get_resources() to .eth_dev_init and probe with the guesses
from bnx2x_init_rte().

Signed-off-by: Chas Williams <3chas3@gmail.com>
Acked-by: Rasesh Mody <rasesh.mody@qlogic.com>
2016-03-16 16:51:12 +01:00
Stephen Hemminger
52be0607bf bnx2x: remove unused variable
The mbuf_alloc_size is leftover from BSD or some other code base.
It is set but never used in DPDK driver.  After that the related defines
can also be eliminated.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Harish Patil <harish.patil@qlogic.com>
2016-03-16 16:49:15 +01:00
Ravi Kerur
d6b324c00f mbuf: get DMA address
Macros RTE_MBUF_DATA_DMA_ADDR and RTE_MBUF_DATA_DMA_ADDR_DEFAULT
are defined in each PMD driver file. Convert macros to inline
functions and move them to common lib/librte_mbuf/rte_mbuf.h file.
PMD drivers include rte_mbuf.h file directly/indirectly hence no
additioanl header file inclusion is necessary.

Signed-off-by: Ravi Kerur <rkerur@gmail.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2016-03-04 16:01:15 +01: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
9f190ffbce bnx2x: add version
Add BNX2X PMD version, print it as part of adapter info.
Adjusted print adapter info output formatting.

This patch versions BNX2X PMD at 1.0.0.

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
2015-12-13 01:58:10 +01:00
Rasesh Mody
5a1d76f9c2 bnx2x: fix build on FreeBSD
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
Harish Patil
8dc08a093a bnx2x: add periodic debug option
The periodic debug option is used to collect periodic
events like statistics, register access etc and won't
interfere with user-level messages.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
2015-12-13 01:55:12 +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
Chas Williams
537ae1c996 bnx2x: fix double init check
Check sc->state to prevent double init.
If the link is up, then the driver cannot be stopped and started
successfully.  Instead of checking the link status, use the driver's
state.

Signed-off-by: Chas Williams <3chas3@gmail.com>
2015-12-09 22:02:33 +01:00
Chas Williams
6c6a6e337d bnx2x: set ethernet address type during VF Tx
The original was always setting unicast.  While here, clean up some
other references that also point into the Ethernet header.

Signed-off-by: Chas Williams <3chas3@gmail.com>
Acked-by: Harish Patil <harish.patil@qlogic.com>
2015-12-07 01:03:12 +01:00
Chas Williams
a18d3da2bf bnx2x: fix little endian conversion in Tx
tx_start_bd->vlan_or_ethertype is le16

Signed-off-by: Chas Williams <3chas3@gmail.com>
2015-12-07 00:55:51 +01:00
Thomas Monjalon
87b1faa0e0 bnx2x: fix part of 32-bit build
Example of errors:
	error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
	error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘uint64_t
	error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘unsigned int’

Only 2 files are fixed. The others errors are left as exercise to the authors.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-08-03 17:39:11 +02:00
Thomas Monjalon
fe716d3802 bnx2x: fix build with debug enabled
Build log:
	error: unused variable ‘cid’
	error: ‘RTE_LOG_WARN’ undeclared
	error: expected ‘)’ before ‘sc’

There were unused variables defined for debug but not used in debug log because
it was ifdef'ed a the wrong condition (RTE_LIBRTE_BNX2X_DEBUG_DRIVER).

The warning were using WARN instead of WARNING.

Some debug messages had some extra parameters.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-08-03 17:25:00 +02: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