net/mlx5: reorganize flow API structure
authorSuanming Mou <suanmingm@mellanox.com>
Thu, 16 Apr 2020 08:34:31 +0000 (16:34 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Apr 2020 11:57:09 +0000 (13:57 +0200)
commit0136df99a9bc9f4f7bcf4cf03a1d3759137a4295
tree133891b837ed14ba0b3dde14c4656af70b1a6ff6
parentab612adc1ea7465fbefa4041bc608bc9e8646a8e
net/mlx5: reorganize flow API structure

Currently, the rte flow structure is not fully aligned and has some
bits wasted. The members can be optimized and reorganized to save
memory.

1. The drv_type uses only limited bits, change the type to 2 bits what
it needs.

2. Align the hairpin_flow_id, drv_type, fdir, copy_applied to 32 bits.
As hairpin never uses the full 32 bits.

3. __rte_packed helps tight up the structure memory layout.

The optimization totally helps save 14 bytes for the structure.

Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
drivers/net/mlx5/mlx5.c
drivers/net/mlx5/mlx5_flow.h