mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-15 00:34:10 +08:00
virtchnl: Use the BIT() macro for capability/offload flags
Currently raw hex values are used to define specific bits for each capability/offload in virtchnl.h. Using raw hex values makes it unclear which bits are used/available. Fix this by using the BIT() macro so it's immediately obvious which bits are used/available. Also, move the VIRTCHNL_VF_CAP_ADV_LINK_SPEED define in the correct place to line up with the other bit values and add a comment for its purpose. Signed-off-by: Brett Creeley <brett.creeley@intel.com> Tested-by: Tony Brelinski <tony.brelinski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
This commit is contained in:
parent
5bf84b2993
commit
4a15022f82
@ -238,26 +238,26 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource);
|
||||
* VIRTCHNL_VF_OFFLOAD_L2 flag is inclusive of base mode L2 offloads including
|
||||
* TX/RX Checksum offloading and TSO for non-tunnelled packets.
|
||||
*/
|
||||
#define VIRTCHNL_VF_OFFLOAD_L2 0x00000001
|
||||
#define VIRTCHNL_VF_OFFLOAD_IWARP 0x00000002
|
||||
#define VIRTCHNL_VF_OFFLOAD_RSS_AQ 0x00000008
|
||||
#define VIRTCHNL_VF_OFFLOAD_RSS_REG 0x00000010
|
||||
#define VIRTCHNL_VF_OFFLOAD_WB_ON_ITR 0x00000020
|
||||
#define VIRTCHNL_VF_OFFLOAD_REQ_QUEUES 0x00000040
|
||||
#define VIRTCHNL_VF_OFFLOAD_VLAN 0x00010000
|
||||
#define VIRTCHNL_VF_OFFLOAD_RX_POLLING 0x00020000
|
||||
#define VIRTCHNL_VF_OFFLOAD_RSS_PCTYPE_V2 0x00040000
|
||||
#define VIRTCHNL_VF_OFFLOAD_RSS_PF 0X00080000
|
||||
#define VIRTCHNL_VF_OFFLOAD_ENCAP 0X00100000
|
||||
#define VIRTCHNL_VF_OFFLOAD_ENCAP_CSUM 0X00200000
|
||||
#define VIRTCHNL_VF_OFFLOAD_RX_ENCAP_CSUM 0X00400000
|
||||
#define VIRTCHNL_VF_OFFLOAD_ADQ 0X00800000
|
||||
#define VIRTCHNL_VF_OFFLOAD_USO 0X02000000
|
||||
#define VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF 0X08000000
|
||||
#define VIRTCHNL_VF_OFFLOAD_FDIR_PF 0X10000000
|
||||
#define VIRTCHNL_VF_OFFLOAD_L2 BIT(0)
|
||||
#define VIRTCHNL_VF_OFFLOAD_IWARP BIT(1)
|
||||
#define VIRTCHNL_VF_OFFLOAD_RSS_AQ BIT(3)
|
||||
#define VIRTCHNL_VF_OFFLOAD_RSS_REG BIT(4)
|
||||
#define VIRTCHNL_VF_OFFLOAD_WB_ON_ITR BIT(5)
|
||||
#define VIRTCHNL_VF_OFFLOAD_REQ_QUEUES BIT(6)
|
||||
/* used to negotiate communicating link speeds in Mbps */
|
||||
#define VIRTCHNL_VF_CAP_ADV_LINK_SPEED BIT(7)
|
||||
#define VIRTCHNL_VF_OFFLOAD_VLAN BIT(16)
|
||||
#define VIRTCHNL_VF_OFFLOAD_RX_POLLING BIT(17)
|
||||
#define VIRTCHNL_VF_OFFLOAD_RSS_PCTYPE_V2 BIT(18)
|
||||
#define VIRTCHNL_VF_OFFLOAD_RSS_PF BIT(19)
|
||||
#define VIRTCHNL_VF_OFFLOAD_ENCAP BIT(20)
|
||||
#define VIRTCHNL_VF_OFFLOAD_ENCAP_CSUM BIT(21)
|
||||
#define VIRTCHNL_VF_OFFLOAD_RX_ENCAP_CSUM BIT(22)
|
||||
#define VIRTCHNL_VF_OFFLOAD_ADQ BIT(23)
|
||||
#define VIRTCHNL_VF_OFFLOAD_USO BIT(25)
|
||||
#define VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF BIT(27)
|
||||
#define VIRTCHNL_VF_OFFLOAD_FDIR_PF BIT(28)
|
||||
|
||||
/* Define below the capability flags that are not offloads */
|
||||
#define VIRTCHNL_VF_CAP_ADV_LINK_SPEED 0x00000080
|
||||
#define VF_BASE_MODE_OFFLOADS (VIRTCHNL_VF_OFFLOAD_L2 | \
|
||||
VIRTCHNL_VF_OFFLOAD_VLAN | \
|
||||
VIRTCHNL_VF_OFFLOAD_RSS_PF)
|
||||
|
Loading…
Reference in New Issue
Block a user