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 1A852A0586; Wed, 19 Oct 2022 15:49:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0C53F42B6C; Wed, 19 Oct 2022 15:49:25 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2086.outbound.protection.outlook.com [40.107.220.86]) by mails.dpdk.org (Postfix) with ESMTP id 76A76410D1 for ; Wed, 19 Oct 2022 15:49:24 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FJkeTZEs8mh/eDfbsaDjJEGQGSq7XlTuwrHWu4XwQ8Fs1z7JrFhyYYORm2yFtNfL6EK9P2gJr8rULCPDOLqwUy6j8vxrXwkif5P1x6QGvnI+qKhmUxAe9Ra/EoGpHm1BZ5z6F/C6s5s3U7t/fErR1aeJE2rgBwlt1Gc7kmG/BX90GMQdFBNwlCOZtwN2gOcCjUGi3OZrn7kDJj9StK/Pu1fZyInyRqoSJGmjxg+75xuTlddlcm2ipt6cX/1UdKVPB5nFDSsgUvDteCcfgxTHNBptMpU5TsguPKB0hp57pRa4dAgVTaTK8ZAzqM2F+rCV0Vlw9fwXYDYcCOg3Bcy7qg== 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=/W0Ej4Q0O4pQueUcbay8kpuCVL0z0UOX+0lYPImdp/Q=; b=ZOsHPfDF2JqBJ+ZG4TCoJjKw6btZYkxjGfYI3eBmfTazChntSUy7FX+mENshprww2Be8C7dZHEQrsjP3bspUuS+jFZKLPdG4857UZir7wY6V0+VrKsdrjOewIhCeFF24GGypxpoL9xU4TwayS17om4xKbhh0EqgV6iWEVgk8ZpdL9aGG5Mp+wSIf2+qcEyoNdBGH9TOFPvseXFMF2n05lkosriIjDhoIF1Rd65ShcylBpqIo1xcN2FLg5LkK+VyRgIhwqzGJY5iG35rqoyWL6jKtgjbKexCUZREXBidGTJLsVJoC76rxCWXJ8H+BITANCJQSS9OL06GDllqSv4c7ag== 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=/W0Ej4Q0O4pQueUcbay8kpuCVL0z0UOX+0lYPImdp/Q=; b=4VoWGcNCnlwDPc+z2UiYFAekpC1ThFESf5igYCgECl+9nhgbrexFHbSyMQ/60dw+aA0p99yZUsDERhmIrkJ5hAT7oVr9c2wFAGXoZVVUznEpc//0UPMGYMbfm5ZGYutbQXaqWoi+eT7Vblq1jbvPx3YUSjs9cfDmdomZZLDBVk8= 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 SN7PR12MB6931.namprd12.prod.outlook.com (2603:10b6:806:261::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.26; Wed, 19 Oct 2022 13:49:22 +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; Wed, 19 Oct 2022 13:49:22 +0000 Message-ID: <4a71b18f-1b13-0061-ddd4-a0dacb0ee8c8@amd.com> Date: Wed, 19 Oct 2022 14:49:16 +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: Junfeng Guo , qi.z.zhang@intel.com, jingjing.wu@intel.com Cc: ferruh.yigit@xilinx.com, dev@dpdk.org, xiaoyun.li@intel.com, awogbemila@google.com, bruce.richardson@intel.com, xueqin.lin@intel.com References: <20220927073255.1803892-2-junfeng.guo@intel.com> <20221010101757.878317-1-junfeng.guo@intel.com> <20221010101757.878317-7-junfeng.guo@intel.com> From: Ferruh Yigit In-Reply-To: <20221010101757.878317-7-junfeng.guo@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0350.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18d::13) To DM6PR12MB4297.namprd12.prod.outlook.com (2603:10b6:5:211::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR12MB4297:EE_|SN7PR12MB6931:EE_ X-MS-Office365-Filtering-Correlation-Id: a354a766-57bc-4bc0-83b7-08dab1d8b9fa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xbZ6PxWbO6+bn4eGc/NHvD48ard1izi3mSbpa+iPOunm5JsYeWnwCLNujqoTBHf0A9iRyX069TsrqOCkxHD1sNOEkLWeACMTo05/0cDn2Vg4AJSUxUDZBR/7FwJaDQov2Rm7Jsqa3IiilpHP9A722YmmSUWPCwcvIITS7MpWcokdM6JArvqXomL0NK3A9UMJoOk6patxXiAZefdIZWwMYFlCzuWIFwY1QiiINOmBEmNlEqnMLWtay0QrU7O+Uv3RrGa8D79THAnn9elR1XG1yr5bp/ss7Eay5ar5fFBmd0/RKNhlPxJAK4meaL0GrSchh3uZCxEp1WLgcdoSN+lMjcjhLymEaUbZISQFv3pM371Gn7pJdC1LkIEPK1sFgikKI23K1Fi7RurLURfB1HfgXvdz/3iVYPZ4PTf5DOVszThhzq3pinQ9SMfujdSd6h+9/hUD73Bt8RLjDgolV8kK538oyyvRiDUeYDBxdiZmK8cGgjJveEOqePt+DJibV5ddlsIldFVliALho/jOy0EFCE/9zoAGGv/ndXnTIvGf5aFJgVpP5ypo58xZhUg4N/MWTPEC8x6zsJkIOI2UldafzlJIGld804uyDjskhW1NhFJ+wIsWo+OtOkVW2pUe7dAVuta+Yj2+nd//UdxzCD0oERrvSOph1ZXY2EVL0ex4EenTSXuiFZkUy6vP0aRvA1GVwMqmucScTVaeg+jwFG9F2+hur+foGYx/32PgQJhwkO288FYdNfvt7xbZs95E/zGpejJJaIEut90Bx6IipHnHjQ== 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)(366004)(396003)(136003)(346002)(39860400002)(376002)(451199015)(83380400001)(36756003)(31696002)(86362001)(38100700002)(6666004)(66556008)(316002)(31686004)(5660300002)(44832011)(8936002)(186003)(66476007)(2906002)(6506007)(2616005)(53546011)(66946007)(478600001)(6512007)(6486002)(26005)(41300700001)(4326008)(8676002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?a3BUemQ0a2RGYXhrMWxxS01yM0ZMS0FPSGpFMm8rVFhKbG9DMTR6cElpTFAy?= =?utf-8?B?S00yVDl4enBPb2J0TkZvWW5ucWFDWGt2bXphbVp4ZllETmVOdi9YU1M4czhI?= =?utf-8?B?WXJ0Q25PbHFUK1VZT0Q5bmw1WEhOelNCK2ZXNmNPeHY4Uk1zOGczVElkYk5x?= =?utf-8?B?UDdFOVhUeFY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d00vMlBIdmdwT2NoNTVp?= =?utf-8?B?cUZWNDYwTGs4SGticG5vQ2hwTFZhbENJb2gxUUhMMWdhUlg3Z2M4K1NueGg4?= =?utf-8?B?dXU3T3l6MWdiZm5VN1VqR2UwbnUrclVpY28reUhSTzNZRnlDQlFrN2xrK1ZO?= =?utf-8?Q?k6u5E3RNk937ORX26HtrzdqiV?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: a354a766-57bc-4bc0-83b7-08dab1d8b9fa X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB4297.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2022 13:49:21.9788 (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: bGyWyCywDAQVBG+0PXYrPEpWNl/nQJvqdJ0sOLdLFcgsPor+4zQCObr8Bb6yb9lD X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6931 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/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? > + 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... > + 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?