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 B75CD46BE5 for ; Tue, 22 Jul 2025 20:21:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8D0444003C; Tue, 22 Jul 2025 20:21:59 +0200 (CEST) Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) by mails.dpdk.org (Postfix) with ESMTP id B5E8D4003C for ; Tue, 22 Jul 2025 20:21:58 +0200 (CEST) Received: by mail-qk1-f181.google.com with SMTP id af79cd13be357-7e29616cc4fso561005985a.0 for ; Tue, 22 Jul 2025 11:21:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1753208518; x=1753813318; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=J63SIc6kqwpOo8KLLzTVpSU7qFqpgSOiZzY9sFziJc4=; b=HuUduTABBvj7yaogGyGhC8UyNFkBCkhA+BroI5/fACWxcIJtgSeGCxQig5V5UA2/Mp Pe6xeo1WBUnlcM4ZppXgi+x773vxd/gxlDNfVuuxRgX+WtS3+AlpTj60xKW95/4waTuV 7ozRj7QPazslaMMcOu412GC4IsqEQEgkpgBnqv71nQnZAES/a8yoCGoCCdSfnwhl2FB3 JakfaDIPmbpTO4jjYUnj6y5VRyhXVbhF0iWzPAibQ12yQTZ6Hm2DGadxd7U46EqA3QOv d0z5dh3blr3GjRWpdSoCc1GpApgbtkBFCFpaAZoGZH0m2J9W/X4VGjmfR9tACqnYGCwe 1Ajw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753208518; x=1753813318; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J63SIc6kqwpOo8KLLzTVpSU7qFqpgSOiZzY9sFziJc4=; b=TExlt9qGLuIhqlm3K29PFhA+Rs3G1Qo24VIcPZ1U5SjULeHi3zg7HHIJ7eykht1/E0 f7biMfMz5j4Gmkhw5yXdviZ0vojtwuT03DVVdo0Cw/H+H0knfSzQOAiHpVwfWSs1fgV7 b6UeK1Xp0kbpB+ZQj5Ue5leRO21kHiRlMiYHOyrvjkwH1E8KQCbn6g4u6FlbmMVI3mhL 30MrI8JHW7IJMVi+ZYNKOiBiqPAPUw1hVGudw2IjuWJ2yLUJddxeYj2s+k2DOtdtE3/p araj8HT/WkYT5vWsENjbWWpv+cAUCzvOOjnysyWnKmd2hW0ZzemvMmjc692W/uOG1idJ Atfg== X-Forwarded-Encrypted: i=1; AJvYcCWfI7dNDS9B/O1JOmmnyGnGdQrWP+/r9HDKjw9KEi6tHBrX/GHfilxzk4Ms9FXuZvrlnQXFePE=@dpdk.org X-Gm-Message-State: AOJu0Yx0NlouLw+ewPhkFkbmgqjPqn8gzOSmXVkQhZZ02EnYUWnsU5/W aZCSRG/0bDyCQXrMNuXDWEo7yKtgn3UoCjLzdCUlqJY6OHS0uxL2SI+0fPZU69yw+PU= X-Gm-Gg: ASbGncvJX9Sff/xQhaHml/hkaN+1l16XtbLok3E1Ud06BTFXW2JIvcSJNq55kUTS5VK U/xae+s240I5a0NFP5mvA0Ghr+0iLM8m5IZ3ovzGRTqLyAM1mqmT0lV0az0n8hzj9DCYoXv9FwD jycvq9dxfCDqrQxGhc+q5W6txAfNVb9ZvBfHSelxqTSiyk+vS86LNuWbg6UzvuaOjpwLrUvuiNy HWvO/1Tqpuj+J7mnER9nKR6ZufOsnf0VUEU0weSqfZDQlGYdc7NO/uJInukKk6uGOVal0QlMpBe DXeeu96h8QsElXUvbcEQ7G+KDl/Gsi0Swk+KPSbUJmN3hYcseVezATLkoPCcRXJ2qOGfg1f9kNj g1FkQaPl6reG4NbKEW0sHhBCnXaWVOsXUXXJ/T0HUyk/sesay0yxpVXH+Lkzv+AxnVxqCfydqa+ Q= X-Google-Smtp-Source: AGHT+IEUOMz2foHMNMG++/i+UyBquz9CBdu4+GWWtyUcNCYBy5eMYLDgsQYcV+DUtuft3bIDs2rvBg== X-Received: by 2002:a05:620a:aa1b:b0:7dd:f63c:b195 with SMTP id af79cd13be357-7e62a1a43e2mr38399285a.32.1753208517812; Tue, 22 Jul 2025 11:21:57 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7e356a0732dsm568022585a.0.2025.07.22.11.21.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Jul 2025 11:21:57 -0700 (PDT) Date: Tue, 22 Jul 2025 11:21:54 -0700 From: Stephen Hemminger To: Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk> Cc: Bruce Richardson , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , dev@dpdk.org, dpdk stable Subject: Re: [PATCH] lib/ethdev: fix segfault in secondary process by validating dev_private pointer Message-ID: <20250722112154.78349c82@hermes.local> In-Reply-To: References: <20250722115439.1353573-1-14pwcse1224@uetpeshawar.edu.pk> <20250722063924.2f87f3f7@hermes.local> <20250722084225.7a40e2bc@hermes.local> <20250722103824.7c9db0a0@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Tue, 22 Jul 2025 22:53:08 +0500 Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk> wrote: > Right, but performance and reliability are both important. While DPDK > rightly prioritizes performance, some level of reliability should still be > ensured, especially to catch known issues that could lead to instability. > > On Tue, Jul 22, 2025, 22:38 Stephen Hemminger > wrote: > > > On Tue, 22 Jul 2025 22:04:32 +0500 > > Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk> wrote: > > > > > Agree, but I think it's also a good practice to guard against known cases > > > that are prone to crashes. > > > > > > Right but DPDK chooses performance over API safety. > > For example rx/tx burst doesn't check args. > > > > The point is that as a library, if application is doing something wrong > > returning error doesn't always help. > > The problem is that all those values dev->data and private are shared between processes without any locking. If the API's are going to MP safe then they would require locking. The DPDK has made an explicit decision to not use locking in ethdev control or data path. You can get away with checking for dev->data being NULL on x86 where there is data consistency. But on weakly ordered platforms that is not going to work.