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 D97A841D3D; Thu, 2 Mar 2023 10:46:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C9A4140E09; Thu, 2 Mar 2023 10:46:25 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 2F5C340DFB for ; Thu, 2 Mar 2023 10:46:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677750383; x=1709286383; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=a81g/FoPokfcbc9fbjrRyDNETfTanOco5GhC5jSloJM=; b=ShSk2yAA8ueCYR12yROxhDSnp0BVrS1oQPVkhr3rF39ltKwsuDLzU3Pd 4hjzXMPyvImm7brD4wxy+/+m15fobEjcNXMqU2iv86uLguwqT3iEGr5bz QhrVajdiNrRghUQgIdLDXaj1FluTu3BlSp+H/+IGbWQZXGH4VXvFcttKB sFShQV58X99do82dNY9vQEmfkpc/9JTrWR4GJF00DyOemrVNE2XmNWeB8 IHmUpcEIjKPmFEs4uV3VZio51AlcStYTVxDspY7Ozqqu7qRqzkBCKO/oS shPQnb2a09jQOXXUGkqhZzj4r2JtG4VGtaNKQjsnevggAh+H4nRz2oP1S w==; X-IronPort-AV: E=McAfee;i="6500,9779,10636"; a="420938642" X-IronPort-AV: E=Sophos;i="5.98,227,1673942400"; d="scan'208";a="420938642" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2023 01:46:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10636"; a="817937625" X-IronPort-AV: E=Sophos;i="5.98,227,1673942400"; d="scan'208";a="817937625" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga001.fm.intel.com with ESMTP; 02 Mar 2023 01:46:22 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 2 Mar 2023 01:46:22 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 2 Mar 2023 01:46:21 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Thu, 2 Mar 2023 01:46:21 -0800 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.100) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Thu, 2 Mar 2023 01:46:21 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AZqsR0ZBqHEcYHstQirPI73vhKjRp3i48NiUWrbvCCthPa7sokkLkeMBvp8jrpTO6bjQz00KlTeBA7Z/b6/oHyVQGlI0H5OC6EQEnQBbBVizy06IsBIdAj9AmVgCIz9V2bDBPbnSDpexM3kfNUimt1ag3wvq4eHw6f9iN9gyfBzxjD7alQvAcjcHymCrUr3mDnt7d9zn+ENgEXW0Umqwj3oMaD7Us1gT4TVLqGGMDTPudEKsspN+Dq/xAC0SfBouD1d9CbOUVL4znf2TSSxLwl5EYSxezCMiaCsjKZLv1NImKl71eyneOuLUExKC3ssdkvl2pEE8DpZa8pvJmL38kw== 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=TJnEZPK65QCPi2dVgcq7QhuJ59Gsd7JDr98CZPDY4pg=; b=YvebLOt+25FmVGTkeOj0vVyleEwxwN/KpVjn2Q+9nh7+0iM2lN7+xe6xbaEktUnrgohDuYWi8E6px2HJ4MemTsGTHSQ3IGgD2vjTbds5ApPGm8sE53KeYu8le8AjM0yoCQBPM4N/rmrEmcTwFZYWJgxBCJ7lw9ax2H9u7fSicadlG1/mcgQqPkyqYJ7S/TJuui0HwO7rVzXnqFbGrBzELYWUMAG6rZ7tI9ZZXWgs166Ij9bNb6JLvqlKGJL+xhqsWccd81gF6nsQ1LqHCHbM7DoBMQPLf6O/VFQlelhKbkR99RgHlVAZk9Bl8TiHj2IA8nD4SrcYT+NTKtoX4MtS2w== 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 DM4PR11MB5994.namprd11.prod.outlook.com (2603:10b6:8:5d::20) by SN7PR11MB6679.namprd11.prod.outlook.com (2603:10b6:806:269::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.18; Thu, 2 Mar 2023 09:46:19 +0000 Received: from DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::2c5d:49cd:a9b4:f764]) by DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::2c5d:49cd:a9b4:f764%8]) with mapi id 15.20.6134.030; Thu, 2 Mar 2023 09:46:19 +0000 From: "Zhang, Qi Z" To: "Liu, Mingxia" , "dev@dpdk.org" CC: "Wu, Jingjing" , "Xing, Beilei" , "Liu, Mingxia" Subject: RE: [PATCH v2] net/idpf: refine Rx/Tx queue model info Thread-Topic: [PATCH v2] net/idpf: refine Rx/Tx queue model info Thread-Index: AQHZTC6yRWrEv9O1/UO6qMF8BVZSmq7nPngA Date: Thu, 2 Mar 2023 09:46:18 +0000 Message-ID: References: <20230301161605.436754-1-mingxia.liu@intel.com> <20230301192659.601892-1-mingxia.liu@intel.com> In-Reply-To: <20230301192659.601892-1-mingxia.liu@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: DM4PR11MB5994:EE_|SN7PR11MB6679:EE_ x-ms-office365-filtering-correlation-id: 58e24258-15d3-4307-2832-08db1b02f94c x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: x0w0J9fuB+Qx5lKoKpj6Mrt/cS1kNmZcYemnfEDVPROY/nRGTmV7UIEGDRzF7wQYGTeY33dwQ/JTvaoN2bu1qG3hbiuAGsnB0iHAflOqNRUi1334uu2GQ8IvpthQ9N1LaIwiIwccGbuMLfTz6oZ/LTsukRRpQNb4MIaL1nwUSMRdI/WatOPEUbpqtDJ4cg3DXrQ//aegqzR+9bIDThUkSot0/+/xgdRcmPeJnhXs1TodsWnp3enHvqGZO8GUBUpYy8Efrv7qGmFn5nzRgEHEUQZT+rthEQ9eFTMGhoQpSd8MsncRi8B6bbAr37ANiSNHsgWI9tBTxgCbKzlp605SYHh3cahPmRx2NWrEdTJlBu7EJmvktQ+rquewZ75omro42Zx0IIt+ZWSfj0v8AlV1T6rRZPD5zsSz3f7nnVumzsfly49NYhaZpAXyJixLjtbNuSniQzDaxh2TUzwdtaGcqCLyRghz0szRa3jhKgyHdnTHuYg1DqHLFtb4/5bep0U/NOV/V8bCsgmm3lxa5MrXU4g8o4BcgwrfQS/3Go9sf7cOa27YoWVQ1p4yEN7nseN7c/M/ZQOl5W+V9xUplGOcwOzoP5ROptpwsvo8BGpJcnbVCn3sS2r+HK50Ldhv0DpKY0U7MnLQaxLKKXAZgEl5+3hAwPvJYWNllxAzZDwfMPynsBtttJQPbo3BKpwRp1gVb6Ta53G/p1yHuvEtXDrVwg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5994.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(376002)(396003)(366004)(136003)(346002)(39860400002)(451199018)(83380400001)(66946007)(107886003)(53546011)(122000001)(38100700002)(33656002)(52536014)(5660300002)(71200400001)(8936002)(82960400001)(478600001)(55016003)(86362001)(38070700005)(9686003)(186003)(26005)(6506007)(8676002)(66556008)(76116006)(64756008)(2906002)(66476007)(7696005)(66446008)(4326008)(41300700001)(110136005)(316002)(54906003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?/tJX1Q8gKWU31h85RKdQQb+/3bh+UsooPMZtFOihRCadgJNGSCHa1q3nGHjx?= =?us-ascii?Q?bVTAfGxe48gM1Dv0mPtVogi4C8TEgHFO5Y17iKiw0YP+wubOxatVAp9DHalj?= =?us-ascii?Q?MJJXyA4WTe4E5muEi0HUZ9U5feIrJ3NZz3UBFdawYLn0nkwC48OPudi9jiev?= =?us-ascii?Q?fU38vUn0h/gJduHwn9gpRxS+kCV2RFNMkdpRmtQa23TPiEYwexswPiPOhyD5?= =?us-ascii?Q?0IwitJLvSMZK5EW9YWVLqAWpYTiospN/i9pGoySEcANrtBL25xuOQejV8zyY?= =?us-ascii?Q?BUGbEogcxad5E6/hU1szevgvQJ5yI13TsmDrwK1CFqDxlH2dzziMRyrp3E/j?= =?us-ascii?Q?c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2vDl?= =?us-ascii?Q?iiw2UJzTKBsMjW5Z7kWSXZJYrdZS3pvn2lgW2lA8tA+sbfVT8K0JT15iHk4g?= =?us-ascii?Q?5TJ6kKl8e3NOMWncoW+Sc0my6lgQs0md/9eOe8YCmITEERI1PL/K0+SZD707?= =?us-ascii?Q?YKSaOyhwwbsuzSBc2AdRSiH8K6lrzIPbOZIiSdabvzHMG7KbN7pbQTl+fjRL?= =?us-ascii?Q?m8aXuMbBv3fWTWNSXd/u70DD07kxismru6UfmwCMMxBCHa8DlXqEpBIE/sRj?= =?us-ascii?Q?iW5S6ivTBz6Rtm4MH6fzhXYgp96NxDX258nxfQEEo5zgjq0F5QPLLrxUiaYD?= =?us-ascii?Q?HQcmP6Jk2oL5sO7siyIPC/S4SIboFxCCnID+ATiV?= 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: DM4PR11MB5994.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 58e24258-15d3-4307-2832-08db1b02f94c X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Mar 2023 09:46:18.8991 (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: +MLWq9zs1yqKijisDP4Zzv3PM2E/9Q1N123QRhhh7aa6WabVCXWaQsZcouwNfrZ0SIvjsdVkXXXQkGHSNlgqGw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB6679 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: Mingxia Liu > Sent: Thursday, March 2, 2023 3:27 AM > To: dev@dpdk.org > Cc: Wu, Jingjing ; Xing, Beilei ; > Liu, Mingxia > Subject: [PATCH v2] net/idpf: refine Rx/Tx queue model info >=20 > This patch updates queue mode info in struct idpf_adapter. > Using is_rx_singleq_model to diffentiate rx_singq and rx_splitq explicitl= y, > instead of deducing it from pointer values. >=20 > Signed-off-by: Mingxia Liu > --- > drivers/common/idpf/idpf_common_device.c | 4 ++-- > drivers/common/idpf/idpf_common_device.h | 4 ++-- > drivers/common/idpf/idpf_common_rxtx.c | 2 +- > drivers/common/idpf/idpf_common_rxtx.h | 5 +++++ > drivers/net/idpf/idpf_ethdev.c | 4 ++-- > drivers/net/idpf/idpf_rxtx.c | 6 +++--- > 6 files changed, 15 insertions(+), 10 deletions(-) >=20 > diff --git a/drivers/common/idpf/idpf_common_device.c > b/drivers/common/idpf/idpf_common_device.c > index 5475a3e52c..c5e7bbf66c 100644 > --- a/drivers/common/idpf/idpf_common_device.c > +++ b/drivers/common/idpf/idpf_common_device.c > @@ -623,7 +623,7 @@ idpf_vport_info_init(struct idpf_vport *vport, > struct idpf_adapter *adapter =3D vport->adapter; >=20 > vport_info->vport_type =3D > rte_cpu_to_le_16(VIRTCHNL2_VPORT_TYPE_DEFAULT); > - if (adapter->txq_model =3D=3D 0) { > + if (!adapter->is_tx_singleq) { > vport_info->txq_model =3D > rte_cpu_to_le_16(VIRTCHNL2_QUEUE_MODEL_SPLIT); > vport_info->num_tx_q =3D > @@ -636,7 +636,7 @@ idpf_vport_info_init(struct idpf_vport *vport, > vport_info->num_tx_q =3D > rte_cpu_to_le_16(IDPF_DEFAULT_TXQ_NUM); > vport_info->num_tx_complq =3D 0; > } > - if (adapter->rxq_model =3D=3D 0) { > + if (!adapter->is_rx_singleq) { > vport_info->rxq_model =3D > rte_cpu_to_le_16(VIRTCHNL2_QUEUE_MODEL_SPLIT); > vport_info->num_rx_q =3D > rte_cpu_to_le_16(IDPF_DEFAULT_RXQ_NUM); > diff --git a/drivers/common/idpf/idpf_common_device.h > b/drivers/common/idpf/idpf_common_device.h > index 364a60221a..c2dc2f16b9 100644 > --- a/drivers/common/idpf/idpf_common_device.h > +++ b/drivers/common/idpf/idpf_common_device.h > @@ -43,8 +43,8 @@ struct idpf_adapter { >=20 > uint32_t ptype_tbl[IDPF_MAX_PKT_TYPE] __rte_cache_min_aligned; >=20 > - uint32_t txq_model; /* 0 - split queue model, non-0 - single queue > model */ > - uint32_t rxq_model; /* 0 - split queue model, non-0 - single queue > model */ > + bool is_tx_singleq; /* true - single queue model, false - split queue > model */ > + bool is_rx_singleq; /* true - single queue model, false - split queue > +model */ >=20 > /* For timestamp */ > uint64_t time_hw; > diff --git a/drivers/common/idpf/idpf_common_rxtx.c > b/drivers/common/idpf/idpf_common_rxtx.c > index d7e8df1895..fc87e3e243 100644 > --- a/drivers/common/idpf/idpf_common_rxtx.c > +++ b/drivers/common/idpf/idpf_common_rxtx.c > @@ -309,7 +309,7 @@ idpf_qc_rx_queue_release(void *rxq) > return; >=20 > /* Split queue */ > - if (q->bufq1 !=3D NULL && q->bufq2 !=3D NULL) { > + if (!q->adapter->is_rx_singleq) { > q->bufq1->ops->release_mbufs(q->bufq1); > rte_free(q->bufq1->sw_ring); > rte_memzone_free(q->bufq1->mz); > diff --git a/drivers/common/idpf/idpf_common_rxtx.h > b/drivers/common/idpf/idpf_common_rxtx.h > index 7e6df080e6..d0f79783b5 100644 > --- a/drivers/common/idpf/idpf_common_rxtx.h > +++ b/drivers/common/idpf/idpf_common_rxtx.h > @@ -90,6 +90,11 @@ > #define PF_GLTSYN_SHTIME_L_5 (PF_TIMESYNC_BAR4_BASE + 0x138) > #define PF_GLTSYN_SHTIME_H_5 (PF_TIMESYNC_BAR4_BASE + 0x13C) >=20 > +enum idpf_rx_split_bufq_id { > + IDPF_RX_SPLIT_BUFQ1_ID =3D 1, > + IDPF_RX_SPLIT_BUFQ2_ID =3D 2 > +}; enum type never be referenced,=20 it's not necessary, #define should be ok.