aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/pensando/ionic/ionic_dev.h
diff options
context:
space:
mode:
authorShannon Nelson <snelson@pensando.io>2020-05-11 17:59:27 -0700
committerDavid S. Miller <davem@davemloft.net>2020-05-12 12:19:30 -0700
commit5b3f3f2a71ed1cecf6fcf9e8c858a89589415449 (patch)
treeabe26559e104c6e1157f3954540fc70b7ba7da5b /drivers/net/ethernet/pensando/ionic/ionic_dev.h
parentcheckpatch: warn about uses of ENOTSUPP (diff)
downloadlinux-dev-5b3f3f2a71ed1cecf6fcf9e8c858a89589415449.tar.xz
linux-dev-5b3f3f2a71ed1cecf6fcf9e8c858a89589415449.zip
ionic: support longer tx sg lists
The version 1 Tx queues can use longer SG lists than the original version 0 queues, but we need to check to see if the firmware supports the v1 Tx queues. This implements the queue type query for all queue types, and uses the information to set up for using the longer Tx SG lists. Because the Tx SG list can be longer, we need to limit the max ring length to be sure we stay inside the boundaries of a DMA allocation max size, so we lower the max Tx ring size. The driver sets its highest known version in the Q_IDENTITY command, and the FW returns the highest version that it knows, bounded by the driver's version. The negotiated version number is later used in the Q_INIT commands. Signed-off-by: Shannon Nelson <snelson@pensando.io> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/pensando/ionic/ionic_dev.h')
-rw-r--r--drivers/net/ethernet/pensando/ionic/ionic_dev.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_dev.h b/drivers/net/ethernet/pensando/ionic/ionic_dev.h
index 587398b01997..33519a8765eb 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_dev.h
+++ b/drivers/net/ethernet/pensando/ionic/ionic_dev.h
@@ -12,7 +12,8 @@
#define IONIC_MIN_MTU ETH_MIN_MTU
#define IONIC_MAX_MTU 9194
-#define IONIC_MAX_TXRX_DESC 16384
+#define IONIC_MAX_TX_DESC 8192
+#define IONIC_MAX_RX_DESC 16384
#define IONIC_MIN_TXRX_DESC 16
#define IONIC_DEF_TXRX_DESC 4096
#define IONIC_LIFS_MAX 1024
@@ -83,6 +84,8 @@ static_assert(sizeof(struct ionic_q_init_cmd) == 64);
static_assert(sizeof(struct ionic_q_init_comp) == 16);
static_assert(sizeof(struct ionic_q_control_cmd) == 64);
static_assert(sizeof(ionic_q_control_comp) == 16);
+static_assert(sizeof(struct ionic_q_identify_cmd) == 64);
+static_assert(sizeof(struct ionic_q_identify_comp) == 16);
static_assert(sizeof(struct ionic_rx_mode_set_cmd) == 64);
static_assert(sizeof(ionic_rx_mode_set_comp) == 16);
@@ -283,6 +286,8 @@ void ionic_dev_cmd_port_fec(struct ionic_dev *idev, u8 fec_type);
void ionic_dev_cmd_port_pause(struct ionic_dev *idev, u8 pause_type);
int ionic_set_vf_config(struct ionic *ionic, int vf, u8 attr, u8 *data);
+void ionic_dev_cmd_queue_identify(struct ionic_dev *idev,
+ u16 lif_type, u8 qtype, u8 qver);
void ionic_dev_cmd_lif_identify(struct ionic_dev *idev, u8 type, u8 ver);
void ionic_dev_cmd_lif_init(struct ionic_dev *idev, u16 lif_index,
dma_addr_t addr);