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 CDD0FA034C; Mon, 24 Oct 2022 12:50:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BF78D40E5A; Mon, 24 Oct 2022 12:50:14 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2072.outbound.protection.outlook.com [40.107.237.72]) by mails.dpdk.org (Postfix) with ESMTP id C61004069C for ; Mon, 24 Oct 2022 12:50:13 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EvIDK4hFqTjSkGlnrvsaddBbA+aOFoHn1ALKyWFEz8QmNIsQ9r4LvlHUQVSPFllEl81ID7751Gmd64Z5tx1TkxCCqbKhnDcgaaavuytJze6rN0XJjbyHZApDicAtRtNDw1iMddQLfnNdcgEUP4djxvgqdqf28ta6rNFxbELQ8UR9HE0oZ/uJ6ylEVDZrRtomCnTWd0Zb4E09R2hKdZkz1mZXuRTq+PAXlhAWiNSoaXMq+g+BxqDCPGSY9wfz7kLIdnKZUrN1qghTLKI7caWa9ad45UDCLHxVpNjvR1TEgaxm4Ji4BxnUp4v7CU/WUmq7OqkmO9DD3rchWijTyWMiCw== 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=5jl1mOaz3O82qI+HRBMz+1a1iCCQlDSLxHuIY0xiax8=; b=g4xPOu+PD6b40eNUSkL51H84O1xU+DghN9x4h+qftQcrVnAWjCXTGNgP0sw5fJPEo1J3tBrIKxpK0VXDUEeyVhq567lygCuxPIPC8GDU6FXU1x+aUL9CUqOIuwCn6THTCrfmEvNikgOLPkxnkZIjBJ6s0q5Ik2gNE6u3A89ZZu/Q6t6AGxRv7QRcTWNwNbSdfCnCbJvJKTCtwupjyWaG5INedmUA+625FSEogfgR0FTHFRD8uubx/D1VHPLrVPpQejtLcYOGe0hxE97LoMAHmKnqqWYs6jWgamuBTGywoQtUELRTkJtKPWcQW6V26c3stT6I2ZlIVp8aFCYdtVLpCA== 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=5jl1mOaz3O82qI+HRBMz+1a1iCCQlDSLxHuIY0xiax8=; b=T42vOxBHzxlG6MhG6nZpJNdyNo/DMe4GiAzu0fQJhMAs2WZV+0VF3YasvwZcqxq/wuFe8XAvuFcmoQuJO6l0QYqpyAHuq6JRoU9fiFyyU+7XSihFMMlnhJeeAF+suwB4xTIRmJCOi2ZTuVQ1XzL0L2oie5ZGbAogLolwcwRjhxg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM6PR12MB4297.namprd12.prod.outlook.com (2603:10b6:5:211::20) by SJ2PR12MB8034.namprd12.prod.outlook.com (2603:10b6:a03:4c7::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.30; Mon, 24 Oct 2022 10:50:12 +0000 Received: from DM6PR12MB4297.namprd12.prod.outlook.com ([fe80::b9fd:e732:4585:6b25]) by DM6PR12MB4297.namprd12.prod.outlook.com ([fe80::b9fd:e732:4585:6b25%7]) with mapi id 15.20.5723.033; Mon, 24 Oct 2022 10:50:11 +0000 Message-ID: <9a880154-2d0a-46c2-74e8-541b49f8b0f2@amd.com> Date: Mon, 24 Oct 2022 11:50:06 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Subject: Re: [PATCH v7 8/8] net/gve: add support for Rx/Tx Content-Language: en-US To: "Guo, Junfeng" , "Zhang, Qi Z" , "Wu, Jingjing" , "Xing, Beilei" Cc: "dev@dpdk.org" , "Li, Xiaoyun" , "awogbemila@google.com" , "Richardson, Bruce" , "hemant.agrawal@nxp.com" , "stephen@networkplumber.org" , "Xia, Chenbo" , "Zhang, Helin" References: <20221020103656.1068036-1-junfeng.guo@intel.com> <20221021091928.2674471-1-junfeng.guo@intel.com> <20221021091928.2674471-9-junfeng.guo@intel.com> <690afa67-a5b4-e282-089b-f20f7e3fb085@amd.com> From: Ferruh Yigit In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P123CA0029.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600::17) To DM6PR12MB4297.namprd12.prod.outlook.com (2603:10b6:5:211::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR12MB4297:EE_|SJ2PR12MB8034:EE_ X-MS-Office365-Filtering-Correlation-Id: 34f8100c-b0cf-43a5-96f1-08dab5ad863d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: F5Kp35TBlOnhtKv2HNW2w21Yqi0uN4DaZOJecjhVlTPoKk5Qm9dc09fSxMGgUR9IAUJj9+KR+bRnd/y2X79Zou5t6FanutgMasVvKts/8rUO+zrxOJiwzrBOHt2M7kU9oSqVzc0mJcvTalVuOwfKovvcu23lbye6quwXI1vi+kkK6Fq+XIUwJYyxNulpWHxDXUDfmTi8qACoHWTe2HDa1ddIrIIRpoFbL9KMqQEnmXLbAndK1C4r+TkJKDCaZndxqjUtTVlBVjtpBfx1YN9n90n/SQlQ0K4apartDG5UTEPZvOY/ya0G2Z5tuVP1yt0o9rlXN4nmCC725P0CkSA5xmgZstA40N4xLEi/JHCbHpFf7Oo6i9AHIQdpxM0PAZa5bRnCz1oDo12S4t+eHD/APMzIXH+Uj3kOfA3f/SvkfVYMLKKRrlySh45BemPHbfj+xWTkiZVW+3LOZs3VsQTOW4SEKI/TO/WJaCiZoBSFEM3vOSHC1reWVV/YD8f2Dl4OdHQxuM+Tol//cfhpouXsNW7YJcInn52kytS8Ve5A0ZxIOlTCaeb85Hm9IS4kFV6SseSF0q/l74utDq5oA/RM2a28kyaxPaflau8xWDlrLexMYj4VvGsnaos/MhgAB8y7iIekHFFrnvkxg+iXdwt4ZBz898eY6g7oJUt9BwYKDa2QE+zg+C9aaeVyBlcs/Ov1PyUN3KhOt4phEpR1SltqNWZ5UF3Pgtzv2Zm54m0EDndy+JEnnooNf30G0YYsnXg0o2mATcd8YSOjJjYzyM8MSzNmr000aSeCDva9151yy9w= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB4297.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(39860400002)(366004)(376002)(346002)(396003)(451199015)(5660300002)(31686004)(2906002)(7416002)(8676002)(66946007)(478600001)(8936002)(66556008)(36756003)(6506007)(110136005)(6486002)(6666004)(41300700001)(186003)(53546011)(26005)(316002)(83380400001)(54906003)(38100700002)(44832011)(4326008)(6512007)(66476007)(2616005)(86362001)(31696002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aG1WKzA2VEc3Rit1cEIrbnc5ZDZLakc4Y1NMeUo2elRNWlcyWTluOWErTjFk?= =?utf-8?B?UzlZQmZmcHR5WWl2UWF2OTUwd055ZWVZcVJ3dytPVy9zZk1rVktydHJHd2s2?=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JKclFDSEhlTFNodEYrRFZMOU5E?= =?utf-8?B?eEpsNGNvV25peGdObm1qMnBrTXNsQUtpa2lEZGw0STZ6VFpUdXh5REJDbGJa?= =?utf-8?B?ZG5DZVB4Sm1VRnFQdVRuZklRWlNuK3IxcnZZN3d0L3MxZVhlKzZMT3QrNmFJ?= =?utf-8?B?WGlhdUk5NHJSV0FBWGU3TUZZQ0ZzMnlxK0IwZ2V5czhyQUJFV1dURGhzWTJn?= =?utf-8?Q?GAYPgKrCPY7XlpB4Vb4XDTjjz?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 34f8100c-b0cf-43a5-96f1-08dab5ad863d X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB4297.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2022 10:50:11.4374 (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: fuMdJAl39lI4VyQiBMkqkR5DytIWArzsxnwcmmpB0C9teGEHmRqgllvQ3ZQI22T0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8034 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 10/24/2022 6:04 AM, Guo, Junfeng wrote: > > >> -----Original Message----- >> From: Ferruh Yigit >> Sent: Friday, October 21, 2022 17:52 >> To: Guo, Junfeng ; Zhang, Qi Z >> ; Wu, Jingjing ; >> ferruh.yigit@xilinx.com; Xing, Beilei >> Cc: dev@dpdk.org; Li, Xiaoyun ; >> awogbemila@google.com; Richardson, Bruce >> ; hemant.agrawal@nxp.com; >> stephen@networkplumber.org; Xia, Chenbo ; >> Zhang, Helin >> Subject: Re: [PATCH v7 8/8] net/gve: add support for Rx/Tx >> >> On 10/21/2022 10:19 AM, Junfeng Guo wrote: >> >>> >>> Add Rx/Tx of GQI_QPL queue format and GQI_RDA queue format. >>> >>> Signed-off-by: Xiaoyun Li >>> Signed-off-by: Junfeng Guo >> >> <...> >> >>> + >>> +static inline void >>> +gve_tx_clean_swr_qpl(struct gve_tx_queue *txq) >>> +{ >>> + uint32_t start = txq->sw_ntc; >>> + uint32_t ntc, nb_clean; >>> + >>> + ntc = txq->sw_tail; >>> + >>> + if (ntc == start) >>> + return; >>> + >>> + /* if wrap around, free twice. */ >>> + if (ntc < start) { >>> + nb_clean = txq->nb_tx_desc - start; >>> + if (nb_clean > GVE_TX_MAX_FREE_SZ) >>> + nb_clean = GVE_TX_MAX_FREE_SZ; >>> + gve_free_bulk_mbuf(&txq->sw_ring[start], nb_clean); >>> + >>> + txq->sw_nb_free += nb_clean; >>> + start += nb_clean; >>> + if (start == txq->nb_tx_desc) >>> + start = 0; >>> + txq->sw_ntc = start; >>> + } >>> + >>> + if (ntc > start) { >>> + nb_clean = ntc - start; >>> + if (nb_clean > GVE_TX_MAX_FREE_SZ) >>> + nb_clean = GVE_TX_MAX_FREE_SZ; >>> + gve_free_bulk_mbuf(&txq->sw_ring[start], nb_clean); >>> + txq->sw_nb_free += nb_clean; >>> + start += nb_clean; >>> + txq->sw_ntc = start; >>> + } >>> +} >> >> [copy/paste from previous version] >> >> may be can drop the 'if' block, since "ntc == start" and "ntc < start" >> cases already covered. > > Yes, this 'if' block is dropped in v7 as suggested. Thanks! > This is v7 and please check above code which has the mentioned 'if' block exist, do you mean in coming v8? >> >> <...> >> >>> +uint16_t >>> +gve_tx_burst(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t >> nb_pkts) >>> +{ >>> + struct gve_tx_queue *txq = tx_queue; >>> + >>> + if (txq->is_gqi_qpl) >>> + return gve_tx_burst_qpl(tx_queue, tx_pkts, nb_pkts); >>> + >>> + return gve_tx_burst_ra(tx_queue, tx_pkts, nb_pkts); >>> +} >>> + >> >> [copy/paste from previous version] >> >> Can there be mix of queue types? >> If only one queue type is supported in specific config, perhaps burst >> function can be set during configuration, to prevent if check on datapath. >> >> This is optimization and can be done later, it doesn't have to be in the >> set. > > The exact queue type can be fetched from the backend via adminq > in priv->queue_format. So there won't be mix of the queue types. > Currently, only GQI_QPL and GQI_RDA queue format are supported > in PMD. Also, only GQI_QPL queue format is in use on GCP since > GQI_RDA hasn't been released in production. > This part code will be optimized/refactored later when involving > the queue type DQO_RDA. Thanks! >