diff options
| author | David S. Miller <davem@davemloft.net> | 2016-05-11 19:42:39 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2016-05-11 19:42:39 -0400 |
| commit | 6a47a570321fdcd2b6fc9e6537b2a3650d0fd04b (patch) | |
| tree | 2edb95f99b366a5cda5dbacacae0fc5a703cf203 /include/linux | |
| parent | c1869d584a9d1e51544d747524662d5d2b8bf63f (diff) | |
| parent | b797a684b0ddeb6f78193c9b1bfae6bd824ec01a (diff) | |
Merge branch 'mlx5-next'
Saeed Mahameed says:
====================
Mellanox 100G mlx5 CQE compression
Introducing ConnectX-4 CQE (Completion Queue Entry) compression feature
for mlx5 etherent driver.
CQE Compressing reduces PCI overhead by coalescing and compressing multiple CQEs into a
single merged CQE. Successful compressing improves message rate especially for small packet
traffic.
CQE Compressing in details:
Instead of writing full CQEs to memory, multiple almost identical CQEs are merged and compressed.
Information that is shared between the CQEs is written once, regardless of the number of
compressed CQEs. In addition, only the unique information (small amount of bytes compared to
full CQE size) is written per CQE.
CQE Compression Block:
This block contains multiple compressed CQEs. CQE Compression Block contains a single copy
of CQEs properties which are shared between all the compressed CQEs (called Title, see below)
and multiple mini CQEs (CQEs in compressed form).
Title:
The Title holds information which is shared between all the compressed CQEs in the CQE Compression
Block. In each Compression Block there is only a single Title regardless of the number
of compressed CQEs.
Mini CQE:
A CQE in compressed form that holds some data needed to extract a single full CQE, for example
8 Bytes instead of 64 Bytes.
The shared information between all compressed CQEs, which belong to the same CQE Compression
Block called Title, is written once, and only the unique information in each compressed
CQE, for example 8 bytes, is written per compressed CQE, called mini CQE.
Since CQE Compression can add overhead to the software (CPU),
it will be only enabled on "weak/slow" PCI slots, where it can actually help.
Applied on top: c047c3b1af62 ('netfilter: conntrack: remove uninitialized shadow variable')
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mlx5/device.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/include/linux/mlx5/device.h b/include/linux/mlx5/device.h index ee0d5a937f02..035abdf62cfe 100644 --- a/include/linux/mlx5/device.h +++ b/include/linux/mlx5/device.h @@ -685,6 +685,40 @@ struct mlx5_cqe64 { u8 op_own; }; +struct mlx5_mini_cqe8 { + union { + __be32 rx_hash_result; + struct { + __be16 checksum; + __be16 rsvd; + }; + struct { + __be16 wqe_counter; + u8 s_wqe_opcode; + u8 reserved; + } s_wqe_info; + }; + __be32 byte_cnt; +}; + +enum { + MLX5_NO_INLINE_DATA, + MLX5_INLINE_DATA32_SEG, + MLX5_INLINE_DATA64_SEG, + MLX5_COMPRESSED, +}; + +enum { + MLX5_CQE_FORMAT_CSUM = 0x1, +}; + +#define MLX5_MINI_CQE_ARRAY_SIZE 8 + +static inline int mlx5_get_cqe_format(struct mlx5_cqe64 *cqe) +{ + return (cqe->op_own >> 2) & 0x3; +} + static inline int get_cqe_lro_tcppsh(struct mlx5_cqe64 *cqe) { return (cqe->lro_tcppsh_abort_dupack >> 6) & 1; |
