Skip to content

Commit adef9a2

Browse files
Shannon NelsonJeff Kirsher
authored andcommitted
ixgbevf: add defines for IPsec offload request
Fix up the register definitions for using IPsec offloads and add the new mailbox message IDs. Signed-off-by: Shannon Nelson <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 7269824 commit adef9a2

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

drivers/net/ethernet/intel/ixgbevf/defines.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,14 @@ typedef u32 ixgbe_link_speed;
133133
#define IXGBE_RXDADV_STAT_FCSTAT_NODDP 0x00000010 /* 01: Ctxt w/o DDP */
134134
#define IXGBE_RXDADV_STAT_FCSTAT_FCPRSP 0x00000020 /* 10: Recv. FCP_RSP */
135135
#define IXGBE_RXDADV_STAT_FCSTAT_DDP 0x00000030 /* 11: Ctxt w/ DDP */
136+
#define IXGBE_RXDADV_STAT_SECP 0x00020000 /* IPsec/MACsec pkt found */
136137

137138
#define IXGBE_RXDADV_RSSTYPE_MASK 0x0000000F
138139
#define IXGBE_RXDADV_PKTTYPE_MASK 0x0000FFF0
140+
#define IXGBE_RXDADV_PKTTYPE_IPV4 0x00000010 /* IPv4 hdr present */
141+
#define IXGBE_RXDADV_PKTTYPE_IPV6 0x00000040 /* IPv6 hdr present */
142+
#define IXGBE_RXDADV_PKTTYPE_IPSEC_ESP 0x00001000 /* IPSec ESP */
143+
#define IXGBE_RXDADV_PKTTYPE_IPSEC_AH 0x00002000 /* IPSec AH */
139144
#define IXGBE_RXDADV_PKTTYPE_MASK_EX 0x0001FFF0
140145
#define IXGBE_RXDADV_HDRBUFLEN_MASK 0x00007FE0
141146
#define IXGBE_RXDADV_RSCCNT_MASK 0x001E0000
@@ -250,9 +255,12 @@ struct ixgbe_adv_tx_context_desc {
250255
#define IXGBE_ADVTXD_TUCMD_L4T_UDP 0x00000000 /* L4 Packet TYPE of UDP */
251256
#define IXGBE_ADVTXD_TUCMD_L4T_TCP 0x00000800 /* L4 Packet TYPE of TCP */
252257
#define IXGBE_ADVTXD_TUCMD_L4T_SCTP 0x00001000 /* L4 Packet TYPE of SCTP */
258+
#define IXGBE_ADVTXD_TUCMD_IPSEC_TYPE_ESP 0x00002000 /* IPSec Type ESP */
259+
#define IXGBE_ADVTXD_TUCMD_IPSEC_ENCRYPT_EN 0x00004000 /* ESP Encrypt Enable */
253260
#define IXGBE_ADVTXD_IDX_SHIFT 4 /* Adv desc Index shift */
254261
#define IXGBE_ADVTXD_CC 0x00000080 /* Check Context */
255262
#define IXGBE_ADVTXD_POPTS_SHIFT 8 /* Adv desc POPTS shift */
263+
#define IXGBE_ADVTXD_POPTS_IPSEC 0x00000400 /* IPSec offload request */
256264
#define IXGBE_ADVTXD_POPTS_IXSM (IXGBE_TXD_POPTS_IXSM << \
257265
IXGBE_ADVTXD_POPTS_SHIFT)
258266
#define IXGBE_ADVTXD_POPTS_TXSM (IXGBE_TXD_POPTS_TXSM << \

drivers/net/ethernet/intel/ixgbevf/mbx.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ enum ixgbe_pfvf_api_rev {
6262
ixgbe_mbox_api_11, /* API version 1.1, linux/freebsd VF driver */
6363
ixgbe_mbox_api_12, /* API version 1.2, linux/freebsd VF driver */
6464
ixgbe_mbox_api_13, /* API version 1.3, linux/freebsd VF driver */
65+
ixgbe_mbox_api_14, /* API version 1.4, linux/freebsd VF driver */
6566
/* This value should always be last */
6667
ixgbe_mbox_api_unknown, /* indicates that API version is not known */
6768
};
@@ -92,6 +93,10 @@ enum ixgbe_pfvf_api_rev {
9293

9394
#define IXGBE_VF_UPDATE_XCAST_MODE 0x0c
9495

96+
/* mailbox API, version 1.4 VF requests */
97+
#define IXGBE_VF_IPSEC_ADD 0x0d
98+
#define IXGBE_VF_IPSEC_DEL 0x0e
99+
95100
/* length of permanent address message returned from PF */
96101
#define IXGBE_VF_PERMADDR_MSG_LEN 4
97102
/* word in permanent address message with the current multicast type */

0 commit comments

Comments
 (0)