* [Intel-wired-lan] [PATCH 1/2] virtchnl: Remove unused VIRTCHNL_VF_OFFLOAD_RSVD define
@ 2021-05-07 22:09 Brett Creeley
2021-05-07 22:09 ` [Intel-wired-lan] [PATCH 2/2] virtchnl: Use the BIT() macro for capability/offload flags Brett Creeley
2021-10-29 20:54 ` [Intel-wired-lan] [PATCH 1/2] virtchnl: Remove unused VIRTCHNL_VF_OFFLOAD_RSVD define Brelinski, Tony
0 siblings, 2 replies; 4+ messages in thread
From: Brett Creeley @ 2021-05-07 22:09 UTC (permalink / raw)
To: intel-wired-lan
Remove unused define that is currently marked as reserved. This will
open up space for a new feature if/when it's introduced. Also, there is
no reason to keep unused defines around.
Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Suggested-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
include/linux/avf/virtchnl.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/linux/avf/virtchnl.h b/include/linux/avf/virtchnl.h
index 565deea6ffe8..591e04fa41cc 100644
--- a/include/linux/avf/virtchnl.h
+++ b/include/linux/avf/virtchnl.h
@@ -240,7 +240,6 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource);
*/
#define VIRTCHNL_VF_OFFLOAD_L2 0x00000001
#define VIRTCHNL_VF_OFFLOAD_IWARP 0x00000002
-#define VIRTCHNL_VF_OFFLOAD_RSVD 0x00000004
#define VIRTCHNL_VF_OFFLOAD_RSS_AQ 0x00000008
#define VIRTCHNL_VF_OFFLOAD_RSS_REG 0x00000010
#define VIRTCHNL_VF_OFFLOAD_WB_ON_ITR 0x00000020
--
2.26.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Intel-wired-lan] [PATCH 2/2] virtchnl: Use the BIT() macro for capability/offload flags
2021-05-07 22:09 [Intel-wired-lan] [PATCH 1/2] virtchnl: Remove unused VIRTCHNL_VF_OFFLOAD_RSVD define Brett Creeley
@ 2021-05-07 22:09 ` Brett Creeley
2021-10-29 20:55 ` Brelinski, Tony
2021-10-29 20:54 ` [Intel-wired-lan] [PATCH 1/2] virtchnl: Remove unused VIRTCHNL_VF_OFFLOAD_RSVD define Brelinski, Tony
1 sibling, 1 reply; 4+ messages in thread
From: Brett Creeley @ 2021-05-07 22:09 UTC (permalink / raw)
To: intel-wired-lan
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>
---
include/linux/avf/virtchnl.h | 40 ++++++++++++++++++------------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/include/linux/avf/virtchnl.h b/include/linux/avf/virtchnl.h
index 591e04fa41cc..ec6b3a629b67 100644
--- a/include/linux/avf/virtchnl.h
+++ b/include/linux/avf/virtchnl.h
@@ -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 below the capability flags that are not offloads */
-#define VIRTCHNL_VF_CAP_ADV_LINK_SPEED 0x00000080
+#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 VF_BASE_MODE_OFFLOADS (VIRTCHNL_VF_OFFLOAD_L2 | \
VIRTCHNL_VF_OFFLOAD_VLAN | \
VIRTCHNL_VF_OFFLOAD_RSS_PF)
--
2.26.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Intel-wired-lan] [PATCH 1/2] virtchnl: Remove unused VIRTCHNL_VF_OFFLOAD_RSVD define
2021-05-07 22:09 [Intel-wired-lan] [PATCH 1/2] virtchnl: Remove unused VIRTCHNL_VF_OFFLOAD_RSVD define Brett Creeley
2021-05-07 22:09 ` [Intel-wired-lan] [PATCH 2/2] virtchnl: Use the BIT() macro for capability/offload flags Brett Creeley
@ 2021-10-29 20:54 ` Brelinski, Tony
1 sibling, 0 replies; 4+ messages in thread
From: Brelinski, Tony @ 2021-10-29 20:54 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Creeley, Brett
> Sent: Friday, May 7, 2021 3:09 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH 1/2] virtchnl: Remove unused
> VIRTCHNL_VF_OFFLOAD_RSVD define
>
> Remove unused define that is currently marked as reserved. This will open
> up space for a new feature if/when it's introduced. Also, there is no reason
> to keep unused defines around.
>
> Signed-off-by: Brett Creeley <brett.creeley@intel.com>
> Suggested-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
> include/linux/avf/virtchnl.h | 1 -
> 1 file changed, 1 deletion(-)
Tested-by: Tony Brelinski <tony.brelinski@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Intel-wired-lan] [PATCH 2/2] virtchnl: Use the BIT() macro for capability/offload flags
2021-05-07 22:09 ` [Intel-wired-lan] [PATCH 2/2] virtchnl: Use the BIT() macro for capability/offload flags Brett Creeley
@ 2021-10-29 20:55 ` Brelinski, Tony
0 siblings, 0 replies; 4+ messages in thread
From: Brelinski, Tony @ 2021-10-29 20:55 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Creeley, Brett
> Sent: Friday, May 7, 2021 3:09 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH 2/2] 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>
> ---
> include/linux/avf/virtchnl.h | 40 ++++++++++++++++++------------------
> 1 file changed, 20 insertions(+), 20 deletions(-)
Tested-by: Tony Brelinski <tony.brelinski@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-29 20:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-07 22:09 [Intel-wired-lan] [PATCH 1/2] virtchnl: Remove unused VIRTCHNL_VF_OFFLOAD_RSVD define Brett Creeley
2021-05-07 22:09 ` [Intel-wired-lan] [PATCH 2/2] virtchnl: Use the BIT() macro for capability/offload flags Brett Creeley
2021-10-29 20:55 ` Brelinski, Tony
2021-10-29 20:54 ` [Intel-wired-lan] [PATCH 1/2] virtchnl: Remove unused VIRTCHNL_VF_OFFLOAD_RSVD define Brelinski, Tony
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox