summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlx5/core/en.h
diff options
context:
space:
mode:
authorTariq Toukan <tariqt@mellanox.com>2017-02-13 18:41:30 +0200
committerSaeed Mahameed <saeedm@mellanox.com>2017-09-03 06:34:08 +0300
commitb45d8b50b8264cac7b2f1245ca04a2f009038ac7 (patch)
tree57376abbdb4128713f9a137bf5927157d1cc575b /drivers/net/ethernet/mellanox/mlx5/core/en.h
parent32d9b70a053a835b4dfb33158fc03795ea103e44 (diff)
net/mlx5e: Reorganize struct mlx5e_rq
Bring fast-path fields together, and combine RX WQE mutual exclusive fields into a union. Page-reuse and XDP are mutually exclusive and cannot be used at the same time. Use a union to combine their footprints. Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h
index 6c2abeccfa5a..d964db286c95 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h
@@ -527,20 +527,24 @@ struct mlx5e_rq {
struct {
struct mlx5e_wqe_frag_info *frag_info;
u32 frag_sz; /* max possible skb frag_sz */
- bool page_reuse;
- bool xdp_xmit;
+ union {
+ bool page_reuse;
+ bool xdp_xmit;
+ };
} wqe;
struct {
struct mlx5e_mpw_info *info;
void *mtt_no_align;
+ u16 stride_sz;
+ u16 num_strides;
} mpwqe;
};
struct {
- u8 page_order;
u32 wqe_sz; /* wqe data buffer size */
+ u16 headroom;
+ u8 page_order;
u8 map_dir; /* dma map direction */
} buff;
- __be32 mkey_be;
struct device *pdev;
struct net_device *netdev;
@@ -555,7 +559,6 @@ struct mlx5e_rq {
unsigned long state;
int ix;
- u16 rx_headroom;
struct mlx5e_rx_am am; /* Adaptive Moderation */
@@ -565,9 +568,8 @@ struct mlx5e_rq {
/* control */
struct mlx5_wq_ctrl wq_ctrl;
+ __be32 mkey_be;
u8 wq_type;
- u32 mpwqe_stride_sz;
- u32 mpwqe_num_strides;
u32 rqn;
struct mlx5e_channel *channel;
struct mlx5_core_dev *mdev;