Skip to content

Commit 89de992

Browse files
pmstillwanguy11
authored andcommitted
virtchnl: Add CRC stripping capability
Some VFs may want to disable CRC stripping on incoming packets so create an offload for that. The VF already sends information about configuring its RX queues so use that structure to indicate that the CRC stripping should be enabled or not. Signed-off-by: Paul M Stillwell Jr <[email protected]> Reviewed-by: Jesse Brandeburg <[email protected]> Reviewed-by: Paul Menzel <[email protected]> Signed-off-by: Ahmed Zaki <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent ca5ab96 commit 89de992

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

include/linux/avf/virtchnl.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource);
240240
#define VIRTCHNL_VF_OFFLOAD_REQ_QUEUES BIT(6)
241241
/* used to negotiate communicating link speeds in Mbps */
242242
#define VIRTCHNL_VF_CAP_ADV_LINK_SPEED BIT(7)
243+
#define VIRTCHNL_VF_OFFLOAD_CRC BIT(10)
243244
#define VIRTCHNL_VF_OFFLOAD_VLAN_V2 BIT(15)
244245
#define VIRTCHNL_VF_OFFLOAD_VLAN BIT(16)
245246
#define VIRTCHNL_VF_OFFLOAD_RX_POLLING BIT(17)
@@ -295,7 +296,13 @@ VIRTCHNL_CHECK_STRUCT_LEN(24, virtchnl_txq_info);
295296
/* VIRTCHNL_OP_CONFIG_RX_QUEUE
296297
* VF sends this message to set up parameters for one RX queue.
297298
* External data buffer contains one instance of virtchnl_rxq_info.
298-
* PF configures requested queue and returns a status code.
299+
* PF configures requested queue and returns a status code. The
300+
* crc_disable flag disables CRC stripping on the VF. Setting
301+
* the crc_disable flag to 1 will disable CRC stripping for each
302+
* queue in the VF where the flag is set. The VIRTCHNL_VF_OFFLOAD_CRC
303+
* offload must have been set prior to sending this info or the PF
304+
* will ignore the request. This flag should be set the same for
305+
* all of the queues for a VF.
299306
*/
300307

301308
/* Rx queue config info */
@@ -307,7 +314,7 @@ struct virtchnl_rxq_info {
307314
u16 splithdr_enabled; /* deprecated with AVF 1.0 */
308315
u32 databuffer_size;
309316
u32 max_pkt_size;
310-
u8 pad0;
317+
u8 crc_disable;
311318
u8 rxdid;
312319
u8 pad1[2];
313320
u64 dma_ring_addr;

0 commit comments

Comments
 (0)