From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id F0296A0599; Fri, 10 Apr 2020 02:26:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CA8F21D176; Fri, 10 Apr 2020 02:25:58 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id D3F121D16A for ; Fri, 10 Apr 2020 02:25:56 +0200 (CEST) IronPort-SDR: QN2JAGOiog4mWzGs8Fmzt5mWu7gw1a1FfQ8Omn5AOEfrSuXgOSYlzzDskabGSY/KrOxFa/OtN7 FI48y41vcfHQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2020 17:25:56 -0700 IronPort-SDR: enTuA+LSDrsvboAxQeqTxWttNed4fFAd3XY2JT7oG03+9dkB4w50r1i+tk9CEk4KTLGCH8ZlG2 niQIoqFQrJRg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,364,1580803200"; d="scan'208";a="398769177" Received: from dpdk51.sh.intel.com ([10.67.110.245]) by orsmga004.jf.intel.com with ESMTP; 09 Apr 2020 17:25:54 -0700 From: Qi Zhang To: beilei.xing@intel.com Cc: jingjing.wu@intel.com, xiaolong.ye@intel.com, dev@dpdk.org, Qi Zhang , Leyi Rong , Paul M Stillwell Jr Date: Fri, 10 Apr 2020 08:29:36 +0800 Message-Id: <20200410002940.16626-2-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20200410002940.16626-1-qi.z.zhang@intel.com> References: <20200410002940.16626-1-qi.z.zhang@intel.com> Subject: [dpdk-dev] [PATCH 2/6] common/iavf: add DDP package query in virtual channel X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add VIRTCHNL_OP_DCF_GET_PKG_INFO to query DDP package identification. Signed-off-by: Leyi Rong Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/common/iavf/virtchnl.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h index 127f15742..5c3088dbc 100644 --- a/drivers/common/iavf/virtchnl.h +++ b/drivers/common/iavf/virtchnl.h @@ -133,6 +133,7 @@ enum virtchnl_ops { VIRTCHNL_OP_DCF_CMD_BUFF = 40, VIRTCHNL_OP_DCF_DISABLE = 41, VIRTCHNL_OP_DCF_GET_VSI_MAP = 42, + VIRTCHNL_OP_DCF_GET_PKG_INFO = 43, }; /* These macros are used to generate compilation errors if a structure/union @@ -644,6 +645,27 @@ struct virtchnl_dcf_vsi_map { VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_dcf_vsi_map); +#define PKG_NAME_SIZE 32 +#define DSN_SIZE 8 + +struct pkg_version { + u8 major; + u8 minor; + u8 update; + u8 draft; +}; + +VIRTCHNL_CHECK_STRUCT_LEN(4, pkg_version); + +struct virtchnl_pkg_info { + struct pkg_version pkg_ver; + u32 track_id; + char pkg_name[PKG_NAME_SIZE]; + u8 dsn[DSN_SIZE]; +}; + +VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_pkg_info); + /* VIRTCHNL_OP_EVENT * PF sends this message to inform the VF driver of events that may affect it. * No direct response is expected from the VF, though it may generate other @@ -920,6 +942,8 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode, * so the valid length keeps the default value 0. */ break; + case VIRTCHNL_OP_DCF_GET_PKG_INFO: + break; /* These are always errors coming from the VF. */ case VIRTCHNL_OP_EVENT: case VIRTCHNL_OP_UNKNOWN: -- 2.13.6