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 A7A50A00BE; Thu, 10 Feb 2022 14:59:00 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3DCFC42707; Thu, 10 Feb 2022 14:59:00 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 65BD84013F for ; Thu, 10 Feb 2022 14:58:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644501537; x=1676037537; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=cGt7O2Dl1c7pl6Wb4+mkKOvD/0PaFPrbyqb/PgMEmlo=; b=mZUvIsGeaCtwnHgAiOiC+4zCodI0houbzMY78Yh7J+DoYgbHJ4/tFB+W f+Ba1qtTK7xytR6Jzdx0Y7cra3FBuL2UFELWwiOs0V904m+Xf2nhGHRsO wPHp9LZW0JsvXbJdky6YcdK37tzudaHADzq9nefKq1p0YD+HfX5in/q6p KvMCdOqQ0YRLvKPp7Ui4hWfDC2CV6MVyYKJ8wj227PX/sD/3otYeqDcJG bDTeodLVl2o2HGymTcpvpA3lVlwsumeMUjZVkNWNCLzLon9bLjxcGFp85 wFy1Xx2s/Zj20GvqIJuHpscIVFAFEOXmbLzrUzi5lGEODAejPKLseh8Xd Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10253"; a="233054299" X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="233054299" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2022 05:58:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="500401238" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by orsmga002.jf.intel.com with ESMTP; 10 Feb 2022 05:58:56 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 10 Feb 2022 05:58:55 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Thu, 10 Feb 2022 05:58:55 -0800 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.172) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Thu, 10 Feb 2022 05:58:55 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZqzdDrIaM4zyHFaGv/H/TBpZXKgukp9lXYtebfEjnmCglyUJVzHpq/yoQA3zCVwEOFowHbuI4SaNVqhVSAW1iViUS7zv3s1PQDEubCRPLsh5iSKfgDf4UKg4xp1gXgeWB6z2HhDlb2271Jp9wNT9GqL5eFv7PvInMcvZUjH/hOL1t7gb6nfrGpOyDFDAH529q9iKTA2YtWiTTZS/sMEj1/TdmAaYCHRjBMBX47RBkzL2heeDliFiVtNHQvllMf+Gd52tbzFxxeju7g0HjcYd695DHt+9oWX53hUrRxESPOgJi6YaZa//juHjRKkxd3hOpz1EtNCs1Hjlnxz1mdr3nw== 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=57u1tuHwCCYW8fPrb5Am3AA2s6XryZ4FgP+uDq8+oh8=; b=OhWbjj33PajCLc/Alj55jjJs1hhuYgiwaXB3jj18Lsgy7OCmrF0MwsJxCSHNJ/BXUJTpp70gpMQ4ivmInn/v/eZM9as3UFClPDfTowijIMHCZkyyC+IEHfcAADX+5OAw3cStTtuKsioYpYtcwOsyE9vp49lT+HVo5bFBrRkOxpeTEOEzYkhxS6ns5eLq1Q9XInWuc5aUPE0kY5Gol+D2Sqzcj5GNxbpUAyaqBLipQzMeHZ/EZskDNgQN3aIQzwbxqUKp3ksEXyOeVuqXkSb8rhZBrAPvcbb++SCNR9r0b7W5l9IWzVEAvpdLPg6rnaIue5bF0FQNgVYV4PCSLtdtzw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by BN6PR11MB1955.namprd11.prod.outlook.com (2603:10b6:404:100::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.12; Thu, 10 Feb 2022 13:58:52 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::98be:5506:5020:28a2]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::98be:5506:5020:28a2%4]) with mapi id 15.20.4975.011; Thu, 10 Feb 2022 13:58:52 +0000 Message-ID: <65625d88-ec45-80d8-0228-f9605ade18bd@intel.com> Date: Thu, 10 Feb 2022 13:58:43 +0000 Content-Language: en-US To: Shepard Siegel , Ed Czeck , John Miller , "Rasesh Mody" , Shahed Shaikh , Ajit Khaparde , Somnath Kotur , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Hemant Agrawal , "Sachin Saxena" , John Daley , "Hyong Youb Kim" , "Min Hu (Connor)" , "Yisen Zhuang" , Lijun Ou , Matan Azrad , Viacheslav Ovsiienko , "Gagandeep Singh" , Devendra Singh Rawat , Thomas Monjalon , Andrew Rybchenko CC: , Ciara Loftus References: <20220208194437.426143-1-ferruh.yigit@intel.com> From: Ferruh Yigit Subject: Re: [PATCH] ethdev: introduce generic dummy packet burst function X-User: ferruhy In-Reply-To: <20220208194437.426143-1-ferruh.yigit@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LNXP123CA0006.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:d2::18) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 41b4140a-4e25-4074-c0ee-08d9ec9d786b X-MS-TrafficTypeDiagnostic: BN6PR11MB1955:EE_ X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kqDsuA0O3e6evXzxv2tEj4Stz4JxXroH8VoWd3HCXNN6k9Or/N5zVqBqYQmQmTXPrDL+gR+aNnfrKGpMWA4bZrP5e2I134F6Mva1nQ6RFQT9e0zOHo2v/2KgLxwyyupzarSdn8f1HoLXLvc9qAUnTn0FQw5u52EWrmrMJve/AWTFy8RDtXfqSgwr28noC3IkeyOzfnAWXg5+zZwsI0Qzp/Rhs1k8/RL5+ePTqYKTsGI/7U955SuzBvyBpzRewO6ETepZbGKVTTJskub27v3m8OeCPbruJLVzc+B0L8kiH4loBB6Ki5hETMcTgwuHRzY6c6ynKd+i/fXzlqSpUatQljSl/7HffIBIFFucQ/jq+y4Gvp7xkvqw2IdVmy2yijP+DyN7dE1Ed2xLZUCJFnufyF2vHbOp7OslSpCzzdgJFb0ENAERw2b78Tg71F854eb1Od4xIxsQpwINBQslX9SO6o+KCTh4jKbPnhjwxFVNavhkonVlpHqwo4We7zjBGm9zusyQSkRZ/plDNaxVgcj6r+bx2vUz7ddVrjoq6PO5g19jscM14k+4VieXJTjjHr5R4Qagk2djhqjGNJpMwaR1AQ2N1HGLdZrc8s4c1wsLZBQuizKEf/Y4DmTBTxkUK60Fj/rdWyeW2pmjPcnK0UAxZzGzviZ9RbuZzWShLhyELJcc6F/ppIfo/KWcfOBHoN/ksImRhfub+qpt2utswTUHX/95kNG6/aMJsyYwwLy5Dfe81663ZeO5rHRgnO9n7hGv X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(83380400001)(44832011)(6666004)(508600001)(6486002)(7416002)(5660300002)(31686004)(36756003)(2906002)(66476007)(186003)(31696002)(55236004)(66946007)(110136005)(4326008)(66556008)(8936002)(26005)(8676002)(316002)(6512007)(2616005)(82960400001)(38100700002)(86362001)(921005)(107886003)(53546011)(6506007)(41533002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZG5lbEd3WWN6NjhJL1lKVU5ISWluY051dFZMMThBbVhmWFVNN3IvalNidFYw?= =?utf-8?B?MjRZbDVtcEk0MFpUai9KSWhsWGtqTlJBT0ZjYXVmOGlOTitJamxEZll6RlU1?= =?utf-8?B?TC8rZ2lZSDBoaE5rNjJjMXMxaktjRWdiQ3ZEcmtNSjFiU0JrSWkrVENibm43?= =?utf-8?B?c01LSWo1WjQvS2ZHZVV1U21yWUJqVmtPV0QvWW1WbkdQc2N6MnJFZVcwRVVS?= =?utf-8?B?NllVY1p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poSkF6YjBPSUF2VFYyd2NZ?= =?utf-8?B?UHhoMzdjWmVQQllyaWJUaGYwcVd2UzBLZFJ1Q0FkTElNcjAyU1F4MlZzSTFR?= =?utf-8?B?Rkh5akR4aWJvWHR0bTdWeXY2S2RueGU1eUtzVmRXSE5YRG9HK1BnWjNSWmJw?= =?utf-8?Q?iBJ1zE9CmTz2rjTKPdfAssw=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 41b4140a-4e25-4074-c0ee-08d9ec9d786b X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2022 13:58:52.7264 (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: Se6ijsFoTEWoYXGZPyXHyU9NMwZgeSSrYjq7MocKFV19ZpbUb9f+jfbysrdC5xii0o4J7tDwROrGZ0++C9OJ/A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1955 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 On 2/8/2022 7:44 PM, Ferruh Yigit wrote: > diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c > index aecdc5a68abb..bbe05bb837e0 100644 > --- a/drivers/net/mlx5/linux/mlx5_os.c > +++ b/drivers/net/mlx5/linux/mlx5_os.c > @@ -1623,8 +1623,8 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, > DRV_LOG(DEBUG, "port %u MTU is %u", eth_dev->data->port_id, > priv->mtu); > /* Initialize burst functions to prevent crashes before link-up. */ > - eth_dev->rx_pkt_burst = removed_rx_burst; > - eth_dev->tx_pkt_burst = removed_tx_burst; > + eth_dev->rx_pkt_burst = rte_eth_pkt_burst_dummy; > + eth_dev->tx_pkt_burst = rte_eth_pkt_burst_dummy; > eth_dev->dev_ops = &mlx5_dev_ops; > eth_dev->rx_descriptor_status = mlx5_rx_descriptor_status; > eth_dev->tx_descriptor_status = mlx5_tx_descriptor_status; > diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c > index 67eda41a60a5..5571e9067787 100644 > --- a/drivers/net/mlx5/mlx5.c > +++ b/drivers/net/mlx5/mlx5.c > @@ -1559,8 +1559,8 @@ mlx5_dev_close(struct rte_eth_dev *dev) > mlx5_action_handle_flush(dev); > mlx5_flow_meter_flush(dev, NULL); > /* Prevent crashes when queues are still in use. */ > - dev->rx_pkt_burst = removed_rx_burst; > - dev->tx_pkt_burst = removed_tx_burst; > + dev->rx_pkt_burst = rte_eth_pkt_burst_dummy; > + dev->tx_pkt_burst = rte_eth_pkt_burst_dummy; > rte_wmb(); > /* Disable datapath on secondary process. */ > mlx5_mp_os_req_stop_rxtx(dev); > diff --git a/drivers/net/mlx5/mlx5_rx.c b/drivers/net/mlx5/mlx5_rx.c > index f388fcc31395..11ea935d72f0 100644 > --- a/drivers/net/mlx5/mlx5_rx.c > +++ b/drivers/net/mlx5/mlx5_rx.c > @@ -252,7 +252,7 @@ mlx5_rx_queue_count(void *rx_queue) > dev = &rte_eth_devices[rxq->port_id]; > > if (dev->rx_pkt_burst == NULL || > - dev->rx_pkt_burst == removed_rx_burst) { > + dev->rx_pkt_burst == rte_eth_pkt_burst_dummy) { > rte_errno = ENOTSUP; > return -rte_errno; > } Thinking twice I am not sure if above change works. Since function is in the header file, and the .c file that assign the 'dev->rx_pkt_burst' and the .c file that check function pointer are different, these two different instance of same function may have different addresses and above check may fail when it should match. I guess solution is move the function to a .c file and export it internally. I was thinking to add ethdev_driver.c file, perhaps this can be a motivation to start that file. Thomas, Andrew, what do you think about ethdev_driver.c file?