vlib: Alias RX or TX to direction

Type: improvement

for those that find that name usefull.

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I6c99bcdbb10ca1615aeea6924c2d93a68b5b7684
This commit is contained in:
Neale Ranns
2020-02-24 12:58:20 +00:00
committed by Damjan Marion
parent 6e495ce428
commit 1103c8c04a
+8
View File
@@ -48,8 +48,16 @@ typedef enum
VLIB_N_RX_TX = 2, /* Used to size arrays. */
} vlib_rx_or_tx_t;
#define vlib_foreach_rx_tx(v) for (v = 0; v < VLIB_N_RX_TX; v++)
/* alias the rx/tx to 'direction' */
typedef vlib_rx_or_tx_t vlib_dir_t;
#define VLIB_N_DIR VLIB_N_RX_TX
#define FOREACH_VLIB_DIR(_dir) \
for (_dir = VLIB_RX; _dir <= VLIB_TX; _dir++)
/* Read/write. */
typedef enum
{