diff options
author | Mohammed Hawari <mohammed@hawari.fr> | 2020-11-10 10:26:45 +0100 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2020-12-01 08:00:27 +0000 |
commit | bb7991a037a23eb966aee2d6f8069353c6a64c94 (patch) | |
tree | 4bf032fc1cb66240dcc2b393e02b5675e8bcee4b /src/plugins/avf/avf.h | |
parent | 8f5c6107c98b0b0c9a5110858dc403b706e05de2 (diff) |
avf: add TSO support
Change-Id: Ica663e1d07225acf53fd74b0051a5a2a34174960
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: improvement
Diffstat (limited to 'src/plugins/avf/avf.h')
-rw-r--r-- | src/plugins/avf/avf.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/plugins/avf/avf.h b/src/plugins/avf/avf.h index 66a791ec9b2..025fa6ea4e9 100644 --- a/src/plugins/avf/avf.h +++ b/src/plugins/avf/avf.h @@ -20,7 +20,14 @@ #include <avf/virtchnl.h> +#include <vppinfra/types.h> +#include <vppinfra/error_bootstrap.h> +#include <vppinfra/lock.h> + #include <vlib/log.h> +#include <vlib/pci/pci.h> + +#include <vnet/interface.h> #define AVF_QUEUE_SZ_MAX 4096 #define AVF_QUEUE_SZ_MIN 64 @@ -66,6 +73,13 @@ #define AVF_TXD_OFFSET_IPLEN(val) AVF_TXD_OFFSET( 7, 4, val) #define AVF_TXD_OFFSET_L4LEN(val) AVF_TXD_OFFSET(14, 4, val) +#define AVF_TXD_DTYP_CTX 0x1ULL +#define AVF_TXD_CTX_CMD_TSO AVF_TXD_CMD(0) +#define AVF_TXD_CTX_SEG(val,x) (((u64)val) << (30 + x)) +#define AVF_TXD_CTX_SEG_TLEN(val) AVF_TXD_CTX_SEG(val,0) +#define AVF_TXD_CTX_SEG_MSS(val) AVF_TXD_CTX_SEG(val,20) + + extern vlib_log_class_registration_t avf_log; #define avf_log_err(dev, f, ...) \ @@ -158,6 +172,7 @@ typedef struct volatile u32 *qtx_tail; u16 next; u16 size; + u32 ctx_desc_placeholder_bi; clib_spinlock_t lock; avf_tx_desc_t *descs; u32 *bufs; |