Skip to content

Commit b89eced

Browse files
committed
Merge branch 'mlx5-xsk-updates-part4-and-more'
Saeed Mahameed says: ==================== mlx5 xsk updates part4 and more 1) Final part of xsk improvements, in this series Maxim continues to improve xsk implementation a) XSK Busy polling support b) Use KLM to avoid Frame overrun in unaligned mode c) Optimize unaligned more for certain frame sizes d) Other straight forward minor optimizations. part 1: https://lore.kernel.org/netdev/20220927203611.244301-1-saeed@kernel.org/ part 2: https://lore.kernel.org/netdev/20220929072156.93299-1-saeed@kernel.org/ part 3: https://lore.kernel.org/netdev/20220930162903.62262-1-saeed@kernel.org/ 2) Oversize packets firmware counter, from Gal. 3) Set default grace period for health reporters based on function type 4) Some minor E-Switch improvements ==================== Link: https://lore.kernel.org/r/20221002045632.291612-1-saeed@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2 parents a4388da + 794131c commit b89eced

File tree

20 files changed

+466
-159
lines changed

20 files changed

+466
-159
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en.h

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,8 @@ struct page_pool;
109109
#define MLX5_MPWRQ_MAX_PAGES_PER_WQE \
110110
rounddown_pow_of_two(MLX5_UMR_MAX_MTT_SPACE / sizeof(struct mlx5_mtt))
111111

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)
116112
#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. */
118114
#define MLX5E_MAX_RQ_NUM_KSMS (U16_MAX - 1) /* So that num_ksms fits into u16. */
119115
#define MLX5E_ORDER2_MAX_PACKET_MTU (order_base_2(10 * 1024))
120116

@@ -681,6 +677,13 @@ struct mlx5e_hw_gro_data {
681677
int second_ip_id;
682678
};
683679

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+
684687
struct mlx5e_rq {
685688
/* data path */
686689
union {
@@ -708,7 +711,7 @@ struct mlx5e_rq {
708711
u8 pages_per_wqe;
709712
u8 umr_wqebbs;
710713
u8 mtts_per_wqe;
711-
u8 unaligned;
714+
u8 umr_mode;
712715
struct mlx5e_shampo_hd *shampo;
713716
} mpwqe;
714717
};
@@ -1008,7 +1011,7 @@ struct mlx5e_profile {
10081011
void mlx5e_build_ptys2ethtool_map(void);
10091012

10101013
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);
10121015

10131016
void mlx5e_shampo_dealloc_hd(struct mlx5e_rq *rq, u16 len, u16 start, bool close);
10141017
void mlx5e_get_stats(struct net_device *dev, struct rtnl_link_stats64 *stats);
@@ -1036,6 +1039,7 @@ struct mlx5e_rq_param;
10361039
int mlx5e_open_rq(struct mlx5e_params *params, struct mlx5e_rq_param *param,
10371040
struct mlx5e_xsk_param *xsk, int node,
10381041
struct mlx5e_rq *rq);
1042+
#define MLX5E_RQ_WQES_TIMEOUT 20000 /* msecs */
10391043
int mlx5e_wait_for_min_rx_wqes(struct mlx5e_rq *rq, int wait_time);
10401044
void mlx5e_close_rq(struct mlx5e_rq *rq);
10411045
int mlx5e_create_rq(struct mlx5e_rq *rq, struct mlx5e_rq_param *param);

0 commit comments

Comments
 (0)