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 8E21243B79; Thu, 7 Mar 2024 09:22:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5CAF5427D8; Thu, 7 Mar 2024 09:22:36 +0100 (CET) Received: from fout6-smtp.messagingengine.com (fout6-smtp.messagingengine.com [103.168.172.149]) by mails.dpdk.org (Postfix) with ESMTP id 37770402F2 for ; Thu, 7 Mar 2024 09:22:34 +0100 (CET) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.nyi.internal (Postfix) with ESMTP id B919113800A0; Thu, 7 Mar 2024 03:22:33 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 07 Mar 2024 03:22:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1709799753; x=1709886153; bh=/3eYRU+9pm6KtDB/c0YX97bUFEbUoLziCCY1Goiiyws=; b= 3sJgAy8CuGnz6pN/sG0V1ftal9mK91D21KLcLcPKfof+I8jRRE31Pj8nC4Hv4vy/ /3BSOx1uw3+zYijCkpZjjbXpR/hEA+eV/CYwzEiL2ktTpYQSqzU1NO8bhc+pcKl3 xKIG//nupw18q8sAcciAN/AT39X7/vhCKe/Mr5JwMVhuDB6i+4cW+Ea1Dka4CYx+ kEz2cTu83C9dwAFdcqT9pgi/8mACedS6LZk9K6pO11hGeMz7gv8dVcpiT4AW20sB lziA4UKHKHr4Xda3OCMkwbKX2MacSefcPGJ3mrYcWM4tEUVFO4wVien9Ac3ROZ+d xiQ9DohG87O4ZIzdf2RDqw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1709799753; x= 1709886153; bh=/3eYRU+9pm6KtDB/c0YX97bUFEbUoLziCCY1Goiiyws=; b=e i2P6TsDpmJTzLVekcI8BxeL3wxWw3EvHkFwHMBkUjP9oFjG6suc4L47Cm3Qu9LNx /Idfak+U8kFvX9xS5iY0WVu9EYvWGWLR3wnSHXVZhi6r3cCfc9p5P3FFoOETzDyQ ZYmYpnXM6Q5uaUVBRC+LGPB0pqf6b1zGtjbqew9Gdo01m2L2EqEN2QSZnmlJfFIw GW7REOhnmQ4tbxF2ndYwQUGRVKVgFvDZHx/vg+uGhpxFOddRwl1ZjjdFJuFtY4t/ rKounULjYxNoSCOIxDayJWZnB6PQUsUOLfPc0YJjUzhb0YLPqHXrH9/PtuZlsh4z T6bRiS5PMnlyIgQPiWcEw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledriedvgdduudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedtjeeiieefhedtfffgvdelteeufeefheeujefgueetfedttdei kefgkeduhedtgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 7 Mar 2024 03:22:32 -0500 (EST) From: Thomas Monjalon To: Qian Hao Cc: "dev@dpdk.org" , Volodymyr Fialko Subject: Re: [EXT] [PATCH v3] examples/packet_ordering: fix segfault in disable_reorder mode Date: Thu, 07 Mar 2024 09:22:30 +0100 Message-ID: <1795568.5KxKD5qtyk@thomas> In-Reply-To: References: <20231213104945.16634-1-qi_an_hao@126.com> <20231213110718.18859-1-qi_an_hao@126.com> 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 > > The packet_ordering example works in two modes (opt via --disable-reorder): > > - When reorder is enabled: rx_thread - N*worker_thread - send_thread > > - When reorder is disabled: rx_thread - N*worker_thread - tx_thread N parallel worker_thread(s) > > generate out-of-order packets. > > > > When reorder is enabled, send_thread uses sequence number generated in rx_thread (L459) to > > enforce packet ordering. Otherwise rx_thread just sends any packet it receives. > > > > rx_thread writes sequence number into a dynamic field, which is only registered by calling > > rte_reorder_create() (Line 741) when reorder is enabled. However, rx_thread marks sequence > > number onto each packet no matter whether reorder is enabled, overwriting the leading bytes in > > packet mbufs when reorder is disabled, resulting in segfaults when PMD tries to DMA packets. > > > > `if (!disable_reorder_flag) {...}` is added in rx_thread to fix the bug. > > The test is inlined by the compiler to prevent any performance loss. > > > > Signed-off-by: Qian Hao > > Acked-by: Volodymyr Fialko Applied, thanks.