summaryrefslogtreecommitdiffstats
path: root/sys/dev/cxgbe/adapter.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/cxgbe/adapter.h')
-rw-r--r--sys/dev/cxgbe/adapter.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h
index 1dacc60..2e74f8f 100644
--- a/sys/dev/cxgbe/adapter.h
+++ b/sys/dev/cxgbe/adapter.h
@@ -225,6 +225,7 @@ struct vi_info {
int if_flags;
uint16_t *rss, *nm_rss;
+ int smt_idx; /* for convenience */
uint16_t viid;
int16_t xact_addr_filt;/* index of exact MAC address filter */
uint16_t rss_size; /* size of VI's RSS table slice */
@@ -745,10 +746,20 @@ struct sge {
struct hw_buf_info hw_buf_info[SGE_FLBUF_SIZES];
};
+struct devnames {
+ const char *nexus_name;
+ const char *ifnet_name;
+ const char *vi_ifnet_name;
+ const char *pf03_drv_name;
+ const char *vf_nexus_name;
+ const char *vf_ifnet_name;
+};
+
struct adapter {
SLIST_ENTRY(adapter) link;
device_t dev;
struct cdev *cdev;
+ const struct devnames *names;
/* PCIe register resources */
int regs_rid;
@@ -828,7 +839,7 @@ struct adapter {
uint16_t niccaps;
uint16_t toecaps;
uint16_t rdmacaps;
- uint16_t tlscaps;
+ uint16_t cryptocaps;
uint16_t iscsicaps;
uint16_t fcoecaps;
@@ -1033,12 +1044,26 @@ is_10G_port(const struct port_info *pi)
}
static inline bool
+is_25G_port(const struct port_info *pi)
+{
+
+ return ((pi->link_cfg.supported & FW_PORT_CAP_SPEED_25G) != 0);
+}
+
+static inline bool
is_40G_port(const struct port_info *pi)
{
return ((pi->link_cfg.supported & FW_PORT_CAP_SPEED_40G) != 0);
}
+static inline bool
+is_100G_port(const struct port_info *pi)
+{
+
+ return ((pi->link_cfg.supported & FW_PORT_CAP_SPEED_100G) != 0);
+}
+
static inline int
port_top_speed(const struct port_info *pi)
{
@@ -1047,6 +1072,8 @@ port_top_speed(const struct port_info *pi)
return (100);
if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_40G)
return (40);
+ if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_25G)
+ return (25);
if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_10G)
return (10);
if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_1G)
@@ -1094,6 +1121,7 @@ int t4_os_pci_restore_state(struct adapter *);
void t4_os_portmod_changed(const struct adapter *, int);
void t4_os_link_changed(struct adapter *, int, int, int);
void t4_iterate(void (*)(struct adapter *, void *), void *);
+void t4_init_devnames(struct adapter *);
void t4_add_adapter(struct adapter *);
int t4_detach_common(device_t);
int t4_filter_rpl(struct sge_iq *, const struct rss_header *, struct mbuf *);
OpenPOWER on IntegriCloud