[dpdk-dev] [PATCH 25/69] net/i40e/base: add opcodes reserved comments

Xiaolong Ye xiaolong.ye at intel.com
Mon Dec 2 08:48:51 CET 2019


When there are opcodes wrapped behind feature flags, we should indicate
that the opcode number is reserved if the define is not set. This helps
ensure that we do not attempt to re-use an opcode number in multiple
ways, as this could break PF and VF matches.

Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
Reviewed-by: Stillwell Jr Paul M <paul.m.stillwell.jr at intel.com>
Reviewed-by: Williams Mitch A <mitch.a.williams at intel.com>
Reviewed-by: Brandeburg Jesse <jesse.brandeburg at intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye at intel.com>
---
 drivers/net/i40e/base/virtchnl.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/i40e/base/virtchnl.h b/drivers/net/i40e/base/virtchnl.h
index 0d7825089..d0d612571 100644
--- a/drivers/net/i40e/base/virtchnl.h
+++ b/drivers/net/i40e/base/virtchnl.h
@@ -107,11 +107,15 @@ enum virtchnl_ops {
 	VIRTCHNL_OP_EVENT = 17, /* must ALWAYS be 17 */
 #ifdef VIRTCHNL_SOL_VF_SUPPORT
 	VIRTCHNL_OP_GET_ADDNL_SOL_CONFIG = 19,
+#else
+	/* opcode 19 is reserved */
 #endif
 #ifdef VIRTCHNL_IWARP
 	VIRTCHNL_OP_IWARP = 20, /* advanced opcode */
 	VIRTCHNL_OP_CONFIG_IWARP_IRQ_MAP = 21, /* advanced opcode */
 	VIRTCHNL_OP_RELEASE_IWARP_IRQ_MAP = 22, /* advanced opcode */
+#else
+	/* opcodes 20, 21, and 22 are reserved */
 #endif
 	VIRTCHNL_OP_CONFIG_RSS_KEY = 23,
 	VIRTCHNL_OP_CONFIG_RSS_LUT = 24,
-- 
2.17.1



More information about the dev mailing list