@@ -916,7 +916,9 @@ enum fc_els_clid_ic {
916916 ELS_CLID_IC_LIP = 8 , /* receiving LIP */
917917};
918918
919-
919+ /*
920+ * Link Integrity event types
921+ */
920922enum fc_fpin_li_event_types {
921923 FPIN_LI_UNKNOWN = 0x0 ,
922924 FPIN_LI_LINK_FAILURE = 0x1 ,
@@ -943,6 +945,54 @@ enum fc_fpin_li_event_types {
943945 { FPIN_LI_DEVICE_SPEC, "Device Specific" }, \
944946}
945947
948+ /*
949+ * Delivery event types
950+ */
951+ enum fc_fpin_deli_event_types {
952+ FPIN_DELI_UNKNOWN = 0x0 ,
953+ FPIN_DELI_TIMEOUT = 0x1 ,
954+ FPIN_DELI_UNABLE_TO_ROUTE = 0x2 ,
955+ FPIN_DELI_DEVICE_SPEC = 0xF ,
956+ };
957+
958+ /*
959+ * Initializer useful for decoding table.
960+ * Please keep this in sync with the above definitions.
961+ */
962+ #define FC_FPIN_DELI_EVT_TYPES_INIT { \
963+ { FPIN_DELI_UNKNOWN, "Unknown" }, \
964+ { FPIN_DELI_TIMEOUT, "Timeout" }, \
965+ { FPIN_DELI_UNABLE_TO_ROUTE, "Unable to Route" }, \
966+ { FPIN_DELI_DEVICE_SPEC, "Device Specific" }, \
967+ }
968+
969+ /*
970+ * Congestion event types
971+ */
972+ enum fc_fpin_congn_event_types {
973+ FPIN_CONGN_CLEAR = 0x0 ,
974+ FPIN_CONGN_LOST_CREDIT = 0x1 ,
975+ FPIN_CONGN_CREDIT_STALL = 0x2 ,
976+ FPIN_CONGN_OVERSUBSCRIPTION = 0x3 ,
977+ FPIN_CONGN_DEVICE_SPEC = 0xF ,
978+ };
979+
980+ /*
981+ * Initializer useful for decoding table.
982+ * Please keep this in sync with the above definitions.
983+ */
984+ #define FC_FPIN_CONGN_EVT_TYPES_INIT { \
985+ { FPIN_CONGN_CLEAR, "Clear" }, \
986+ { FPIN_CONGN_LOST_CREDIT, "Lost Credit" }, \
987+ { FPIN_CONGN_CREDIT_STALL, "Credit Stall" }, \
988+ { FPIN_CONGN_OVERSUBSCRIPTION, "Oversubscription" }, \
989+ { FPIN_CONGN_DEVICE_SPEC, "Device Specific" }, \
990+ }
991+
992+ enum fc_fpin_congn_severity_types {
993+ FPIN_CONGN_SEVERITY_WARNING = 0xF1 ,
994+ FPIN_CONGN_SEVERITY_ERROR = 0xF7 ,
995+ };
946996
947997/*
948998 * Link Integrity Notification Descriptor
@@ -974,6 +1024,68 @@ struct fc_fn_li_desc {
9741024 */
9751025};
9761026
1027+ /*
1028+ * Delivery Notification Descriptor
1029+ */
1030+ struct fc_fn_deli_desc {
1031+ __be32 desc_tag ; /* Descriptor Tag (0x00020002) */
1032+ __be32 desc_len ; /* Length of Descriptor (in bytes).
1033+ * Size of descriptor excluding
1034+ * desc_tag and desc_len fields.
1035+ */
1036+ __be64 detecting_wwpn ; /* Port Name that detected event */
1037+ __be64 attached_wwpn ; /* Port Name of device attached to
1038+ * detecting Port Name
1039+ */
1040+ __be32 deli_reason_code ;/* see enum fc_fpin_deli_event_types */
1041+ };
1042+
1043+ /*
1044+ * Peer Congestion Notification Descriptor
1045+ */
1046+ struct fc_fn_peer_congn_desc {
1047+ __be32 desc_tag ; /* Descriptor Tag (0x00020003) */
1048+ __be32 desc_len ; /* Length of Descriptor (in bytes).
1049+ * Size of descriptor excluding
1050+ * desc_tag and desc_len fields.
1051+ */
1052+ __be64 detecting_wwpn ; /* Port Name that detected event */
1053+ __be64 attached_wwpn ; /* Port Name of device attached to
1054+ * detecting Port Name
1055+ */
1056+ __be16 event_type ; /* see enum fc_fpin_congn_event_types */
1057+ __be16 event_modifier ; /* Implementation specific value
1058+ * describing the event type
1059+ */
1060+ __be32 event_period ; /* duration (ms) of the detected
1061+ * congestion event
1062+ */
1063+ __be32 pname_count ; /* number of portname_list elements */
1064+ __be64 pname_list [0 ]; /* list of N_Port_Names accessible
1065+ * through the attached port
1066+ */
1067+ };
1068+
1069+ /*
1070+ * Congestion Notification Descriptor
1071+ */
1072+ struct fc_fn_congn_desc {
1073+ __be32 desc_tag ; /* Descriptor Tag (0x00020004) */
1074+ __be32 desc_len ; /* Length of Descriptor (in bytes).
1075+ * Size of descriptor excluding
1076+ * desc_tag and desc_len fields.
1077+ */
1078+ __be16 event_type ; /* see enum fc_fpin_congn_event_types */
1079+ __be16 event_modifier ; /* Implementation specific value
1080+ * describing the event type
1081+ */
1082+ __be32 event_period ; /* duration (ms) of the detected
1083+ * congestion event
1084+ */
1085+ __u8 severity ; /* command */
1086+ __u8 resv [3 ]; /* reserved - must be zero */
1087+ };
1088+
9771089/*
9781090 * ELS_FPIN - Fabric Performance Impact Notification
9791091 */
0 commit comments