From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 185DD429D2; Mon, 24 Apr 2023 10:55:34 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A68C8410EC; Mon, 24 Apr 2023 10:55:33 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 345F9410DE for ; Mon, 24 Apr 2023 10:55:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682326531; x=1713862531; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=BbQQO4uTOohRTWROykMxcHH1C3sijjc4EoZdHoBZS3U=; b=UiKNi6C85akrvuRZBeG0zdZBScUppJUAZAheyYbAPy/QKNBT3uKHTOBe isrzmT6W3mbUUL5XiqZcdvgZ0/ANrb7+JinIlu4Oc0KKc2R2jUVQcJybn bNd6Z4VfhkccSX+/sUJYQMhYUr49Bt2I+CyWhM5DleQqaQTDof16gdye2 25pE32N7I3oMdj6UrvuLNe6C3I2grNTO8lL4iZQHT1FAmWraJX4DtRaQE yTBng81gyce8r7d3D7EO5taHAyCGVKX4lnjZviqXa0r9q5a/6sXHJGE72 YxAO8wN6JTIhy05WmVLJg87XZim7Uo54wqLsPcd3xdTAGcPjf83yO6KZ+ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10689"; a="345156815" X-IronPort-AV: E=Sophos;i="5.99,222,1677571200"; d="scan'208";a="345156815" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2023 01:55:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10689"; a="817178950" X-IronPort-AV: E=Sophos;i="5.99,222,1677571200"; d="scan'208";a="817178950" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga004.jf.intel.com with ESMTP; 24 Apr 2023 01:55:20 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Mon, 24 Apr 2023 01:55:09 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Mon, 24 Apr 2023 01:55:09 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.176) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Mon, 24 Apr 2023 01:55:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LbDdymjC6ppVBekgaVUgOlFUoBZxTwl1xA7lsMVHOGYB0lVQE9V6/+cVp53aVh9vHzkS2MRZXny1XVVKZGHeLgegDStmrzU3VCoQgzyoChcRxrLG5VPSCB/x9fBCQCRR7w887hlBD8im3/Vb/KJQ1XbXFi182swC0+j3zhAawT1YBpXaTK6nUTr6ObRb5ZLVlHl0y8HoNsa6sBAJbYHKqb6+gxniK9+JLyaXjhbvm2964rqbd++h6+/QzCUwG6vEKG5XOegXHInsKvM7dSZ/SJMY/CTBnnSxq6jZhXfvIr+pQcjfxxX4Qxyat0i8Fw1X+iCKcpYOKxtrpqAOFgfLuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PgWrPNVssq37Br+T0nfqt1ymdcwffDlcy02fqBRJKiI=; b=B/7w3evAr8A4sZnsu9eyJ2aGhUgrteyvB8Etu4hlEH+ZAadcomBIevi3k+wBEB5H5HFRDZTjdciCYQNS0/xmIVBZVP9G7HpIOcJqkSJKRb6f+tIP6qbw72Yc/AKtx7zKSLK8ITOPkJ7XCS16h3NE2hUb9Cc34bW08hpY3OXDttoB7RN201MhP/+ffubm7bv0sJ+O3yIuTjZF3HvE6gXfdqqeHAkPlqYxPL72TMrqls+xK1J4dG5DSIGMEZOdGQi8m/l5LmW9DG9WVWhU5RA9ax0W8Jxci20KClXvNsINIpLKuYBQI36mCSSJp8dBq0hOdrrGn6/ib1GyvABK+nzYeA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from PH0PR11MB5877.namprd11.prod.outlook.com (2603:10b6:510:141::12) by PH7PR11MB6907.namprd11.prod.outlook.com (2603:10b6:510:203::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.30; Mon, 24 Apr 2023 08:55:07 +0000 Received: from PH0PR11MB5877.namprd11.prod.outlook.com ([fe80::da1b:ee87:709:3174]) by PH0PR11MB5877.namprd11.prod.outlook.com ([fe80::da1b:ee87:709:3174%2]) with mapi id 15.20.6319.022; Mon, 24 Apr 2023 08:55:07 +0000 From: "Liu, Mingxia" To: "Xing, Beilei" , "Wu, Jingjing" CC: "dev@dpdk.org" Subject: RE: [PATCH 04/10] net/cpfl: add haipin queue group during vpotr init Thread-Topic: [PATCH 04/10] net/cpfl: add haipin queue group during vpotr init Thread-Index: AQHZdCDb0FRYApX6u0eKlywbdg1Gw686LDLw Date: Mon, 24 Apr 2023 08:55:06 +0000 Message-ID: References: <20230421065048.106899-1-beilei.xing@intel.com> <20230421065048.106899-5-beilei.xing@intel.com> In-Reply-To: <20230421065048.106899-5-beilei.xing@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR11MB5877:EE_|PH7PR11MB6907:EE_ x-ms-office365-filtering-correlation-id: b82cf8e6-498d-4f2c-06db-08db44a19a0f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: bllFMjxUm82HigDrXrHnpUMO11a8F0rRCwjA5viMsY8njtaXupVRmDqZAybkIrdCoBtH/qV0C9k/RlK23xTkSo7glooERitSUMw/XXqRY5ktmJR4lEjRhiy63luC2T1VJw9tS0MRdeCRdVHb5dSCdMej6nzDi2Luq3dXo19SWNzWHgJkpD+O3lk1wSKYIY2fCLlfzdP95I0pAT9DbEx/KSU4v+RRwyTAUX3mA1uUhKI2ym/2elRVdOpT1bQPdhvPAZHAL0bY3p8hKJ7lGud82xRKKkpFSd80mRcAGY5g9HGAA0OvhYXSLZ5DMV/Yp4UW6JZQpXEt+PlzpPJDXwKHH7XRl0WCQZijxYmrS9q2LhkafqBtG1WvZDX9HSh26q8Ugd1wDp9+huiMYmrAo5SIQBOukwyB8HmPAdFfpT60kfwEwjUvIGr/QH3cNAp2ivQZIf7xYp7ntZ3u+9LnS17JLuWJHrat5dFFlKjAtnl7YdBvE8nn6gphk8K35KxpT5tNo7p/UAqNsr/yjCEWamPH08HZIQiKONJEQLU8TTGIFGXFtVK/0tEUWW/tkReInn3/1dhDPE1mzUOE99NlVPmnuhAl3nNNBlIC9dGQQDVErKPhjp2wi6WmUJPL1aioXViL x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5877.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(346002)(136003)(39860400002)(396003)(366004)(376002)(451199021)(66946007)(122000001)(52536014)(8936002)(5660300002)(41300700001)(82960400001)(66556008)(38100700002)(66446008)(66476007)(76116006)(8676002)(64756008)(38070700005)(316002)(4326008)(110136005)(6636002)(478600001)(26005)(86362001)(2906002)(55016003)(71200400001)(7696005)(186003)(53546011)(9686003)(6506007)(33656002)(83380400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?QCXOUtQujuaa0RWWMDEu9Zd0wbRVbzK5/m/4krgvevK8yvR47HRX3f+76kv+?= =?us-ascii?Q?QVlXziFkF3FXHtd5vRA6OGU9COD2q0PTjyKmkFgTD8GwtN6jn+9SyAniTq/E?= =?us-ascii?Q?u8Tk1mjCB2iGi+yvgP9eoTVK6+KSS34S7x2UuqxZ/4kz/aOcR7AU5/LMSlIB?= =?us-ascii?Q?0aiP2bY5GEfBTa8Sdlmz0dKjp4zO5P5wZdnPrExAJhEPL7OHVcPY5DRIr6X0?= =?us-ascii?Q?SL0ZcLTkkyxubo+c7wnddBGcLOwvvE16/uNteKX5zxRSjO+QQMbQdce4oJVf?= =?us-ascii?Q?mORP7usynRMWwbcE75zPVmJwL6T+M0VHDjkHAZ2UDwOIHUEA8UEzaWbGsoPL?= =?us-ascii?Q?GjK55VmB/aMl7xYCVpFt+qpCLr6hFDS7YqAfkUSsGcMn6PtSBpiVab/HQu3A?= =?us-ascii?Q?8dypii1yygONpSav4sKr+yE5E1U8BFrLtOsio8XQW9oy8JcTXjBBTN5u01oq?= =?us-ascii?Q?lql+2/Os6YVmSOPHA2b5ivv3l8R1coAaJeodebDHk6ploIUUXeSEKmZSMiaI?= =?us-ascii?Q?XKgyEUjJod7f0o0G1u0KZqpOItIdkZsB5qQC1/0+Utky68QQQvDhaGq6Fxky?= =?us-ascii?Q?ceyDcPv+pf9dJjo12jkWUr0d78kVD9KOxAcbBTI1rC5hfrNBU5qhAU+ZO8S3?= =?us-ascii?Q?hvc0nhCQlg6jD58eRqqR9N+C8V+6e4qe1eO53uDMjW5wzxpWOPApF601nrWE?= =?us-ascii?Q?jITxQyUoU5Fo0vl8SFTUKFqLDBN71igATwZ/DwfF7BMIWrTsS1LAqHNgfaA5?= =?us-ascii?Q?5797RKegNIOWlqE9pkj+Vn9xBLaRpkv0nkimipaj+VhRxmnLigoS21UkX8jz?= =?us-ascii?Q?LDyv8ksgErFYe5W2+XYitLCuGRj/ZC4dfoQDOchihmLnGpJmh5JexN55zl+b?= =?us-ascii?Q?F36Hpcuy7gTPzRca1h2yKc2R8jV0jytGImfG0YT/020nZtUgDxH9NkoRlBY1?= =?us-ascii?Q?Zbu7aGdmVrS97qmbFCz7JoBiLjQYgopCt6o9SjWP1UQ6rWvMmgikAJ0zzLvI?= =?us-ascii?Q?nGADOm+MHg73EYwZXqML/CbPYYZMxeUuJtDmeuxHhgFUt58PBi9pamRnh4PW?= =?us-ascii?Q?YDmLrL/D00Kekj8Cx3UBofabJdujylSEA/Joam1+s4h5k//cfhTabu7qpLay?= =?us-ascii?Q?lGW8PCQzYD5ONSuWTZkomb9qglawQ6uRZog5UDxbFNUW7/+WYNRX+agkpkrn?= =?us-ascii?Q?dIf4dn5EbOrdXKqR1S6coi/H9sriwsGydmO1T98KtIjLEJhbClZxiC1SiHlX?= =?us-ascii?Q?+3G26AAsWEH4Yawi7vXZFILYcCaXaQhAcrNVYzezBiTvEn1SqAnIXIACcW90?= =?us-ascii?Q?WncL0ji0cUZXsmKaBydimYxNM2irrDBx/aEvtcmKa3IW2Q/aFkBEGBNL0neh?= =?us-ascii?Q?QkF7CEpDNxRwbrcTdw7iDERbK6wDtgVbbLolei68AI5FkDkIT0Bnol7fCzYu?= =?us-ascii?Q?u1APuhijtj5A+SAFdxDTZHcQuydSmio4wcLUpe4+p1FdvbWtDVr9HyGrKdmt?= =?us-ascii?Q?1J/Beowr/bO5mxLgUhA32bEbNHmWk743Np23scRGHOtn2cGsZB7xYm54QZFk?= =?us-ascii?Q?OH7uRNbWJdvNZOIIx3PpI9euOJRVFcrxNGrPP6y8?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5877.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b82cf8e6-498d-4f2c-06db-08db44a19a0f X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Apr 2023 08:55:06.8027 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: vTr4bEyjSNmRGQHQAsaPim4+7hIBdn+CBzmlAqGiBHj175yoAdvqtZFixvOkUs4vQmtfCqeC4pIBPXJ7HxbSeA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB6907 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > -----Original Message----- > From: Xing, Beilei > Sent: Friday, April 21, 2023 2:51 PM > To: Wu, Jingjing > Cc: dev@dpdk.org; Liu, Mingxia ; Xing, Beilei > > Subject: [PATCH 04/10] net/cpfl: add haipin queue group during vpotr init [Liu, Mingxia] vpotr , spelling error? >=20 > From: Beilei Xing >=20 > This patch adds haipin queue group during vpotr init. >=20 > Signed-off-by: Mingxia Liu > Signed-off-by: Beilei Xing > --- > drivers/net/cpfl/cpfl_ethdev.c | 125 > +++++++++++++++++++++++++++++++++ drivers/net/cpfl/cpfl_ethdev.h | > 17 +++++ > drivers/net/cpfl/cpfl_rxtx.h | 4 ++ > 3 files changed, 146 insertions(+) >=20 > diff --git a/drivers/net/cpfl/cpfl_ethdev.c b/drivers/net/cpfl/cpfl_ethde= v.c > index 114fc18f5f..ad5ddebd3a 100644 > --- a/drivers/net/cpfl/cpfl_ethdev.c > +++ b/drivers/net/cpfl/cpfl_ethdev.c > @@ -856,6 +856,20 @@ cpfl_dev_stop(struct rte_eth_dev *dev) > return 0; > } >=20 > +static int > +cpfl_p2p_queue_grps_del(struct idpf_vport *vport) { > + struct virtchnl2_queue_group_id > qg_ids[CPFL_P2P_NB_QUEUE_GRPS] =3D {0}; > + int ret =3D 0; > + > + qg_ids[0].queue_group_id =3D CPFL_P2P_QUEUE_GRP_ID; > + qg_ids[0].queue_group_type =3D VIRTCHNL2_QUEUE_GROUP_P2P; > + ret =3D idpf_vc_queue_grps_del(vport, CPFL_P2P_NB_QUEUE_GRPS, > qg_ids); > + if (ret) > + PMD_DRV_LOG(ERR, "Failed to delete p2p queue groups"); > + return ret; > +} > + > static int > cpfl_dev_close(struct rte_eth_dev *dev) { @@ -864,6 +878,9 @@ > cpfl_dev_close(struct rte_eth_dev *dev) > struct cpfl_adapter_ext *adapter =3D CPFL_ADAPTER_TO_EXT(vport- > >adapter); >=20 > cpfl_dev_stop(dev); > + > + cpfl_p2p_queue_grps_del(vport); > + > idpf_vport_deinit(vport); >=20 > adapter->cur_vports &=3D ~RTE_BIT32(vport->devarg_id); @@ - > 1350,6 +1367,96 @@ cpfl_vport_idx_alloc(struct cpfl_adapter_ext > *adapter) > return vport_idx; > } >=20 > +static int > +cpfl_p2p_q_grps_add(struct idpf_vport *vport, > + struct virtchnl2_add_queue_groups > *p2p_queue_grps_info, > + uint8_t *p2p_q_vc_out_info) > +{ > + int ret; > + > + p2p_queue_grps_info->vport_id =3D vport->vport_id; > + p2p_queue_grps_info->qg_info.num_queue_groups =3D > CPFL_P2P_NB_QUEUE_GRPS; > + p2p_queue_grps_info->qg_info.groups[0].num_rx_q =3D > CPFL_MAX_P2P_NB_QUEUES; > + p2p_queue_grps_info->qg_info.groups[0].num_rx_bufq =3D > CPFL_P2P_NB_RX_BUFQ; > + p2p_queue_grps_info->qg_info.groups[0].num_tx_q =3D > CPFL_MAX_P2P_NB_QUEUES; > + p2p_queue_grps_info->qg_info.groups[0].num_tx_complq =3D > CPFL_P2P_NB_TX_COMPLQ; > + p2p_queue_grps_info->qg_info.groups[0].qg_id.queue_group_id =3D > CPFL_P2P_QUEUE_GRP_ID; > + p2p_queue_grps_info->qg_info.groups[0].qg_id.queue_group_type > =3D VIRTCHNL2_QUEUE_GROUP_P2P; > + p2p_queue_grps_info- > >qg_info.groups[0].rx_q_grp_info.rss_lut_size =3D 0; > + p2p_queue_grps_info->qg_info.groups[0].tx_q_grp_info.tx_tc =3D 0; > + p2p_queue_grps_info->qg_info.groups[0].tx_q_grp_info.priority =3D > 0; > + p2p_queue_grps_info->qg_info.groups[0].tx_q_grp_info.is_sp =3D 0; > + p2p_queue_grps_info->qg_info.groups[0].tx_q_grp_info.pir_weight > =3D 0; > + > + ret =3D idpf_vc_queue_grps_add(vport, p2p_queue_grps_info, > p2p_q_vc_out_info); > + if (ret !=3D 0) { > + PMD_DRV_LOG(ERR, "Failed to add p2p queue groups."); > + return ret; > + } > + > + return ret; > +} > + > +static int > +cpfl_p2p_queue_info_init(struct cpfl_vport *cpfl_vport, > + struct virtchnl2_add_queue_groups > *p2p_q_vc_out_info) { > + struct p2p_queue_chunks_info *p2p_q_chunks_info =3D > &cpfl_vport->p2p_q_chunks_info; > + struct virtchnl2_queue_reg_chunks *vc_chunks_out; > + int i, type; > + > + if (p2p_q_vc_out_info- > >qg_info.groups[0].qg_id.queue_group_type !=3D > + VIRTCHNL2_QUEUE_GROUP_P2P) { > + PMD_DRV_LOG(ERR, "Add queue group response > mismatch."); > + return -EINVAL; > + } > + > + vc_chunks_out =3D &p2p_q_vc_out_info->qg_info.groups[0].chunks; > + > + for (i =3D 0; i < vc_chunks_out->num_chunks; i++) { > + type =3D vc_chunks_out->chunks[i].type; > + switch (type) { > + case VIRTCHNL2_QUEUE_TYPE_TX: > + p2p_q_chunks_info->tx_start_qid =3D > + vc_chunks_out->chunks[i].start_queue_id; > + p2p_q_chunks_info->tx_qtail_start =3D > + vc_chunks_out->chunks[i].qtail_reg_start; > + p2p_q_chunks_info->tx_qtail_spacing =3D > + vc_chunks_out->chunks[i].qtail_reg_spacing; > + break; > + case VIRTCHNL2_QUEUE_TYPE_RX: > + p2p_q_chunks_info->rx_start_qid =3D > + vc_chunks_out->chunks[i].start_queue_id; > + p2p_q_chunks_info->rx_qtail_start =3D > + vc_chunks_out->chunks[i].qtail_reg_start; > + p2p_q_chunks_info->rx_qtail_spacing =3D > + vc_chunks_out->chunks[i].qtail_reg_spacing; > + break; > + case VIRTCHNL2_QUEUE_TYPE_TX_COMPLETION: > + p2p_q_chunks_info->tx_compl_start_qid =3D > + vc_chunks_out->chunks[i].start_queue_id; > + p2p_q_chunks_info->tx_compl_qtail_start =3D > + vc_chunks_out->chunks[i].qtail_reg_start; > + p2p_q_chunks_info->tx_compl_qtail_spacing =3D > + vc_chunks_out->chunks[i].qtail_reg_spacing; > + break; > + case VIRTCHNL2_QUEUE_TYPE_RX_BUFFER: > + p2p_q_chunks_info->rx_buf_start_qid =3D > + vc_chunks_out->chunks[i].start_queue_id; > + p2p_q_chunks_info->rx_buf_qtail_start =3D > + vc_chunks_out->chunks[i].qtail_reg_start; > + p2p_q_chunks_info->rx_buf_qtail_spacing =3D > + vc_chunks_out->chunks[i].qtail_reg_spacing; > + break; > + default: > + PMD_DRV_LOG(ERR, "Unsupported queue type"); > + break; > + } > + } > + > + return 0; > +} > + > static int > cpfl_dev_vport_init(struct rte_eth_dev *dev, void *init_params) { @@ - > 1359,6 +1466,8 @@ cpfl_dev_vport_init(struct rte_eth_dev *dev, void > *init_params) > struct cpfl_adapter_ext *adapter =3D param->adapter; > /* for sending create vport virtchnl msg prepare */ > struct virtchnl2_create_vport create_vport_info; > + struct virtchnl2_add_queue_groups p2p_queue_grps_info; > + uint8_t p2p_q_vc_out_info[IDPF_DFLT_MBX_BUF_SIZE] =3D {0}; > int ret =3D 0; >=20 > dev->dev_ops =3D &cpfl_eth_dev_ops; > @@ -1380,6 +1489,19 @@ cpfl_dev_vport_init(struct rte_eth_dev *dev, > void *init_params) > goto err; > } >=20 > + memset(&p2p_queue_grps_info, 0, sizeof(p2p_queue_grps_info)); > + ret =3D cpfl_p2p_q_grps_add(vport, &p2p_queue_grps_info, > p2p_q_vc_out_info); > + if (ret !=3D 0) { > + PMD_INIT_LOG(ERR, "Failed to add p2p queue group."); > + goto err_q_grps_add; > + } > + ret =3D cpfl_p2p_queue_info_init(cpfl_vport, > + (struct virtchnl2_add_queue_groups > *)p2p_q_vc_out_info); > + if (ret !=3D 0) { > + PMD_INIT_LOG(ERR, "Failed to init p2p queue info."); > + goto err_p2p_qinfo_init; > + } > + > adapter->vports[param->idx] =3D cpfl_vport; > adapter->cur_vports |=3D RTE_BIT32(param->devarg_id); > adapter->cur_vport_nb++; > @@ -1397,6 +1519,9 @@ cpfl_dev_vport_init(struct rte_eth_dev *dev, > void *init_params) > return 0; >=20 > err_mac_addrs: > +err_p2p_qinfo_init: > + cpfl_p2p_queue_grps_del(vport); > +err_q_grps_add: > adapter->vports[param->idx] =3D NULL; /* reset */ > idpf_vport_deinit(vport); > adapter->cur_vports &=3D ~RTE_BIT32(param->devarg_id); diff --git > a/drivers/net/cpfl/cpfl_ethdev.h b/drivers/net/cpfl/cpfl_ethdev.h index > 81fe9ac4c3..5e2e7a1bfb 100644 > --- a/drivers/net/cpfl/cpfl_ethdev.h > +++ b/drivers/net/cpfl/cpfl_ethdev.h > @@ -69,8 +69,25 @@ struct cpfl_devargs { > uint16_t req_vport_nb; > }; >=20 > +struct p2p_queue_chunks_info { > + uint32_t tx_start_qid; > + uint32_t rx_start_qid; > + uint32_t tx_compl_start_qid; > + uint32_t rx_buf_start_qid; > + > + uint64_t tx_qtail_start; > + uint32_t tx_qtail_spacing; > + uint64_t rx_qtail_start; > + uint32_t rx_qtail_spacing; > + uint64_t tx_compl_qtail_start; > + uint32_t tx_compl_qtail_spacing; > + uint64_t rx_buf_qtail_start; > + uint32_t rx_buf_qtail_spacing; > +}; > + > struct cpfl_vport { > struct idpf_vport base; > + struct p2p_queue_chunks_info p2p_q_chunks_info; > }; >=20 > struct cpfl_adapter_ext { > diff --git a/drivers/net/cpfl/cpfl_rxtx.h b/drivers/net/cpfl/cpfl_rxtx.h = index > b2b3537d10..3a87a1f4b3 100644 > --- a/drivers/net/cpfl/cpfl_rxtx.h > +++ b/drivers/net/cpfl/cpfl_rxtx.h > @@ -17,6 +17,10 @@ > #define CPFL_MAX_HAIRPINQ_TX_2_RX 1 > #define CPFL_MAX_HAIRPINQ_NB_DESC 1024 > #define CPFL_MAX_P2P_NB_QUEUES 16 > +#define CPFL_P2P_NB_RX_BUFQ 1 > +#define CPFL_P2P_NB_TX_COMPLQ 1 > +#define CPFL_P2P_NB_QUEUE_GRPS 1 > +#define CPFL_P2P_QUEUE_GRP_ID 1 > /* Base address of the HW descriptor ring should be 128B aligned. */ > #define CPFL_RING_BASE_ALIGN 128 >=20 > -- > 2.26.2