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 D0D1C45D10; Thu, 12 Dec 2024 19:05:32 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 68C0F4027D; Thu, 12 Dec 2024 19:05:32 +0100 (CET) Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by mails.dpdk.org (Postfix) with ESMTP id C8CFA40269 for ; Thu, 12 Dec 2024 19:05:29 +0100 (CET) Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-725f4623df7so766151b3a.2 for ; Thu, 12 Dec 2024 10:05:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1734026729; x=1734631529; 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=w/qgaL7uXdP7t0HWrMQxVF1+nIBf03d1hxZhCk+mItM=; b=HwXJXb5KnQcspAUYj70tswd74rCQv2RE49kHzTz07nMJJN1TfXVrxmNR125wi6tfri zr+ARqSe0cVezv0R5UO2/JFAdep9AOHzrK9ZRGzQHOnaYoPiCjvrM2flqm75xNvboI3N nIPa3gqDnByMpuZWb0wF5jlUe7cS3EPbKRNFcBH2t22JtZfG4JgZsoV0d7IBrpC9jxov 72pX8XEfvYX1rRgF31Wb0IvIS5CsUSOCv0KLAfiq10FYPqx8NHPNnP2CGZIdgGkcsKPf FYRAPKRXcJSbUzX7Fa/jNf9Y+8raeGBvGRahcTmn0i6AF/9yZ2qecTw5GLpTGQ+qpHiN IX1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734026729; x=1734631529; 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=w/qgaL7uXdP7t0HWrMQxVF1+nIBf03d1hxZhCk+mItM=; b=MPwsYlrLWq5bbT3GqdnXIkjB9dFj7j9KaeUWJeh17+eUS4Cs34f+VDU/LdzIbKJb7M yi8eILcXI+6fEW3GOjypJzOZJjUcw+TiH8wvBStN6Seultqto+1qKYm+vu2vkhZjO9/H 1O7JSt2VJAnnJh9QlSBu4KNUxCaHd8SsXtdHOfg/onAqTJlhZ5p84VFmyvh9wJ58jVpk ti3AcDK8q/eVLVeIFWga1MPTJefh31WkmFpPzhRL/bXrgUNeFhRUh0VmYjwUHUsJ9BC8 pm38uG+ZSa2R6eacoXw474GLgP34Vo2lhTvu0xEXiBz2lNoiqIfwPxPMxIX66eRsbQN3 Q0ow== X-Forwarded-Encrypted: i=1; AJvYcCWUelUWMbUaQBA3ZL3ARxsB4r9x/qPlTDsdtZnbFRMEzLELMHT2IqBuCTILSJBMf5d4LSg=@dpdk.org X-Gm-Message-State: AOJu0YzafjcEO8lTNe0YdkDK5fnSmtu8xYzN4ThCXPDQzWW7phR3Rr7z jKpOM8v0/iQhTSsoNbV/AMsJzJ3NAV83CSRhNJ20UARKEbDIfUpi/Jk8BKm9QHE= X-Gm-Gg: ASbGncsYYVM2whWPrYeNxzOQbTMGpSvy+tf2t6Lt4OmObCqTLSnQqUktXFUArkRNp3O iw54Oe8I5FSY2MfdLTYDtxG6IWFIo96Zpej9WXsahvcUXBQITozPBa+OU4fftJA/jFd1GBJsrQN DBWcZVB6NlVcEafc+Y577f3b7XiWVgYya4BqTe+f2P1SEWxOJA4jBUvYlRG2S9AaijH6/55Ir6C Ciyz5LR/MH2TUqR+sgMduHNHY959gDV7GkN5g50XcJBnySO+QZZISFoqZ+pkR1wHm8o2ICwdcX/ zWojU5s21UmYJRtSF1Pa9/WXe8uxZV555w== X-Google-Smtp-Source: AGHT+IGpeB+GFec5exBuTEcxbMDV1IsM421kJ0qInnT7oq3cfnxgTYEKMOCKemVEzjprTfEYJrAUAg== X-Received: by 2002:a05:6a21:32a0:b0:1e1:a434:2959 with SMTP id adf61e73a8af0-1e1dab142cemr1917868637.6.1734026728830; Thu, 12 Dec 2024 10:05:28 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7fd50e37084sm5801848a12.76.2024.12.12.10.05.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2024 10:05:28 -0800 (PST) Date: Thu, 12 Dec 2024 10:05:26 -0800 From: Stephen Hemminger To: Ferruh Yigit Cc: madhuker.mythri@oracle.com, grive@u256.net, dev@dpdk.org Subject: Re: [PATCH] net/failsafe: Fix crash due to in-valid sub-device port id Message-ID: <20241212100526.4c07619f@hermes.local> In-Reply-To: <8971e9a0-e9d0-4da8-1cc3-a1ffbf6ad8f0@amd.com> References: <20221116121121.1969-1-madhuker.mythri@oracle.com> <8971e9a0-e9d0-4da8-1cc3-a1ffbf6ad8f0@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Wed, 7 Dec 2022 17:21:42 +0000 Ferruh Yigit wrote: > On 11/16/2022 12:11 PM, madhuker.mythri@oracle.com wrote: > > From: Madhuker Mythri > > > > Crash occurring while the DPDK secondary processes trying to probe the > > tap-device, where tap-device is a sub-device of Fail-safe device. > > Some-times we get in-valid sub-devices(with the in-valid port-id's), > > due to which the IPC communication does not get response and causes the > > communication failures b/w primary/secondary process. Fix the underlying communication issue. If there is no response then the code is continuing on in an invalid state. Lots more will likely break. > > So, need to validate the sub-device(tap) while secondary process probe in > > the Fail-safe PMD, to avoid such issues. > > > > Bugzilla Id: 1116 > > > > Signed-off-by: Madhuker Mythri > > --- > > drivers/net/failsafe/failsafe.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c > > index 32811403b4..51d4440ac7 100644 > > --- a/drivers/net/failsafe/failsafe.c > > +++ b/drivers/net/failsafe/failsafe.c > > @@ -361,6 +361,9 @@ rte_pmd_failsafe_probe(struct rte_vdev_device *vdev) > > if (sdev->devargs.name[0] == '\0') > > continue; > > > > + if (!rte_eth_dev_is_valid_port(PORT_ID(sdev))) > > + continue; > > + > > > This is in the 'FOREACH_SUBDEV()' block, why an invalid subdevice > provided by the macro? > > Instead of invalid port check, should we fix the macro? > > Overall I am not clear why this defect occurs, bugzilla report also > don't have much detail. > Can you please provide more details why this defect happens? > I am going to reject this patch.