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 C7EF6A0552; Thu, 20 Oct 2022 13:19:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8364042D40; Thu, 20 Oct 2022 13:19:46 +0200 (CEST) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2049.outbound.protection.outlook.com [40.107.102.49]) by mails.dpdk.org (Postfix) with ESMTP id CB46842D3F for ; Thu, 20 Oct 2022 13:19:45 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vel1CEq2yvpt+6dG21lvJ2iDgecl0SbSqa3Z7JVHvKAa0KV6666MT6RZeg32kvf3v1BCoQNcAmfhHJGQsqHkjatcbed+2tIJFxum5HWymjfoRQDu4d2AgdKkiiz2dqNz/jG+ElaK2Rmfh+3NZKqKkp/JUKszk9etiSYB0Dt45Vb9NM7yzaA2mPvcUQxsRJLgPi7ixYH9g89bU/M/entmsA/MgpmD13to3kcQET2iCGJX+BOU7IDPTrtwVCuWMW7jOHEF4D5TdYLrtR354Tx82OUJsTsv24ExBLznLzw+8ccM8siK8lHQCH8fRa9v1fMsjfM3VKPYv6jGYXIPEPdFKQ== 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=dNgrUFFcP9H6kUtyUkISmYFFGzY/BSjVTo1dzN1jrUI=; b=ajrEK2Tey1QixouvNaS9PlkY1KA7qu3HmdHeYq9J/9BPWvMaZ8WOdPvnOEFWAZ4FmlYwq6Y7B7C/oZ74ji/HCfjS+hN14ocAWTxq02Qa6XxZibKEcrHWyepSWuaB3Kbm2Ovlkt/kiUL8YlKSJhCA1WWj8I9vM5+AKySI4XezaCTOVSML4aeW1cd7HxjrfmaExupKR7JanRQ+DCQlmHHC4/sS7WofSVMWN8WVknbvL078iZKgApz5lb2le07H9vWQ0JYSbBI+A76quI3z+g451hlOPbGzy+wOH1V09Vw0HxyKZR98dBB5aGUenDFOFdL4dO2xuQYUGpSLWHUb4qfxsQ== 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=dNgrUFFcP9H6kUtyUkISmYFFGzY/BSjVTo1dzN1jrUI=; b=vI6agnpM08Y4bkKu1wXR9I+B9lLKUUpB/as6PSIMT9tiXkAzYfsxd9mY/iWg+DUmCDYxRyJK9hNbL02Ie0IRT80nwg+U31PeLG3phbet+H4V/7rWVEArSatp9OTbFOOjLh6KfilFj+MyIMIUHaC0dzm4yY0VVKegJbyugz/tsMQ= 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 SJ0PR12MB6926.namprd12.prod.outlook.com (2603:10b6:a03:485::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Thu, 20 Oct 2022 11:19:43 +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; Thu, 20 Oct 2022 11:19:43 +0000 Message-ID: Date: Thu, 20 Oct 2022 12:19:35 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Subject: Re: [PATCH v5 6/8] net/gve: add support for dev info get and dev configure Content-Language: en-US To: "Guo, Junfeng" , "Zhang, Qi Z" , "Wu, Jingjing" Cc: "ferruh.yigit@xilinx.com" , "dev@dpdk.org" , "Li, Xiaoyun" , "awogbemila@google.com" , "Richardson, Bruce" , "Lin, Xueqin" References: <20220927073255.1803892-2-junfeng.guo@intel.com> <20221010101757.878317-1-junfeng.guo@intel.com> <20221010101757.878317-7-junfeng.guo@intel.com> <4a71b18f-1b13-0061-ddd4-a0dacb0ee8c8@amd.com> From: Ferruh Yigit In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0388.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:f::16) To DM6PR12MB4297.namprd12.prod.outlook.com (2603:10b6:5:211::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR12MB4297:EE_|SJ0PR12MB6926:EE_ X-MS-Office365-Filtering-Correlation-Id: df37b5eb-6ccf-48b7-434f-08dab28cfb11 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +3FWvsVjNdsuxJ82TqqhLGqmQLid2AQ59Wcx5OVu7Brnp1Tatx36cJjAQK4gR/qpInQxASiCdS5zJUiA6sz0n+sVR4LUmzDLztHFTthNN6xYL4tX6/s86bD7sK+voxJSUH/yHTNBiqvghHA9qQhKPNGXBVHkiQFNuy6E99LRoy2JWrf9VQHQPujNuztBwg+XeAOHmBvJLiUg3GXJJSSLB8YrZKkTq6L0yU+FZr6FXgWeKhkiH1NgOmbbrINl5zXGvn5f4C1Q+9QpG322pWiudiiS+FU0+rTOveF/XvhJVKdsuf7YsVKAx/Jyuc5Vj8I6QQHQ6mqEdPZbI1F8h7km4FJGqIIC6ehaZlcyiDE3Q2uKox7902hnNPgJ7XJzL+BLoC+nlhj6aubts4CMjhUQ7miW8YtwZq/kA4J9OfMRYkWFHqGzuKYTBvPOoGGWfQVRcJIc20Z6ZXTjLQMRPG+JL9Q8zpqE6WPlFwRnq2OR8UxELJlbox1Vtp21ViH1b9fD4z+sPjbIChxt9R0z5arQuN3DRSyV9iTpMGREgNXBc7E65nQkqmN2kEsayeTIRkM2WBFwqYKA5P6fbfGGHeg+1+4y4naT2MbdHT9DexIeBlXkytrJIs6LbHlhI5z5uwZFVkxJjVLaxLVaecRo53F9g8lx0YE7ipWsGLq5d2NFU26d8unVaGf3+P1h77CT12dFgtbMmmCNi+krgAiAcQgKNNjPXTrJu9kk6jdbMH+b6VaeOJ+HX3gcqa2w2g9aVusxgd+51tH9dGBzTPokzVMyrhUlrh5SuEulhxsJsT08C4c= 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)(39860400002)(366004)(396003)(376002)(136003)(346002)(451199015)(31686004)(36756003)(31696002)(86362001)(2906002)(44832011)(38100700002)(53546011)(2616005)(83380400001)(186003)(478600001)(6506007)(6512007)(6486002)(26005)(54906003)(110136005)(316002)(4326008)(8676002)(66946007)(66476007)(66556008)(6666004)(5660300002)(41300700001)(8936002)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ei90bENBVFc0VytOemlJbXljNk0weVhySVpUS00vU3hHeG00dUxDdFl1cHBH?= =?utf-8?B?UTRTRklmZGRGb3lKUUljakgwOVBsWnRYLzk2QjhqMFgxcXFFMUg4YmpDOVND?= =?utf-8?B?TW9qS0hCVHZMVXhvWmFyUDF5ZmZtaVk5bk9TeDIrcDBLSkxrN0NpbXR5K1Rs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BNk1JbSs4c2JqN0NSK0tCVGcvR0lTelJhVU5UZnpBQTFERWlT?= =?utf-8?B?QktvTE1IcEtza1FtaXhsRUpmS0FjbU5xYWJ5ajF3TndYSDIzRWR4d2FOMldF?= =?utf-8?B?OGZiZTQrVGZ5MUZCa0did3Bkci96TzNGUi9Vck5LNUZZbExPcFFsU1V4NmEv?= =?utf-8?Q?FxnbVanRtf9n0e3bznB14DuCF?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: df37b5eb-6ccf-48b7-434f-08dab28cfb11 X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB4297.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 11:19:43.5597 (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: pBmtqPgWydg68Fs70oxQ2s4Rp56b6nHpxBS6Z5gI3ezmvt/+ST6jwYJNJ4w4o09B X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6926 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/20/2022 10:29 AM, Guo, Junfeng wrote: > > >> -----Original Message----- >> From: Ferruh Yigit >> Sent: Wednesday, October 19, 2022 21:49 >> To: Guo, Junfeng ; Zhang, Qi Z >> ; Wu, Jingjing >> Cc: ferruh.yigit@xilinx.com; dev@dpdk.org; Li, Xiaoyun >> ; awogbemila@google.com; Richardson, Bruce >> ; Lin, Xueqin >> Subject: Re: [PATCH v5 6/8] net/gve: add support for dev info get and dev >> configure >> >> On 10/10/2022 11:17 AM, Junfeng Guo wrote: >> >>> >>> Add dev_ops dev_infos_get. >>> Complete dev_configure with RX offloads configuration. >>> >>> Signed-off-by: Xiaoyun Li >>> Signed-off-by: Junfeng Guo >> >> <...> >> >>> --- a/drivers/net/gve/gve_ethdev.c >>> +++ b/drivers/net/gve/gve_ethdev.c >>> @@ -29,8 +29,16 @@ gve_write_version(uint8_t >> *driver_version_register) >>> } >>> >>> static int >>> -gve_dev_configure(__rte_unused struct rte_eth_dev *dev) >>> +gve_dev_configure(struct rte_eth_dev *dev) >>> { >>> + struct gve_priv *priv = dev->data->dev_private; >>> + >>> + if (dev->data->dev_conf.rxmode.mq_mode & >> RTE_ETH_MQ_RX_RSS_FLAG) >>> + dev->data->dev_conf.rxmode.offloads |= >> RTE_ETH_RX_OFFLOAD_RSS_HASH; >>> + >> >> This is force enabling the feature, we are doing this for PMDs that has >> the hash value anyway and no additional work or performance loss >> observed to enable this offload. Otherwise drivers shouldn't update >> 'dev_conf.rxmode'. >> >> Can you please confirm this PMD fits above description? And can you >> please add a coment that says force enabling the feature? > > Yes, it seems force enabling this offloading is not quite reasonable here. > This may just follow previous PMD convention, so we decided to remove > this part in the coming version. Thanks! > >> >>> + if (dev->data->dev_conf.rxmode.offloads & >> RTE_ETH_RX_OFFLOAD_TCP_LRO) >>> + priv->enable_rsc = 1; >>> + >>> return 0; >>> } >>> >>> @@ -94,6 +102,60 @@ gve_dev_close(struct rte_eth_dev *dev) >>> return err; >>> } >>> >>> +static int >>> +gve_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info >> *dev_info) >>> +{ >>> + struct gve_priv *priv = dev->data->dev_private; >>> + >>> + dev_info->device = dev->device; >>> + dev_info->max_mac_addrs = 1; >>> + dev_info->max_rx_queues = priv->max_nb_rxq; >>> + dev_info->max_tx_queues = priv->max_nb_txq; >>> + dev_info->min_rx_bufsize = GVE_MIN_BUF_SIZE; >>> + dev_info->max_rx_pktlen = GVE_MAX_RX_PKTLEN; >>> + dev_info->max_mtu = RTE_ETHER_MTU; >> >> Can you please confirm max MTU this PMD supports is 1500? Meaning it >> doesn't support jumbo frames etc... > > Actually here is just a workaround solution for the max_mtu info... > We can only get the max_mtu value via adminq message from the backend. > But the real one (i.e., priv->max_mtu) we get is 1460, which is less than 1500 > Seems it is the GCP bug or something. > If we use "dev_info->max_mtu = priv->max_mtu", the testpmd cannot even > be launched successfully... > I'll keep this part unchanged with some comments here if no other solutions. > Please help correct me if you have any other idea. Thanks a lot! > Getting actual value from device is correct thing to do, but it seems received value is not good, so OK to keep as it is. Can you please follow this with GVE? >> >>> + dev_info->min_mtu = RTE_ETHER_MIN_MTU; >>> + >>> + dev_info->rx_offload_capa = 0; >>> + dev_info->tx_offload_capa = >>> + RTE_ETH_TX_OFFLOAD_MULTI_SEGS | >>> + RTE_ETH_TX_OFFLOAD_IPV4_CKSUM | >>> + RTE_ETH_TX_OFFLOAD_UDP_CKSUM | >>> + RTE_ETH_TX_OFFLOAD_TCP_CKSUM | >>> + RTE_ETH_TX_OFFLOAD_SCTP_CKSUM | >>> + RTE_ETH_TX_OFFLOAD_TCP_TSO; >> >> Can you adverstise these capabilities in the patch that implements them? > > Will move this to the corresponding patch, thanks! >