summaryrefslogtreecommitdiff
path: root/drivers/s390/net/qeth_core_mpc.h
diff options
context:
space:
mode:
authorHans Wippel <hwippel@linux.vnet.ibm.com>2017-09-18 21:18:14 +0200
committerDavid S. Miller <davem@davemloft.net>2017-09-18 14:41:37 -0700
commita45b3faf16f0cbc4ec48f9ec81e550d430199212 (patch)
treeb24b3a63f3292287fecbf0c8d3c4013d33ae2fe4 /drivers/s390/net/qeth_core_mpc.h
parentf231c4178a655b09c1fe4dce4b09de7b867c20af (diff)
downloadlinux-a45b3faf16f0cbc4ec48f9ec81e550d430199212.tar.gz
linux-a45b3faf16f0cbc4ec48f9ec81e550d430199212.tar.xz
s390/qeth: add basic VNICC support
VNIC Characteristics (VNICC) are features of HiperSockets that define how packets are handled by the underlying network hardware. For example, if the VNICC flooding is configured on a qeth device, ethernet frames to unknown destination MAC addresses are received. Currently, there is support for seven VNICCs: flooding, multicast flooding, receive broadcast, learning, takeover learning, takeover setvmac, bridge invisible. Also, six IPA commands exist for configuring VNICCs on a qeth device: query characteristics, query commands, enable characteristic, disable characteristic, set timeout, get timeout. This patch adds the basic code infrastructure for VNICC support to qeth. It allows querying VNICC support from the underlying hardware. To this end, it adds: * basic message formats for IPA commands * basic data structures * basic error handling * query characteristics IPA command support The query characteristics IPA command allows requesting the currently supported and currently enabled VNIC characteristics from the underlying hardware. Support for the other IPA commands and for the configuration of VNICCs is added in follow-up patches together with the respective user interface functions. Signed-off-by: Hans Wippel <hwippel@linux.vnet.ibm.com> Reviewed-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/qeth_core_mpc.h')
-rw-r--r--drivers/s390/net/qeth_core_mpc.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/s390/net/qeth_core_mpc.h b/drivers/s390/net/qeth_core_mpc.h
index 912e0107de8f..c13816b8c92f 100644
--- a/drivers/s390/net/qeth_core_mpc.h
+++ b/drivers/s390/net/qeth_core_mpc.h
@@ -90,6 +90,7 @@ enum qeth_ipa_cmds {
IPA_CMD_DELGMAC = 0x24,
IPA_CMD_SETVLAN = 0x25,
IPA_CMD_DELVLAN = 0x26,
+ IPA_CMD_VNICC = 0x2a,
IPA_CMD_SETBRIDGEPORT_OSA = 0x2b,
IPA_CMD_SETCCID = 0x41,
IPA_CMD_DELCCID = 0x42,
@@ -165,6 +166,7 @@ enum qeth_ipa_return_codes {
IPA_RC_L2_INVALID_VLAN_ID = 0x2015,
IPA_RC_L2_DUP_VLAN_ID = 0x2016,
IPA_RC_L2_VLAN_ID_NOT_FOUND = 0x2017,
+ IPA_RC_VNICC_VNICBP = 0x20B0,
IPA_RC_SBP_OSA_NOT_CONFIGURED = 0x2B0C,
IPA_RC_SBP_OSA_OS_MISMATCH = 0x2B10,
IPA_RC_SBP_OSA_ANO_DEV_PRIMARY = 0x2B14,
@@ -197,6 +199,9 @@ enum qeth_ipa_return_codes {
IPA_RC_ENOMEM = 0xfffe,
IPA_RC_FFFF = 0xffff
};
+/* for VNIC Characteristics */
+#define IPA_RC_VNICC_OOSEQ 0x0005
+
/* for SET_DIAGNOSTIC_ASSIST */
#define IPA_RC_INVALID_SUBCMD IPA_RC_IP_TABLE_FULL
#define IPA_RC_HARDWARE_AUTH_ERROR IPA_RC_UNKNOWN_ERROR
@@ -551,6 +556,29 @@ struct qeth_ipacmd_diagass {
__u8 cdata[64];
} __attribute__ ((packed));
+/* VNIC Characteristics IPA Command: *****************************************/
+/* IPA commands/sub commands for VNICC */
+#define IPA_VNICC_QUERY_CHARS 0x00000000L
+
+/* VNICC header */
+struct qeth_ipacmd_vnicc_hdr {
+ u32 sup;
+ u32 cur;
+};
+
+/* VNICC sub command header */
+struct qeth_vnicc_sub_hdr {
+ u16 data_length;
+ u16 reserved;
+ u32 sub_command;
+};
+
+/* complete VNICC IPA command message */
+struct qeth_ipacmd_vnicc {
+ struct qeth_ipacmd_vnicc_hdr hdr;
+ struct qeth_vnicc_sub_hdr sub_hdr;
+};
+
/* SETBRIDGEPORT IPA Command: *********************************************/
enum qeth_ipa_sbp_cmd {
IPA_SBP_QUERY_COMMANDS_SUPPORTED = 0x00000000L,
@@ -692,6 +720,7 @@ struct qeth_ipa_cmd {
struct qeth_ipacmd_diagass diagass;
struct qeth_ipacmd_setbridgeport sbp;
struct qeth_ipacmd_addr_change addrchange;
+ struct qeth_ipacmd_vnicc vnicc;
} data;
} __attribute__ ((packed));