net/mlx5: retry on link update failure
[dpdk.git] / drivers / net / enic / base / vnic_devcmd.h
index 0efcee2..d85d40b 100644 (file)
@@ -537,6 +537,7 @@ enum vnic_devcmd_cmd {
         * Control (Enable/Disable) overlay offloads on the given vnic
         * in: (u8) a0 = OVERLAY_FEATURE_NVGRE : NVGRE
         *          a0 = OVERLAY_FEATURE_VXLAN : VxLAN
+        *          a0 = OVERLAY_FEATURE_GENEVE : Geneve
         * in: (u8) a1 = OVERLAY_OFFLOAD_ENABLE : Enable or
         *          a1 = OVERLAY_OFFLOAD_DISABLE : Disable or
         *          a1 = OVERLAY_OFFLOAD_ENABLE_V2 : Enable with version 2
@@ -547,6 +548,7 @@ enum vnic_devcmd_cmd {
        /*
         * Configuration of overlay offloads feature on a given vNIC
         * in: (u8) a0 = OVERLAY_CFG_VXLAN_PORT_UPDATE : VxLAN
+        *               OVERLAY_CFG_GENEVE_PORT_UPDATE : Geneve
         * in: (u16) a1 = unsigned short int port information
         */
        CMD_OVERLAY_OFFLOAD_CFG = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 73),
@@ -600,45 +602,14 @@ enum vnic_devcmd_cmd {
        CMD_ADD_ADV_FILTER = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ENET, 77),
 
        /*
-        * Allocate a counter for use with CMD_ADD_FILTER
-        * out:(u32) a0 = counter index
-        */
-       CMD_COUNTER_ALLOC = _CMDC(_CMD_DIR_READ, _CMD_VTYPE_ENET, 85),
-
-       /*
-        * Free a counter
-        * in: (u32) a0 = counter_id
-        */
-       CMD_COUNTER_FREE = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 86),
-
-       /*
-        * Read a counter
-        * in: (u32) a0 = counter_id
-        *     (u32) a1 = clear counter if non-zero
-        * out:(u64) a0 = packet count
-        *     (u64) a1 = byte count
-        */
-       CMD_COUNTER_QUERY = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ENET, 87),
-
-       /*
-        * Configure periodic counter DMA.  This will trigger an immediate
-        * DMA of the counters (unless period == 0), and then schedule a DMA
-        * of the counters every <period> seconds until disdabled.
-        * Each new COUNTER_DMA_CONFIG will override all previous commands on
-        * this vnic.
-        * Setting a2 (period) = 0 will disable periodic DMAs
-        * If a0 (num_counters) != 0, an immediate DMA will always be done,
-        * irrespective of the value in a2.
-        * in: (u32) a0 = number of counters to DMA
-        *     (u64) a1 = host target DMA address
-        *     (u32) a2 = DMA period in milliseconds (0 to disable)
-        */
-       CMD_COUNTER_DMA_CONFIG = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 88),
-
-       /*
-        * Clear all counters on a vnic
+        * Perform a Flow Manager Operation (see flowman_api.h)
+        * in:  (u32) a0 = sub-command
+        *      (u64) a1..15 = (sub-command specific)
+        *
+        * All arguments that have not been assigned a meaning should be
+        * initialized to 0 to allow for better driver forward compatibility.
         */
-       CMD_COUNTER_CLEAR_ALL = _CMDC(_CMD_DIR_NONE, _CMD_VTYPE_ENET, 89),
+       CMD_FLOW_MANAGER_OP = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ENET, 88),
 };
 
 /* Modes for exchanging advanced filter capabilities. The modes supported by
@@ -904,11 +875,10 @@ struct filter_action {
 #define FILTER_ACTION_RQ_STEERING_FLAG (1 << 0)
 #define FILTER_ACTION_FILTER_ID_FLAG   (1 << 1)
 #define FILTER_ACTION_DROP_FLAG                (1 << 2)
-#define FILTER_ACTION_COUNTER_FLAG      (1 << 3)
+#define FILTER_ACTION_COUNTER_FLAG     (1 << 3)
 #define FILTER_ACTION_V2_ALL           (FILTER_ACTION_RQ_STEERING_FLAG \
-                                        | FILTER_ACTION_FILTER_ID_FLAG \
                                         | FILTER_ACTION_DROP_FLAG \
-                                        | FILTER_ACTION_COUNTER_FLAG)
+                                        | FILTER_ACTION_FILTER_ID_FLAG)
 
 /* Version 2 of filter action must be a strict extension of struct filter_action
  * where the first fields exactly match in size and meaning.
@@ -918,8 +888,7 @@ struct filter_action_v2 {
        u32 rq_idx;
        u32 flags;                     /* use FILTER_ACTION_XXX_FLAG defines */
        u16 filter_id;
-       u32 counter_index;
-       uint8_t reserved[28];         /* for future expansion */
+       uint8_t reserved[32];         /* for future expansion */
 } __attribute__((packed));
 
 /* Specifies the filter type. */
@@ -931,6 +900,7 @@ enum filter_type {
        FILTER_NVGRE_VMQ = 4,
        FILTER_USNIC_IP = 5,
        FILTER_DPDK_1 = 6,
+       FILTER_FLOWMAN = 7,
        FILTER_MAX
 };
 
@@ -1125,6 +1095,7 @@ struct devcmd2_result {
 typedef enum {
        OVERLAY_FEATURE_NVGRE = 1,
        OVERLAY_FEATURE_VXLAN,
+       OVERLAY_FEATURE_GENEVE,
        OVERLAY_FEATURE_MAX,
 } overlay_feature_t;
 
@@ -1133,6 +1104,7 @@ typedef enum {
 #define OVERLAY_OFFLOAD_ENABLE_V2       2
 
 #define OVERLAY_CFG_VXLAN_PORT_UPDATE 0
+#define OVERLAY_CFG_GENEVE_PORT_UPDATE 1
 
 /*
  * Use this enum to get the supported versions for each of these features
@@ -1142,6 +1114,7 @@ typedef enum {
 typedef enum {
        VIC_FEATURE_VXLAN,
        VIC_FEATURE_RDMA,
+       VIC_FEATURE_GENEVE,
        VIC_FEATURE_MAX,
 } vic_feature_t;
 
@@ -1156,6 +1129,8 @@ typedef enum {
 
 #define FEATURE_VXLAN_IPV6             (FEATURE_VXLAN_IPV6_INNER | \
                                         FEATURE_VXLAN_IPV6_OUTER)
+/* Support Geneve option bytes */
+#define FEATURE_GENEVE_OPTIONS         (1 << 0)
 
 /*
  * CMD_CONFIG_GRPINTR subcommands
@@ -1166,13 +1141,4 @@ typedef enum {
        GRPINTR_UPD_VECT,
 } grpintr_subcmd_t;
 
-/*
- * Structure for counter DMA
- * (DMAed by CMD_COUNTER_DMA_CONFIG)
- */
-struct vnic_counter_counts {
-       u64 vcc_packets;
-       u64 vcc_bytes;
-};
-
 #endif /* _VNIC_DEVCMD_H_ */