summaryrefslogtreecommitdiffstats
path: root/src/plugins/avf/virtchnl.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2019-06-17 20:44:19 +0200
committerFlorin Coras <florin.coras@gmail.com>2019-06-18 02:08:21 +0000
commit217e7c9741596e3ad424f80b3f746faf050c2161 (patch)
tree9aac68e47f8a23cf647fb6b4e4edd241126d13f3 /src/plugins/avf/virtchnl.h
parentdfa47ddf85adc1245647d4108a1a7a15c2b79969 (diff)
avf: add logging macros and improve logging
Type: feature Change-Id: I3d7009505ddbb2c41d8619d9195c6a5373fa9a04 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/avf/virtchnl.h')
-rw-r--r--src/plugins/avf/virtchnl.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/plugins/avf/virtchnl.h b/src/plugins/avf/virtchnl.h
index 493384cb1d7..7561b65b52b 100644
--- a/src/plugins/avf/virtchnl.h
+++ b/src/plugins/avf/virtchnl.h
@@ -179,12 +179,17 @@ typedef struct
virtchnl_vsi_resource_t vsi_res[1];
} virtchnl_vf_resource_t;
+#define foreach_virtchnl_event_code \
+ _(0, UNKNOWN) \
+ _(1, LINK_CHANGE) \
+ _(2, RESET_IMPENDING) \
+ _(3, PF_DRIVER_CLOSE)
+
typedef enum
{
- VIRTCHNL_EVENT_UNKNOWN = 0,
- VIRTCHNL_EVENT_LINK_CHANGE,
- VIRTCHNL_EVENT_RESET_IMPENDING,
- VIRTCHNL_EVENT_PF_DRIVER_CLOSE,
+#define _(a,b) VIRTCHNL_EVENT_##b = (a),
+ foreach_virtchnl_event_code
+#undef _
} virtchnl_event_codes_t;
#define foreach_virtchnl_link_speed \