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 DC6BA41D3D; Thu, 2 Mar 2023 11:06:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7C5B240EE3; Thu, 2 Mar 2023 11:06:55 +0100 (CET) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2089.outbound.protection.outlook.com [40.107.102.89]) by mails.dpdk.org (Postfix) with ESMTP id 94EAF40E09 for ; Thu, 2 Mar 2023 11:06:54 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eJ9KekWLRCaIF+NhPXqTIp+ythaDxP/PXatDuWleoYZNVzICiIBTortsedGuCShyv8jRQON3u/vy0gMl7M9k1pdP4o6rUdyIOE+25U2dA8AV/YwLG5LvrxAlcaMRrlCThNyG07fTEwA2inyrXV+hgYD0Re0kLqs6uTzok1z/AFvQoYpSTNNkKw5NSzJ7LcH4kSlOSWXPANRQ2pOW1UWRxXuwEbDBmKYS5SVhAAd6/iLUN2WqPNCV0qCjy/BF3ai8Sk0GM34I1xZ1eSb6bjkKru2nwtBdyHzr0O8Eu0Dgi1TCjXVJbYBeOx2towsvaGf5zZfTMVBjPqoDO7TacPGdAQ== 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=JHLoC6KLfzzYSc/pL5nghG+/gDyaHLSgCN1OCYmz6dw=; b=XXRiMhC0XCXYJHaVKhdmEaKE+pTr31LksWoHixIolPSJvRweB1FmcEaOrGIb6oe9cxCZhvNdTYMavmKS4X8uP7BbxMtrrXJHr6qTPlAYbueDOKoKBiFWAsWWBBVJhoVZ9fw4B4KIxi3aRPTiTAsRlgFoj5KfZYAJ3b7fP8te63Q5McNtwnkOuJ1056y40VG4ALx1dxpQJ3P3B8M+lf1AWtdwJMIXSWPUoyM/faJVxQ9zPaY9f+wwvkT1vkRFNvjhzv6pNv8qo9Uuv/2nH+vlQvNdP1RBHzfta25TSIz8T42QMQKSnFvcj3Q58nq6l8yZ4qZUh1UbKoZ5JXQR186jnw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JHLoC6KLfzzYSc/pL5nghG+/gDyaHLSgCN1OCYmz6dw=; b=OqyNeNQVwFRlDia85087QYz6gssssLe7GfJSaCy78SsqZ1jVzV7O7DkNrc5g+p+uxRUohtd7ADgufOe739UNrIEibzpvBPJnTzyBfaVQkq9GcfSMh9F6fwlq20pQu+AqDw4xTH9YtnWVWr3JHJ606XhvAJ0QEF1NgQWXIYk5XGE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by SJ2PR12MB8829.namprd12.prod.outlook.com (2603:10b6:a03:4d0::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.19; Thu, 2 Mar 2023 10:06:48 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::dd5a:8a5c:f493:9640]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::dd5a:8a5c:f493:9640%4]) with mapi id 15.20.6156.017; Thu, 2 Mar 2023 10:06:43 +0000 Message-ID: <9e9e420c-b734-daa7-b3d1-b0bf4053771b@amd.com> Date: Thu, 2 Mar 2023 10:06:37 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH v2] net/idpf: refine Rx/Tx queue model info Content-Language: en-US To: "Zhang, Qi Z" , "Liu, Mingxia" , "dev@dpdk.org" Cc: "Wu, Jingjing" , "Xing, Beilei" References: <20230301161605.436754-1-mingxia.liu@intel.com> <20230301192659.601892-1-mingxia.liu@intel.com> From: Ferruh Yigit In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0156.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:188::17) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|SJ2PR12MB8829:EE_ X-MS-Office365-Filtering-Correlation-Id: ff7b29f7-078b-477d-a2ba-08db1b05d2c5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Brhu/Hz/p0VluUy6kawau3bxzAR/3r04PVuZvjAmGMbDLo+EuJ6OLizcDDFDY9UQjQtWGOZYyP4B7cGE8b5QPASK7b5z+vcZfdp4hqQWbK4FBUSD7zuIZSxdm105rrF7J6EjRjnEShgpkSYAwzPc5pVXvWww+UQf3cSuWIv50s2RiPUvMjUQ+Dob3wFByl+xOXprgpbl7vKuo8ujsQaA0Z16kl4zTZIhm5t/SsmImgFAuNof6xJXgmOFV+WmRyZFCvQGQjybtmcW6isme4gUZ57aKDYu8pWsM7iXfNojwpD2p+5G3q/5QKVi5NFnZL2fXsnZcsBD5+q1IaUPBU4JspY4xjgU1844oMfMRC55fp5PGs1616JWc1C3lq+QmoGXTF39CE+KV8i0lQg28TyqbqZdC/4d4c3yrpuTMgZuSysKFSNo+FGOLbLvg7l3XsHUhHtpWijNcMYrjljwYxKyLp26dxsqybMhKa6JUKKkOkYkJpBpOq7czuXV+11Yjk4spf3lH1PZH8eZ0B6xxOPEefjd+EXNCmc0Czm5RnYGwuY/kpEGvw7EqahAveM5vXTvEkjYav8dqO2d4hXFhPXIp5oMeqTP+UfxUK5Q3uFypC/QaghAIZfxWLrmUvW2OgEKMzhF17NKVmgEThRPBdGCz7YeNTX2ftNwSCXJ0PX74CV26HXrCggwG3W2VMbVaaHfHyGbhtcVpRHWIUCqecVI73GHjmPcNKqSNcy19k4piUA= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(346002)(396003)(136003)(39860400002)(366004)(376002)(451199018)(2906002)(66476007)(66556008)(66946007)(4326008)(8676002)(6486002)(54906003)(110136005)(478600001)(36756003)(316002)(38100700002)(83380400001)(31686004)(186003)(5660300002)(2616005)(8936002)(41300700001)(6512007)(6506007)(26005)(53546011)(44832011)(31696002)(6666004)(86362001)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SHAySnpVQTBkbjRMdUE3Ujdpc2RGQzQvMzMzUldvcUpBMHI4L2dwZmhQNGZo?= =?utf-8?B?aXlUUk5Ea1g4NURFdWxwUUVVQjBER2IzZU1aNmhCTjc0amVtYkhWZ1U1YUE2?= =?utf-8?B?Z1FIOFZuWkl6YXRUVUpTRXZ3NVRxTXhUYWdCWWI3WlVTRlpLYXpnOFk5c3dN?= =?utf-8?B?UUE0VFhqRHpHd0VkWDlGZUdKWWR1OHZUMk9udWt5OUIwa2VVRDJxUElGM3da?= =?utf-8?B?dmRWeDFva2ZjOHY1cVgycTlwakwvZkVDT2YrVjBCM3NaV3N2UVVMREhtSEZ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VhcnBnK2JlNW1SS2YveEk0MCtzWFZRTE80cEs1UFRxRXdu?= =?utf-8?Q?AzP/rBmd3LZkEo/7yZ+H9Hd93?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: ff7b29f7-078b-477d-a2ba-08db1b05d2c5 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2023 10:06:43.0198 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BsrzcUUXxcRS3dMftnO3M4FYtlknlvFkf7hTlqNunk8HOCGK6x71xRCWh9OG5h7N X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8829 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 On 3/2/2023 9:46 AM, Zhang, Qi Z wrote: > > >> -----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 >> >> This patch updates queue mode info in struct idpf_adapter. >> Using is_rx_singleq_model to diffentiate rx_singq and rx_splitq explicitly, >> instead of deducing it from pointer values. >> >> 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(-) >> >> 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 = vport->adapter; >> >> vport_info->vport_type = >> rte_cpu_to_le_16(VIRTCHNL2_VPORT_TYPE_DEFAULT); >> - if (adapter->txq_model == 0) { >> + if (!adapter->is_tx_singleq) { >> vport_info->txq_model = >> rte_cpu_to_le_16(VIRTCHNL2_QUEUE_MODEL_SPLIT); >> vport_info->num_tx_q = >> @@ -636,7 +636,7 @@ idpf_vport_info_init(struct idpf_vport *vport, >> vport_info->num_tx_q = >> rte_cpu_to_le_16(IDPF_DEFAULT_TXQ_NUM); >> vport_info->num_tx_complq = 0; >> } >> - if (adapter->rxq_model == 0) { >> + if (!adapter->is_rx_singleq) { >> vport_info->rxq_model = >> rte_cpu_to_le_16(VIRTCHNL2_QUEUE_MODEL_SPLIT); >> vport_info->num_rx_q = >> 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 { >> >> uint32_t ptype_tbl[IDPF_MAX_PKT_TYPE] __rte_cache_min_aligned; >> >> - 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 */ >> >> /* 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; >> >> /* Split queue */ >> - if (q->bufq1 != NULL && q->bufq2 != 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) >> >> +enum idpf_rx_split_bufq_id { >> + IDPF_RX_SPLIT_BUFQ1_ID = 1, >> + IDPF_RX_SPLIT_BUFQ2_ID = 2 >> +}; > > enum type never be referenced, > it's not necessary, #define should be ok. > Hi Qi, Is it OK if I merge this patch directly to next-net (when it get your ack), because of v8 CPFL dependency? Otherwise it may cause issues in main if next-net pulled before next-net-intel.