iavf share code update
cover iavf share code update
Main change:
update virtual channel to support DCF
Qi Zhang (4):
common/iavf: update copyright date common/iavf: add two opcodes to send the AdminQ command common/iavf: add support for DCF capability negotiation common/iavf: add support for VSI mapping table
drivers/common/iavf/iavf_adminq.c | 2 +- drivers/common/iavf/iavf_adminq.h | 2 +- drivers/common/iavf/iavf_adminq_cmd.h | 2 +- drivers/common/iavf/iavf_alloc.h | 2 +- drivers/common/iavf/iavf_common.c | 2 +- drivers/common/iavf/iavf_devids.h | 2 +- drivers/common/iavf/iavf_prototype.h | 2 +- drivers/common/iavf/iavf_register.h | 2 +- drivers/common/iavf/iavf_status.h | 2 +- drivers/common/iavf/iavf_type.h | 2 +- drivers/common/iavf/virtchnl.h | 43 ++++++++++++++++++++++++++++++++++- 11 files changed, 52 insertions(+), 11 deletions(-)
Signature · 1 line
2.13.6
PATCH 1/4 common/iavf: update copyright date
Update copyright date to 2020.
--- drivers/common/iavf/iavf_adminq.c | 2 +- drivers/common/iavf/iavf_adminq.h | 2 +- drivers/common/iavf/iavf_adminq_cmd.h | 2 +- drivers/common/iavf/iavf_alloc.h | 2 +- drivers/common/iavf/iavf_common.c | 2 +- drivers/common/iavf/iavf_devids.h | 2 +- drivers/common/iavf/iavf_prototype.h | 2 +- drivers/common/iavf/iavf_register.h | 2 +- drivers/common/iavf/iavf_status.h | 2 +- drivers/common/iavf/iavf_type.h | 2 +- drivers/common/iavf/virtchnl.h | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-)
drivers/common/iavf/iavf_adminq.c +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2001-2019 +* Copyright(c) 2001-2020 */ #include "iavf_status.h"
drivers/common/iavf/iavf_adminq.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2001-2019 +* Copyright(c) 2001-2020 */ #ifndef _IAVF_ADMINQ_H_
drivers/common/iavf/iavf_adminq_cmd.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2001-2019 +* Copyright(c) 2001-2020 */ #ifndef _IAVF_ADMINQ_CMD_H_
drivers/common/iavf/iavf_alloc.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2001-2019 +* Copyright(c) 2001-2020 */ #ifndef _IAVF_ALLOC_H_
drivers/common/iavf/iavf_common.c +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2001-2019 +* Copyright(c) 2001-2020 */ #include "iavf_type.h"
drivers/common/iavf/iavf_devids.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2001-2019 +* Copyright(c) 2001-2020 */ #ifndef _IAVF_DEVIDS_H_
drivers/common/iavf/iavf_prototype.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2001-2019 +* Copyright(c) 2001-2020 */ #ifndef _IAVF_PROTOTYPE_H_
drivers/common/iavf/iavf_register.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2001-2019 +* Copyright(c) 2001-2020 */ #ifndef _IAVF_REGISTER_H_
drivers/common/iavf/iavf_status.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2001-2019 +* Copyright(c) 2001-2020 */ #ifndef _IAVF_STATUS_H_
drivers/common/iavf/iavf_type.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2001-2019 +* Copyright(c) 2001-2020 */ #ifndef _IAVF_TYPE_H_
drivers/common/iavf/virtchnl.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2001-2019 +* Copyright(c) 2001-2020 */ #ifndef _VIRTCHNL_H_
Signature · 1 line
2.13.6
PATCH 2/4 common/iavf: add two opcodes to send the AdminQ command
In reply to Qi ZhangAdd two virtchnl opcodes to send the AdminQ command, one is used to send the descriptor, the other is used to send the buffer payload if the AdminQ command has BUF flag set.
--- drivers/common/iavf/virtchnl.h | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/common/iavf/virtchnl.h +8 -0
@@ -129,6 +129,8 @@ enum virtchnl_ops {VIRTCHNL_OP_ADD_CLOUD_FILTER =32 ,VIRTCHNL_OP_DEL_CLOUD_FILTER =33 ,/* opcodes 34, 35, 36, 37 and 38 are reserved */ +VIRTCHNL_OP_DCF_CMD_DESC =39 , + VIRTCHNL_OP_DCF_CMD_BUFF = 40, };/* These macros are used to generate compilation errors if a structure/union
@@ -879,6 +881,12 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode,case VIRTCHNL_OP_DEL_CLOUD_FILTER : valid_len =sizeof (struct virtchnl_filter );break ; +case VIRTCHNL_OP_DCF_CMD_DESC : +case VIRTCHNL_OP_DCF_CMD_BUFF : +/* These two opcodes are specific to handle the AdminQ command, +* so the validation needs to be done in PF's context. +*/ +return 0 ;/* These are always errors coming from the VF. */ case VIRTCHNL_OP_EVENT :case VIRTCHNL_OP_UNKNOWN :
Signature · 1 line
2.13.6
PATCH 3/4 common/iavf: add support for DCF capability negotiation
In reply to Qi ZhangAdd DCF capability flag for VF.
Add an opcode for disabling DCF capability.
Add an virtchnl event code for AVF resetting completion.
--- drivers/common/iavf/virtchnl.h | 4 ++++ 1 file changed, 4 insertions(+)
drivers/common/iavf/virtchnl.h +4 -0
@@ -131,6 +131,7 @@ enum virtchnl_ops {/* opcodes 34, 35, 36, 37 and 38 are reserved */ VIRTCHNL_OP_DCF_CMD_DESC =39 ,VIRTCHNL_OP_DCF_CMD_BUFF =40 , + VIRTCHNL_OP_DCF_DISABLE = 41, };/* These macros are used to generate compilation errors if a structure/union
@@ -245,6 +246,7 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource);#define VIRTCHNL_VF_OFFLOAD_ADQ 0X00800000#define VIRTCHNL_VF_OFFLOAD_ADQ_V2 0X01000000#define VIRTCHNL_VF_OFFLOAD_USO 0X02000000 +#define VIRTCHNL_VF_CAP_DCF 0X40000000/* 0X80000000 is reserved */ /* Define below the capability flags that are not offloads */
@@ -887,6 +889,8 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode,* so the validation needs to be done in PF's context. */ return 0 ; +case VIRTCHNL_OP_DCF_DISABLE : +break ;/* These are always errors coming from the VF. */ case VIRTCHNL_OP_EVENT :case VIRTCHNL_OP_UNKNOWN :
Signature · 1 line
2.13.6
PATCH 4/4 common/iavf: add support for VSI mapping table
In reply to Qi ZhangAdd an opcode for getting VSI mapping table.
Add an virtchnl event code for VF reset done.
--- drivers/common/iavf/virtchnl.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
drivers/common/iavf/virtchnl.h +29 -0
@@ -132,6 +132,7 @@ enum virtchnl_ops {VIRTCHNL_OP_DCF_CMD_DESC =39 ,VIRTCHNL_OP_DCF_CMD_BUFF =40 ,VIRTCHNL_OP_DCF_DISABLE =41 , + VIRTCHNL_OP_DCF_GET_VSI_MAP = 42, };/* These macros are used to generate compilation errors if a structure/union
@@ -624,6 +625,25 @@ struct virtchnl_filter {VIRTCHNL_CHECK_STRUCT_LEN (272 , virtchnl_filter); +/* VIRTCHNL_OP_DCF_GET_VSI_MAP +* VF sends this message to get VSI mapping table. +* PF responds with an indirect message containing VF's +* HW VSI IDs. +* The index of vf_vsi array is the logical VF ID, the +* value of vf_vsi array is the VF's HW VSI ID with its +* valid configuration. +*/ +struct virtchnl_dcf_vsi_map { +u16 pf_vsi;/* PF's HW VSI ID */ +u16 num_vfs;/* The actual number of VFs allocated */ +#define VIRTCHNL_DCF_VF_VSI_ID_S 0 +#define VIRTCHNL_DCF_VF_VSI_ID_M (0xFFF << VIRTCHNL_DCF_VF_VSI_ID_S) +#define VIRTCHNL_DCF_VF_VSI_VALID (1 << 15) +u16 vf_vsi[1 ]; +}; + +VIRTCHNL_CHECK_STRUCT_LEN (6 , virtchnl_dcf_vsi_map); +/* 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
@@ -634,6 +654,7 @@ enum virtchnl_event_codes {VIRTCHNL_EVENT_LINK_CHANGE ,VIRTCHNL_EVENT_RESET_IMPENDING ,VIRTCHNL_EVENT_PF_DRIVER_CLOSE , + VIRTCHNL_EVENT_DCF_VSI_MAP_UPDATE, };#define PF_EVENT_SEVERITY_INFO 0
@@ -661,6 +682,10 @@ struct virtchnl_pf_event {u32 link_speed;u8 link_status; } link_event_adv; +struct { +u16 vf_id; +u16 vsi_id; + } vf_vsi_map; } event_data;int severity;
@@ -890,6 +915,10 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode,*/ return 0 ;case VIRTCHNL_OP_DCF_DISABLE : +case VIRTCHNL_OP_DCF_GET_VSI_MAP : +/* The two opcodes are required by DCF without message buffer, +* so the valid length keeps the default value 0. +*/ break ;/* These are always errors coming from the VF. */ case VIRTCHNL_OP_EVENT :
Signature · 1 line
2.13.6
Quoted 35 lines
-----Original Message-----
From: Zhang, Qi Z <[email protected]>
Sent: Tuesday, March 10, 2020 8:37 AM
To: Yang, Qiming <[email protected]>; Xing, Beilei <[email protected]>
Cc: Ye, Xiaolong <[email protected]>; [email protected]; Zhang, Qi Z <[email protected]>
Subject: [PATCH 0/4] iavf share code updateMain change:
update virtual channel to support DCF
Qi Zhang (4):
common/iavf: update copyright date common/iavf: add two opcodes to send the AdminQ command common/iavf: add support for DCF capability negotiation common/iavf: add support for VSI mapping tabledrivers/common/iavf/iavf_adminq.c | 2 +- drivers/common/iavf/iavf_adminq.h | 2 +- drivers/common/iavf/iavf_adminq_cmd.h | 2 +- drivers/common/iavf/iavf_alloc.h | 2 +- drivers/common/iavf/iavf_common.c | 2 +- drivers/common/iavf/iavf_devids.h | 2 +- drivers/common/iavf/iavf_prototype.h | 2 +- drivers/common/iavf/iavf_register.h | 2 +- drivers/common/iavf/iavf_status.h | 2 +- drivers/common/iavf/iavf_type.h | 2 +- drivers/common/iavf/virtchnl.h | 43 ++++++++++++++++++++++++++++++++++- 11 files changed, 52 insertions(+), 11 deletions(-)
Quoted 2 lines
--
2.13.6
Ye Xiaolong
AppliedQuoted 35 lines · Beilei
Quoted 35 lines
-----Original Message-----
From: Zhang, Qi Z <[email protected]>
Sent: Tuesday, March 10, 2020 8:37 AM
To: Yang, Qiming <[email protected]>; Xing, Beilei <[email protected]>
Cc: Ye, Xiaolong <[email protected]>; [email protected]; Zhang, Qi Z <[email protected]>
Subject: [PATCH 0/4] iavf share code updateMain change:
update virtual channel to support DCF
Qi Zhang (4):
common/iavf: update copyright date common/iavf: add two opcodes to send the AdminQ command common/iavf: add support for DCF capability negotiation common/iavf: add support for VSI mapping tabledrivers/common/iavf/iavf_adminq.c | 2 +- drivers/common/iavf/iavf_adminq.h | 2 +- drivers/common/iavf/iavf_adminq_cmd.h | 2 +- drivers/common/iavf/iavf_alloc.h | 2 +- drivers/common/iavf/iavf_common.c | 2 +- drivers/common/iavf/iavf_devids.h | 2 +- drivers/common/iavf/iavf_prototype.h | 2 +- drivers/common/iavf/iavf_register.h | 2 +- drivers/common/iavf/iavf_status.h | 2 +- drivers/common/iavf/iavf_type.h | 2 +- drivers/common/iavf/virtchnl.h | 43 ++++++++++++++++++++++++++++++++++- 11 files changed, 52 insertions(+), 11 deletions(-)
Quoted 4 lines
Quoted 2 lines
--
2.13.6Acked-by Beilei Xing <[email protected]>
Applied to dpdk-next-net-intel, Thanks.