Commit Graph

25 Commits

Author SHA1 Message Date
Andrew Boyer
dd10c5b4c6 net/ionic: break up queue post function
Break it up rather than inlining it, so that we can remove
branches from the hot path.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
2021-02-25 16:58:56 +01:00
Andrew Boyer
4ad56b7a7c net/ionic: cut down queue structure
This will conserve resources.

Rename ionic_qcq_alloc() arg from 'base' to 'type_name' for clarity.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
2021-02-25 16:58:56 +01:00
Andrew Boyer
c6a9a6fb57 net/ionic: remove unused field from queue structure
This will conserve resources.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
2021-02-25 16:58:56 +01:00
Andrew Boyer
700f974d77 net/ionic: convert info array to generic pointers
Drop the callback part of the object and store only the pointers.
This saves a bit of space and simplifies the code.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
2021-02-25 16:58:56 +01:00
Andrew Boyer
750aebd5eb net/ionic: consolidate adminq code
The adminq is the only caller of ionic_q_service(), so absorb it
into ionic_adminq_service().
Move all of the adminq code together into ionic_main.c.
Staticize a few things.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
2021-02-25 16:58:56 +01:00
Andrew Boyer
0f2b55a401 net/ionic: remove unused filter delete function
This function is unused.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
2021-02-25 16:58:56 +01:00
Andrew Boyer
2aed98657a net/ionic: cut down completion queue structure
Add Q_NEXT_TO_POST() and Q_NEXT_TO_SRVC() macros.
Use a precomputed size mask.

This will conserve resources.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
2021-02-25 16:58:56 +01:00
Andrew Boyer
5611763610 net/ionic: clean up Tx queue version support
The ionic PMD only supports Tx queue version 1 or greater.
Version 1 introduced a new SGL format with support for more
fragments per descriptor.

Add release notes and an explanation to the docs.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
2021-02-03 00:48:11 +01:00
Andrew Boyer
f3926b1f87 net/ionic: observe endiannness in ioread/iowrite
The IONIC FW is little-endian.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
2021-01-29 18:16:10 +01:00
Andrew Boyer
d318c6464c net/ionic: inline queue space function
This is a hot-path function.
Remove ionic_q_has_space() while here.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
2021-01-29 18:16:10 +01:00
Andrew Boyer
bef60d87ad net/ionic: inline queue flush function
This is hot-path function.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Signed-off-by: Neel Patel <neel@pensando.io>
2021-01-29 18:16:10 +01:00
Andrew Boyer
c5d1585035 net/ionic: query firmware for supported queue versions
This allows the PMD to better support FW changes.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Signed-off-by: Shannon Nelson <snelson@pensando.io>
2021-01-29 18:16:10 +01:00
Andrew Boyer
4c8f8d57f6 net/ionic: strip out unneeded interrupt code
Only the NotifyQ uses an interrupt, so simplify the other queues.

Simplify ionic_dev_cmd_adminq_init() and ionic_cq_init().
Move ionic_intr_alloc() into ionic_notify_qcq_alloc().
Create ionic_lif_notifyq_deinit().
Simplify ionic_lif_qcq_deinit().
Remove unneeded flags and defines.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
2021-01-29 18:16:10 +01:00
Andrew Boyer
00b65da52d net/ionic: remove multi-LIF support
This feature is unused, so remove it.

There is exactly one adapter / lif / ethdev per port.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
2021-01-13 18:51:58 +01:00
Andrew Boyer
4ae96cb88f net/ionic: do minor logging fixups
Expose ionic_opcode_to_str() so it can be used for dev cmds, too.
Store the device name in struct adapter.

Switch to memcpy() to work around gcc false positives.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-01-08 16:03:04 +01:00
Andrew Boyer
1abf69fc26 net/ionic: remove some unused fields
This conserves resources.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-01-08 16:03:04 +01:00
Andrew Boyer
47dc2bd39f net/ionic: check for command completion more frequently
This reduces the startup time a bit.

Signed-off-by: Neel Patel <neel@pensando.io>
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-01-08 16:03:04 +01:00
Sunil Kumar Kori
e40303eb0f net/ionic: use standard boolean type
Any DPDK public header file which includes stdbool.h may conflict with
local definition of bool, if any, which further results in compilation
error. To avoid, used standard stdbool.h instead of defining bool
internally.

I observed this issue during a development where I included rte_uuid.h
into rte_ethdev.h. As rte_ethdev.h is included to PMD driver, it started
throwing error as given below:

  CC ionic_rxtx.o
In file included from .../dpdk/build/include/rte_uuid.h:17:0,
                 from .../dpdk/build/include/rte_ethdev.h:161,
                 from .../dpdk/build/include/rte_ethdev_driver.h:18,
                 from .../dpdk/drivers/net/ionic/ionic_rxtx.c:34:
.../dpdk/drivers/net/ionic/ionic_osdep.h:48:17:
    error: two or more data types in declaration specifiers
typedef uint8_t bool;
                 ^
In file included from .../dpdk/drivers/net/ionic/ionic_dev.h:8:0,
                 from .../dpdk/drivers/net/ionic/ionic.h:13,
                 from .../dpdk/drivers/net/ionic/ionic_mac_api.h:8,
                 from .../dpdk/drivers/net/ionic/ionic_rxtx.c:45:
.../dpdk/drivers/net/ionic/ionic_osdep.h:48:1:
    warning: useless type name in empty declaration
typedef uint8_t bool;
^~~~~~~
cc1: warning: unrecognized command line option
				‘-Wno-address-of-packed-member’
.../dpdk/mk/internal/rte.compile-pre.mk:114:
			recipe for target 'ionic_rxtx.o' failed

Fixes: 5ef518098e ("net/ionic: register and initialize adapter")
Cc: stable@dpdk.org

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Alfredo Cardigliano <cardigliano@ntop.org>
2020-03-18 10:21:42 +01:00
Alfredo Cardigliano
a27d901331 net/ionic: add Rx and Tx handling
Add Rx and Tx queues setup and handling.

Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
2020-01-20 18:02:17 +01:00
Alfredo Cardigliano
598f672639 net/ionic: add basic port operations
Add support for port start/stop and handle basic features
including MTU and link up/down.

Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
2020-01-20 18:02:17 +01:00
Alfredo Cardigliano
01a6c311df net/ionic: support admin queue
Add support for the admin queue, which is used for most
of the NIC configurations.

Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
2020-01-20 18:02:17 +01:00
Alfredo Cardigliano
c67719e133 net/ionic: add doorbells
Doorbell registers are used by the driver to signal to the NIC
that requests are waiting on the message queues.

Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
2020-01-20 18:02:17 +01:00
Alfredo Cardigliano
669c8de67c net/ionic: support basic LIF
Initialize LIFs (Logical Interfaces) which represents
external connections. The NIC can multiplex many LIFs
to a single port, but in most setups, LIF0 is the
primary control for the port.
Create a device for each LIF.

Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
2020-01-20 18:02:17 +01:00
Alfredo Cardigliano
23bf4ddb3a net/ionic: add port management commands
Add port management commands that apply to the physical
ports associated with the PCI device, which might be
shared among several logical interfaces.

Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
2020-01-20 18:02:17 +01:00
Alfredo Cardigliano
5ef518098e net/ionic: register and initialize adapter
Register the Pensando ionic PMD (net_ionic) and define initial probe
and remove callbacks with adapter initialization.

Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
2020-01-20 18:02:17 +01:00