/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */ /* * Copyright (c) 2020, Mellanox Technologies inc. All rights reserved.
*/
#ifndef _MLX5_IB_WR_H #define _MLX5_IB_WR_H
#include"mlx5_ib.h"
enum {
MLX5_IB_SQ_UMR_INLINE_THRESHOLD = 64,
};
struct mlx5_wqe_eth_pad {
u8 rsvd0[16];
};
/* get_sq_edge - Get the next nearby edge. * * An 'edge' is defined as the first following address after the end * of the fragment or the SQ. Accordingly, during the WQE construction * which repetitively increases the pointer to write the next data, it * simply should check if it gets to an edge. * * @sq - SQ buffer. * @idx - Stride index in the SQ buffer. * * Return: * The new edge.
*/ staticinlinevoid *get_sq_edge(struct mlx5_ib_wq *sq, u32 idx)
{ void *fragment_end;
/* handle_post_send_edge - Check if we get to SQ edge. If yes, update to the * next nearby edge and get new address translation for current WQE position. * @sq: SQ buffer. * @seg: Current WQE position (16B aligned). * @wqe_sz: Total current WQE size [16B]. * @cur_edge: Updated current edge.
*/ staticinlinevoid handle_post_send_edge(struct mlx5_ib_wq *sq, void **seg,
u32 wqe_sz, void **cur_edge)
{
u32 idx;
/* mlx5r_memcpy_send_wqe - copy data from src to WQE and update the relevant * WQ's pointers. At the end @seg is aligned to 16B regardless the copied size. * @sq: SQ buffer. * @cur_edge: Updated current edge. * @seg: Current WQE position (16B aligned). * @wqe_sz: Total current WQE size [16B]. * @src: Pointer to copy from. * @n: Number of bytes to copy.
*/ staticinlinevoid mlx5r_memcpy_send_wqe(struct mlx5_ib_wq *sq, void **cur_edge, void **seg, u32 *wqe_sz, constvoid *src, size_t n)
{ while (likely(n)) {
size_t leftlen = *cur_edge - *seg;
size_t copysz = min_t(size_t, leftlen, n);
size_t stride;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.