@@ -109,12 +109,8 @@ struct page_pool;
109
109
#define MLX5_MPWRQ_MAX_PAGES_PER_WQE \
110
110
rounddown_pow_of_two(MLX5_UMR_MAX_MTT_SPACE / sizeof(struct mlx5_mtt))
111
111
112
- #define MLX5_ALIGN_MTTS (mtts ) (ALIGN(mtts, 8))
113
- #define MLX5_ALIGNED_MTTS_OCTW (mtts ) ((mtts) / 2)
114
- #define MLX5_MTT_OCTW (mtts ) (MLX5_ALIGNED_MTTS_OCTW(MLX5_ALIGN_MTTS(mtts)))
115
- #define MLX5_KSM_OCTW (ksms ) (ksms)
116
112
#define MLX5E_MAX_RQ_NUM_MTTS \
117
- (ALIGN_DOWN(U16_MAX, 4) * 2) /* So that MLX5_MTT_OCTW(num_mtts) fits into u16 */
113
+ (ALIGN_DOWN(U16_MAX, 4) * 2) /* Fits into u16 and aligned by WQEBB. */
118
114
#define MLX5E_MAX_RQ_NUM_KSMS (U16_MAX - 1) /* So that num_ksms fits into u16. */
119
115
#define MLX5E_ORDER2_MAX_PACKET_MTU (order_base_2(10 * 1024))
120
116
@@ -681,6 +677,13 @@ struct mlx5e_hw_gro_data {
681
677
int second_ip_id ;
682
678
};
683
679
680
+ enum mlx5e_mpwrq_umr_mode {
681
+ MLX5E_MPWRQ_UMR_MODE_ALIGNED ,
682
+ MLX5E_MPWRQ_UMR_MODE_UNALIGNED ,
683
+ MLX5E_MPWRQ_UMR_MODE_OVERSIZED ,
684
+ MLX5E_MPWRQ_UMR_MODE_TRIPLE ,
685
+ };
686
+
684
687
struct mlx5e_rq {
685
688
/* data path */
686
689
union {
@@ -708,7 +711,7 @@ struct mlx5e_rq {
708
711
u8 pages_per_wqe ;
709
712
u8 umr_wqebbs ;
710
713
u8 mtts_per_wqe ;
711
- u8 unaligned ;
714
+ u8 umr_mode ;
712
715
struct mlx5e_shampo_hd * shampo ;
713
716
} mpwqe ;
714
717
};
@@ -1008,7 +1011,7 @@ struct mlx5e_profile {
1008
1011
void mlx5e_build_ptys2ethtool_map (void );
1009
1012
1010
1013
bool mlx5e_check_fragmented_striding_rq_cap (struct mlx5_core_dev * mdev , u8 page_shift ,
1011
- bool unaligned );
1014
+ enum mlx5e_mpwrq_umr_mode umr_mode );
1012
1015
1013
1016
void mlx5e_shampo_dealloc_hd (struct mlx5e_rq * rq , u16 len , u16 start , bool close );
1014
1017
void mlx5e_get_stats (struct net_device * dev , struct rtnl_link_stats64 * stats );
@@ -1036,6 +1039,7 @@ struct mlx5e_rq_param;
1036
1039
int mlx5e_open_rq (struct mlx5e_params * params , struct mlx5e_rq_param * param ,
1037
1040
struct mlx5e_xsk_param * xsk , int node ,
1038
1041
struct mlx5e_rq * rq );
1042
+ #define MLX5E_RQ_WQES_TIMEOUT 20000 /* msecs */
1039
1043
int mlx5e_wait_for_min_rx_wqes (struct mlx5e_rq * rq , int wait_time );
1040
1044
void mlx5e_close_rq (struct mlx5e_rq * rq );
1041
1045
int mlx5e_create_rq (struct mlx5e_rq * rq , struct mlx5e_rq_param * param );
0 commit comments