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 C4606A00C2; Thu, 10 Feb 2022 10:00:09 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 560794013F; Thu, 10 Feb 2022 10:00:09 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 5BC5D40041 for ; Thu, 10 Feb 2022 10:00:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644483607; x=1676019607; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=yvPZJkRf+XQ3cvHm3LYn/0JNUAIqcxHjsRMjSvExZ8g=; b=GNV0nhLPToLzxbf5N0Av1bkpQaaYD+OPSIk3kG4akTuVDRdlxUdpPInP ppgpTMhy6KKhX4eiFZ8/4rzB50EAUU2S7jzaA3MfCLeELdmaHlZIDkj1G 456533bMpZ7homnxuc1p8MdGvSbNLcd4sfrhxi1u3sf6rkJFVbXf6ULg6 Rwhm0nr/ZUMNEZOX55DI4jIorXKkv4DPbZ+oC2UZmFG4rogb/nqP66ue0 fH6wP7DysdcuddawtluG9p+RLlAJM0BpLoEN2uZ0pOzkef474e0zUwL9M BxBGhj9CEOgODRb9J/KtWnyACASuFnkRF4BSmjLRM/RoAKaYcJgmp8HDS g==; X-IronPort-AV: E=McAfee;i="6200,9189,10253"; a="310185043" X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="310185043" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2022 01:00:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="541521826" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga008.jf.intel.com with ESMTP; 10 Feb 2022 01:00:05 -0800 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx605.amr.corp.intel.com (10.18.126.85) 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 01:00:05 -0800 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx608.amr.corp.intel.com (10.18.126.88) 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 01:00:04 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx608.amr.corp.intel.com (10.18.126.88) 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 01:00:04 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.49) by edgegateway.intel.com (192.55.55.70) 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 01:00:03 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IFQZ3ez0LpjHMxwZIX5j6iH5qyPujG99EcAgZt3gCg5FLaTF23rQhEwrOZoRoE/A2XKT1+eeZdV+3thUxEH5R4U+3oQP2tDh1+A2QwmcUPR0Q8l+OvnhxUuESQO7gTLgTMz8NDWVYZucIUzrJdxbGhaSgCNiVbAXWucTtOFNmED7scR1n3ECK9neiHMeGmmFT5V9S4YjxCLDqR2jivFmazc+4CkV0rZuSCjwmYWVD0BsQ6IwA+0zPMtGgDbpM22+wH4/5Z4g/oyjYPpe+d3mvmiNiuOsuTzPcVF/MPnHF88/oLxPCMnN4B67sJd22/KBNt/FFXkwfg22ZJLSAMHKwg== 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=Ox+eO11uw1C0T3gUWNmfXbh52Q+bVYb/UPytn3QYm4U=; b=aDQk9Mzuu+tRx55aarkydOO37qNue+0jEitLmUpPKBLZAZE6uiDAwDwc5BUjNvJ5I+KbzRb19ltTbLQRV2TG4Dg7PPY1oNeSYYkiC6HOZuiFWbUMVSajezcQVRdvsjqiezUnwp+uRClqqz8J7qhsjocNkufgpNs4hBs+UTxpz6vGCeyb0wMUksmSp9A8L+7cMXwHtMMQ8unHRql7d30wY/08QOfNnvQgQYK0Dxl4YsC1G1q3yUwxm625PWDUilmz0fyWeZqBixCUjhqt+m83ypxstafgHsGw6Iuj6lJ7ErjWNb5/waWi8Ea8pN6a8KKzw9sSSWAJztlOO5UrB5Ua9A== 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 BN6PR11MB1474.namprd11.prod.outlook.com (2603:10b6:405:c::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Thu, 10 Feb 2022 09:00:01 +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 09:00:01 +0000 Message-ID: <5ab2d11f-f52d-47b8-093a-a68fb1420f68@intel.com> Date: Thu, 10 Feb 2022 08:59:52 +0000 Content-Language: en-US To: "Loftus, Ciara" , 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" , "Daley, John" , "Hyong Youb Kim" , "Min Hu (Connor)" , "Yisen Zhuang" , Lijun Ou , Matan Azrad , Viacheslav Ovsiienko , Gagandeep Singh , Devendra Singh Rawat , Thomas Monjalon , "Andrew Rybchenko" CC: "dev@dpdk.org" 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: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0363.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18e::8) 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: 872dfd75-4a28-4eb8-e46d-08d9ec73b8aa X-MS-TrafficTypeDiagnostic: BN6PR11MB1474:EE_ X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3826; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oYBqU2zqZ9MBZvKNS33H4MYZ0xSR/gwyB+BUsYecldt7wNLlNxURcP/XTQ4//aaf6cc+VdN0qXm0NncVTaLejfPnCVqIfiDJDD8a3z/we+gWgj95gy06n1LAyGYaXGKvPVLHUa1Tvx/b4E9h9Ncdb4GLs92jMjQ2+y/dZj3e3plKEaq+CvxLI3duJmZMWTxtfuGa6stGODwL0ic+mfYhyCTeU3om0h9T6DpXTTAYOsZpJK8pKG/QtUEzSp/5jg5bOb+r3JGssdxgrHPAbktQqfIXiVCRBLh5ZvYmu0ytB7oP5ZCIwUVpKQ0zNPaUlP4P85HodGJL7n8hkIBBgLP5yPa0kgjaRzr/37zeNZftFPg1oKzvddbN8SBkLHmd9LTCrLWF99Q64IGaGjDZ5DTu443cFatucVEChCzy1WIzj5kv7MK51ddqODiGqbTTHPSLNHhOnHz8p//SkNIwP2sx7f+xeztjB7nSYp1uI+gYpfeC1E5V6zrpP5T3F0J9bNaMHfQnQb7E3gzwCjnXeZn+9i/2eeQXb+AKG08Q+YjRIgQvEB0O3QyzA8HSfJitGjjffcY2dst+9Dp+FuGA2TVCIkLIJI6gTL/msKUA27kmbDmamZdv+LWSha1BzhHikhUz9d90Mz1N43NU12RITW3SLhimgsnHvbiIaQQteb0eVuuf/JRFjIhdMPfmK7FqbM2FhP45Mni2M221kORVJlJhHN22xuK+Nf9Yna1GaJn7ubfCYwpL5ToZAlh9a0RukQ5S 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)(44832011)(26005)(186003)(38100700002)(2616005)(53546011)(55236004)(30864003)(2906002)(6506007)(316002)(921005)(86362001)(110136005)(66556008)(66476007)(4326008)(8676002)(5660300002)(8936002)(31686004)(66946007)(6486002)(6512007)(83380400001)(7416002)(6666004)(82960400001)(508600001)(36756003)(31696002)(41533002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Wm02QTVKWi9odURGVG5CdVc0TzRnOU9VYnpPb0pWaEtUSVA4TjYreUdvRDFS?= =?utf-8?B?b3lVQmVmekJNUm5BMkU5QTFwMFRsQTZueEVhSjhlbGtMY0F6ZXFZMUJFYmRX?= =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QZklhdEJkYXgybkFwRjhlMWxF?= =?utf-8?B?STE1ZElqTUlMN3BQL2hkSmdmc3BhaEdwMGRLaVFyL01hSU1RZjB3R0ZaT2J6?= =?utf-8?B?SjFYSFFjWDhjbnZ0SGtKNHNHTjF0YS9wYTNHSW9ZNVc4RFpUUTJCRXVKd3c5?= =?utf-8?B?amtFWnNTRDRaU29tYTUyeElSTlR0NXlIRnlnd09ubWxucDd4ckZReExFNEhI?= =?utf-8?B?R1JibCtYY0lpK3pVZVcxRjlJVGxsckpvakZtZHFWT2NHN2VLL1hQTVRsams3?= =?utf-8?Q?2FIwgMQm3SJxeJbv3xavcos=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 872dfd75-4a28-4eb8-e46d-08d9ec73b8aa X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2022 09:00:01.6830 (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: 34mtsh8fNX+0OdvaC7NuO+TlUMCFmsqWZg+AgLTCeWiUaV/MdLGENUoeMJVHQiBwgYJZI2KMwpsFJBJOW8B3Cw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1474 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/10/2022 7:38 AM, Loftus, Ciara wrote: >> Subject: [PATCH] ethdev: introduce generic dummy packet burst function >> >> Multiple PMDs have dummy/noop Rx/Tx packet burst functions. >> >> These dummy functions are very simple, introduce a common function in >> the ethdev and update drivers to use it instead of each driver having >> its own functions. >> >> Signed-off-by: Ferruh Yigit >> --- >> Cc: Ciara Loftus >> --- > > [snip] > >> diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c >> index 3f3c4a7c7214..910b76a92c42 100644 >> --- a/drivers/net/mlx4/mlx4.c >> +++ b/drivers/net/mlx4/mlx4.c >> @@ -350,8 +350,8 @@ mlx4_dev_stop(struct rte_eth_dev *dev) >> return 0; >> DEBUG("%p: detaching flows from all RX queues", (void *)dev); >> priv->started = 0; >> - dev->tx_pkt_burst = mlx4_tx_burst_removed; >> - dev->rx_pkt_burst = mlx4_rx_burst_removed; >> + dev->tx_pkt_burst = rte_eth_pkt_burst_dummy; >> + dev->rx_pkt_burst = rte_eth_pkt_burst_dummy; >> rte_wmb(); >> /* Disable datapath on secondary process. */ >> mlx4_mp_req_stop_rxtx(dev); >> @@ -383,8 +383,8 @@ mlx4_dev_close(struct rte_eth_dev *dev) >> DEBUG("%p: closing device \"%s\"", >> (void *)dev, >> ((priv->ctx != NULL) ? priv->ctx->device->name : "")); >> - dev->rx_pkt_burst = mlx4_rx_burst_removed; >> - dev->tx_pkt_burst = mlx4_tx_burst_removed; >> + 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. */ >> mlx4_mp_req_stop_rxtx(dev); >> diff --git a/drivers/net/mlx4/mlx4_mp.c b/drivers/net/mlx4/mlx4_mp.c >> index 8fcfb5490ee9..1da64910aadd 100644 >> --- a/drivers/net/mlx4/mlx4_mp.c >> +++ b/drivers/net/mlx4/mlx4_mp.c >> @@ -150,8 +150,8 @@ mp_secondary_handle(const struct rte_mp_msg >> *mp_msg, const void *peer) >> break; >> case MLX4_MP_REQ_STOP_RXTX: >> INFO("port %u stopping datapath", dev->data->port_id); >> - dev->tx_pkt_burst = mlx4_tx_burst_removed; >> - dev->rx_pkt_burst = mlx4_rx_burst_removed; >> + dev->tx_pkt_burst = rte_eth_pkt_burst_dummy; >> + dev->rx_pkt_burst = rte_eth_pkt_burst_dummy; >> rte_mb(); >> mp_init_msg(dev, &mp_res, param->type); >> res->result = 0; >> diff --git a/drivers/net/mlx4/mlx4_rxtx.c b/drivers/net/mlx4/mlx4_rxtx.c >> index ed9e41fcdea9..059e432a63fc 100644 >> --- a/drivers/net/mlx4/mlx4_rxtx.c >> +++ b/drivers/net/mlx4/mlx4_rxtx.c >> @@ -1338,55 +1338,3 @@ mlx4_rx_burst(void *dpdk_rxq, struct rte_mbuf >> **pkts, uint16_t pkts_n) >> rxq->stats.ipackets += i; >> return i; >> } >> - >> -/** >> - * Dummy DPDK callback for Tx. >> - * >> - * This function is used to temporarily replace the real callback during >> - * unsafe control operations on the queue, or in case of error. >> - * >> - * @param dpdk_txq >> - * Generic pointer to Tx queue structure. >> - * @param[in] pkts >> - * Packets to transmit. >> - * @param pkts_n >> - * Number of packets in array. >> - * >> - * @return >> - * Number of packets successfully transmitted (<= pkts_n). >> - */ >> -uint16_t >> -mlx4_tx_burst_removed(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t >> pkts_n) >> -{ >> - (void)dpdk_txq; >> - (void)pkts; >> - (void)pkts_n; >> - rte_mb(); > > The mlx4 and mlx5 PMDs lose a call to rte_mb() when switching over to the new dummy functions. Maybe the maintainer can comment on whether that's an issue or not? Other than that LGTM. > I wasn't also sure why dummy Rx/Tx needs meeory barrier. Matan, Slava, can you please comment? > Ciara > >> - return 0; >> -} >> - >> -/** >> - * Dummy DPDK callback for Rx. >> - * >> - * This function is used to temporarily replace the real callback during >> - * unsafe control operations on the queue, or in case of error. >> - * >> - * @param dpdk_rxq >> - * Generic pointer to Rx queue structure. >> - * @param[out] pkts >> - * Array to store received packets. >> - * @param pkts_n >> - * Maximum number of packets in array. >> - * >> - * @return >> - * Number of packets successfully received (<= pkts_n). >> - */ >> -uint16_t >> -mlx4_rx_burst_removed(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t >> pkts_n) >> -{ >> - (void)dpdk_rxq; >> - (void)pkts; >> - (void)pkts_n; >> - rte_mb(); >> - return 0; >> -} >> diff --git a/drivers/net/mlx4/mlx4_rxtx.h b/drivers/net/mlx4/mlx4_rxtx.h >> index 83e9534cd0a7..70f3cd868058 100644 >> --- a/drivers/net/mlx4/mlx4_rxtx.h >> +++ b/drivers/net/mlx4/mlx4_rxtx.h >> @@ -149,10 +149,6 @@ uint16_t mlx4_tx_burst(void *dpdk_txq, struct >> rte_mbuf **pkts, >> uint16_t pkts_n); >> uint16_t mlx4_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, >> uint16_t pkts_n); >> -uint16_t mlx4_tx_burst_removed(void *dpdk_txq, struct rte_mbuf **pkts, >> - uint16_t pkts_n); >> -uint16_t mlx4_rx_burst_removed(void *dpdk_rxq, struct rte_mbuf **pkts, >> - uint16_t pkts_n); >> >> /* mlx4_txq.c */ >> >> diff --git a/drivers/net/mlx5/linux/mlx5_mp_os.c >> b/drivers/net/mlx5/linux/mlx5_mp_os.c >> index c448a3e9eb87..e607089e0e20 100644 >> --- a/drivers/net/mlx5/linux/mlx5_mp_os.c >> +++ b/drivers/net/mlx5/linux/mlx5_mp_os.c >> @@ -192,8 +192,8 @@ struct rte_mp_msg mp_res; >> break; >> case MLX5_MP_REQ_STOP_RXTX: >> DRV_LOG(INFO, "port %u stopping datapath", dev->data- >>> port_id); >> - 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_mb(); >> mp_init_msg(&priv->mp_id, &mp_res, param->type); >> res->result = 0; >> 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; >> } >> @@ -1153,31 +1153,6 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct >> rte_mbuf **pkts, uint16_t pkts_n) >> return i; >> } >> >> -/** >> - * Dummy DPDK callback for RX. >> - * >> - * This function is used to temporarily replace the real callback during >> - * unsafe control operations on the queue, or in case of error. >> - * >> - * @param dpdk_rxq >> - * Generic pointer to RX queue structure. >> - * @param[out] pkts >> - * Array to store received packets. >> - * @param pkts_n >> - * Maximum number of packets in array. >> - * >> - * @return >> - * Number of packets successfully received (<= pkts_n). >> - */ >> -uint16_t >> -removed_rx_burst(void *dpdk_rxq __rte_unused, >> - struct rte_mbuf **pkts __rte_unused, >> - uint16_t pkts_n __rte_unused) >> -{ >> - rte_mb(); >> - return 0; >> -} >> - >> /* >> * Vectorized Rx routines are not compiled in when required vector >> instructions >> * are not supported on a target architecture. >> diff --git a/drivers/net/mlx5/mlx5_rx.h b/drivers/net/mlx5/mlx5_rx.h >> index cb5d51340db7..7e417819f7e8 100644 >> --- a/drivers/net/mlx5/mlx5_rx.h >> +++ b/drivers/net/mlx5/mlx5_rx.h >> @@ -275,8 +275,6 @@ __rte_noinline int mlx5_rx_err_handle(struct >> mlx5_rxq_data *rxq, uint8_t vec); >> void mlx5_mprq_buf_free(struct mlx5_mprq_buf *buf); >> uint16_t mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, >> uint16_t pkts_n); >> -uint16_t removed_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, >> - uint16_t pkts_n); >> int mlx5_rx_descriptor_status(void *rx_queue, uint16_t offset); >> uint32_t mlx5_rx_queue_count(void *rx_queue); >> void mlx5_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, >> diff --git a/drivers/net/mlx5/mlx5_trigger.c >> b/drivers/net/mlx5/mlx5_trigger.c >> index 74c9c0a4fff8..3a59237b1a7a 100644 >> --- a/drivers/net/mlx5/mlx5_trigger.c >> +++ b/drivers/net/mlx5/mlx5_trigger.c >> @@ -1244,8 +1244,8 @@ mlx5_dev_stop(struct rte_eth_dev *dev) >> >> dev->data->dev_started = 0; >> /* 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_tx.c b/drivers/net/mlx5/mlx5_tx.c >> index fd2cf2096753..8453b2701a9f 100644 >> --- a/drivers/net/mlx5/mlx5_tx.c >> +++ b/drivers/net/mlx5/mlx5_tx.c >> @@ -135,31 +135,6 @@ mlx5_tx_error_cqe_handle(struct mlx5_txq_data >> *__rte_restrict txq, >> return 0; >> } >> >> -/** >> - * Dummy DPDK callback for TX. >> - * >> - * This function is used to temporarily replace the real callback during >> - * unsafe control operations on the queue, or in case of error. >> - * >> - * @param dpdk_txq >> - * Generic pointer to TX queue structure. >> - * @param[in] pkts >> - * Packets to transmit. >> - * @param pkts_n >> - * Number of packets in array. >> - * >> - * @return >> - * Number of packets successfully transmitted (<= pkts_n). >> - */ >> -uint16_t >> -removed_tx_burst(void *dpdk_txq __rte_unused, >> - struct rte_mbuf **pkts __rte_unused, >> - uint16_t pkts_n __rte_unused) >> -{ >> - rte_mb(); >> - return 0; >> -} >> - >> /** >> * Update completion queue consuming index via doorbell >> * and flush the completed data buffers. >> diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h >> index 099e72935a3a..31eb0a1ce28e 100644 >> --- a/drivers/net/mlx5/mlx5_tx.h >> +++ b/drivers/net/mlx5/mlx5_tx.h >> @@ -221,8 +221,6 @@ void mlx5_txq_dynf_timestamp_set(struct >> rte_eth_dev *dev); >> >> /* mlx5_tx.c */ >> >> -uint16_t removed_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, >> - uint16_t pkts_n); >> void mlx5_tx_handle_completion(struct mlx5_txq_data *__rte_restrict txq, >> unsigned int olx __rte_unused); >> int mlx5_tx_descriptor_status(void *tx_queue, uint16_t offset); >> diff --git a/drivers/net/mlx5/windows/mlx5_os.c >> b/drivers/net/mlx5/windows/mlx5_os.c >> index ac0af0ff7d43..7f3532426f1f 100644 >> --- a/drivers/net/mlx5/windows/mlx5_os.c >> +++ b/drivers/net/mlx5/windows/mlx5_os.c >> @@ -574,8 +574,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/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c >> index edf32aa70da6..c2991ab1ccaa 100644 >> --- a/drivers/net/pfe/pfe_ethdev.c >> +++ b/drivers/net/pfe/pfe_ethdev.c >> @@ -235,22 +235,6 @@ pfe_xmit_pkts(void *tx_queue, struct rte_mbuf >> **tx_pkts, uint16_t nb_pkts) >> return nb_pkts; >> } >> >> -static uint16_t >> -pfe_dummy_xmit_pkts(__rte_unused void *tx_queue, >> - __rte_unused struct rte_mbuf **tx_pkts, >> - __rte_unused uint16_t nb_pkts) >> -{ >> - return 0; >> -} >> - >> -static uint16_t >> -pfe_dummy_recv_pkts(__rte_unused void *rxq, >> - __rte_unused struct rte_mbuf **rx_pkts, >> - __rte_unused uint16_t nb_pkts) >> -{ >> - return 0; >> -} >> - >> static int >> pfe_eth_open(struct rte_eth_dev *dev) >> { >> @@ -383,8 +367,8 @@ pfe_eth_stop(struct rte_eth_dev *dev/*, int >> wake*/) >> gemac_disable(priv->EMAC_baseaddr); >> gpi_disable(priv->GPI_baseaddr); >> >> - dev->rx_pkt_burst = &pfe_dummy_recv_pkts; >> - dev->tx_pkt_burst = &pfe_dummy_xmit_pkts; >> + dev->rx_pkt_burst = rte_eth_pkt_burst_dummy; >> + dev->tx_pkt_burst = rte_eth_pkt_burst_dummy; >> >> return 0; >> } >> diff --git a/drivers/net/qede/qede_ethdev.c >> b/drivers/net/qede/qede_ethdev.c >> index a1122a297e6b..ea6b71f09355 100644 >> --- a/drivers/net/qede/qede_ethdev.c >> +++ b/drivers/net/qede/qede_ethdev.c >> @@ -322,8 +322,8 @@ qede_assign_rxtx_handlers(struct rte_eth_dev *dev, >> bool is_dummy) >> bool use_tx_offload = false; >> >> if (is_dummy) { >> - dev->rx_pkt_burst = qede_rxtx_pkts_dummy; >> - dev->tx_pkt_burst = qede_rxtx_pkts_dummy; >> + dev->rx_pkt_burst = rte_eth_pkt_burst_dummy; >> + dev->tx_pkt_burst = rte_eth_pkt_burst_dummy; >> return; >> } >> >> diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c >> index 7088c57b501d..85784f4a82a6 100644 >> --- a/drivers/net/qede/qede_rxtx.c >> +++ b/drivers/net/qede/qede_rxtx.c >> @@ -2734,15 +2734,6 @@ qede_xmit_pkts_cmt(void *p_fp_cmt, struct >> rte_mbuf **tx_pkts, uint16_t nb_pkts) >> return eng0_pkts + eng1_pkts; >> } >> >> -uint16_t >> -qede_rxtx_pkts_dummy(__rte_unused void *p_rxq, >> - __rte_unused struct rte_mbuf **pkts, >> - __rte_unused uint16_t nb_pkts) >> -{ >> - return 0; >> -} >> - >> - >> /* this function does a fake walk through over completion queue >> * to calculate number of BDs used by HW. >> * At the end, it restores the state of completion queue. >> diff --git a/drivers/net/qede/qede_rxtx.h b/drivers/net/qede/qede_rxtx.h >> index 11ed1d9b9c50..013a4a07c716 100644 >> --- a/drivers/net/qede/qede_rxtx.h >> +++ b/drivers/net/qede/qede_rxtx.h >> @@ -272,9 +272,6 @@ uint16_t qede_recv_pkts_cmt(void *p_rxq, struct >> rte_mbuf **rx_pkts, >> uint16_t >> qede_recv_pkts_regular(void *p_rxq, struct rte_mbuf **rx_pkts, >> uint16_t nb_pkts); >> -uint16_t qede_rxtx_pkts_dummy(void *p_rxq, >> - struct rte_mbuf **pkts, >> - uint16_t nb_pkts); >> >> int qede_start_queues(struct rte_eth_dev *eth_dev); >> >> diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h >> index 8f0ac0adf0ae..075f97a4b37a 100644 >> --- a/lib/ethdev/ethdev_driver.h >> +++ b/lib/ethdev/ethdev_driver.h >> @@ -1432,6 +1432,25 @@ rte_eth_linkstatus_get(const struct rte_eth_dev >> *dev, >> *dst = __atomic_load_n(src, __ATOMIC_SEQ_CST); >> } >> >> +/** >> + * @internal >> + * Dummy DPDK callback for Rx/Tx packet burst. >> + * >> + * @param queue >> + * Pointer to Rx/Tx queue >> + * @param pkts >> + * Packet array >> + * @param nb_pkts >> + * Number of packets in packet array >> + */ >> +static inline uint16_t >> +rte_eth_pkt_burst_dummy(void *queue __rte_unused, >> + struct rte_mbuf **pkts __rte_unused, >> + uint16_t nb_pkts __rte_unused) >> +{ >> + return 0; >> +} >> + >> /** >> * Allocate an unique switch domain identifier. >> * >> -- >> 2.34.1 >