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 02854A00BE; Thu, 10 Feb 2022 19:40:26 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BF48E40140; Thu, 10 Feb 2022 19:40:26 +0100 (CET) Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) by mails.dpdk.org (Postfix) with ESMTP id DD8D84013F for ; Thu, 10 Feb 2022 19:40:24 +0100 (CET) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 1DFC55801FE; Thu, 10 Feb 2022 13:40:24 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 10 Feb 2022 13:40:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; bh=Xia21YWWShyFqo y0vrfLF8nMyd/aAh12QdgGtfE99Nc=; b=pqI/4GMkDk2OINtBiLxvq1Lnxi/hNN KFyVFEVvPTuSSdlRc/aYjxazdxRzB4YDS6WMnwxRReP77pWWtGyvJuyRCFhe0dLj KCjyvyBdRwOdUYAsurFN3X4jna+A2xV7hHwCf/3REnzrnueN2z0NvWKGSSRgo+6N LCysl0CTeQi4fHwQczWm53IMMF3g22TpyT8VLgfPvURN9eRS4yFoYX7aIc1g88am D9rANqwW9MV4bpOE8sT9SvJAsfgR+y0goqUi08XU1Pjdbf/jH2LuokRTDrFLkQV+ xKKDoniVQTQypBy9l7P5zmPz16SS4hekYElOUYA4wDm7rOXzePB7E3lw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=Xia21YWWShyFqoy0vrfLF8nMyd/aAh12QdgGtfE99 Nc=; b=ooLLL1vXggyuRClT24aVt1X+EV87z2ry9KJjSuw2iVFDPmnp/0MNUxaFT qaxRm5rJ+nWjjOb9kA2eI5p6ylmAjSJVJL01si9isTJH15I2+CKgadZNIzRSEFzV fs47bj9Yd+qq6TBmp9K4mScWSEM7nwBN/q7cI2XqntkuqsC4qXBDHYvHwbNpIIaM WwkhCnj/5EDLoMVxpEor8AaXgzZOSoCCTkjJZE9oA4d0Q2kZQEPbG7wk8V4vUz5K cFf/flJMSEAM7zaR0dEHK0P88U6Pyba/Ya9dPkDKz6r87kJGzZLgMvvW+0W0h3cH JdQJsNQdk3MjMV+ZH7/PAjgRtnjQQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddriedugdduudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 10 Feb 2022 13:40:20 -0500 (EST) From: Thomas Monjalon To: Ferruh Yigit , Stephen Hemminger Cc: 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 , Andrew Rybchenko , dev@dpdk.org, Ciara Loftus Subject: Re: [PATCH] ethdev: introduce generic dummy packet burst function Date: Thu, 10 Feb 2022 19:40:19 +0100 Message-ID: <6278839.K2JlShyGXD@thomas> In-Reply-To: <20220210083020.028303f3@hermes.local> References: <20220208194437.426143-1-ferruh.yigit@intel.com> <65625d88-ec45-80d8-0228-f9605ade18bd@intel.com> <20220210083020.028303f3@hermes.local> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 10/02/2022 17:30, Stephen Hemminger: > On Thu, 10 Feb 2022 13:58:43 +0000 > Ferruh Yigit wrote: > > On 2/8/2022 7:44 PM, Ferruh Yigit wrote: > > > --- 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? > > Right putting it the header file ends up with multiple copies of same > code compiled into each driver. I'm OK with introducing such .c file.