From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id DD59E41E1C;
	Thu,  9 Mar 2023 17:31:12 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id BFBF740ED7;
	Thu,  9 Mar 2023 17:31:12 +0100 (CET)
Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com
 [209.85.214.175])
 by mails.dpdk.org (Postfix) with ESMTP id 8435340695
 for <dev@dpdk.org>; Thu,  9 Mar 2023 17:31:11 +0100 (CET)
Received: by mail-pl1-f175.google.com with SMTP id u5so2569322plq.7
 for <dev@dpdk.org>; Thu, 09 Mar 2023 08:31:11 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20210112.gappssmtp.com; s=20210112; t=1678379470;
 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=ezN0zb2t2C/xeS15ly2cAfToyh0uD5rMXurSsFX0HQ8=;
 b=tH0l5bWBpxTkIFI3ooneWOrN2HlajkgpfHcIV3n5Iw+MFkB1+FTzsCJpywDzwUSSPG
 +geFaBA9yy0dNQtLww/ImG61P5k4S2bant6uH5lKFj9yglmO0B7EWpDaxe+YSOZNeQVd
 1H3ad8mqxSbvdVaFWidvJ0kLfoTZjC9EWTzyspCrWyMEQ3KyCEY2xiL78fH7l5ptNKF3
 3rXPFje0ZOScBPWdyfbF1PzHMQ8H5y533SLpz98BpxVUPpC+ymnv5qm/THXPY2Y8Yfsp
 G+cB8b778WdW+0jju14jfZx7tf94lsCWlT+2tR3d7u48rCXXuXBu4NUItjeLUP0Ef70m
 9+9Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112; t=1678379470;
 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=ezN0zb2t2C/xeS15ly2cAfToyh0uD5rMXurSsFX0HQ8=;
 b=sbUYcuUyW50b5n4NWZkdKlCSpWgKXwRq84Gh4gmnRbdKrI2Ma/H2KlnTbmt5/sulsE
 xFhlf8hCR0Q/LL/2Yw9tqhr8lyux/vSDk7hLRLz+G2d7l0hNHB6NpmBKXb88bmVFNurO
 23dFaop7y+6N3nSYPvYo24uQnNICtRJlMMatPTgt0TUTSyFYecyjhSvkk3u1Le1v1NPN
 bR/LPYse31dPIJ6dRIEmcy4Mdb4NXcid9lPBttN6M8t9sH6rdl22v2oEOxlvkwpSteh0
 vBCTHsDCfML2KDm7Lbni7nat4fu5zKdvB9mNQKaS94Hdm10yTqnBk2+lwq+rRmvBeNfl
 qZhg==
X-Gm-Message-State: AO0yUKUXKofYBMPQkJI7g7mGo/RtcQ+hSGHfd3t6u3FFrBmCQCVQuCxs
 T4gJHu22sk6iS9DHsEUyvP5New==
X-Google-Smtp-Source: AK7set9aPpXtZnNBZrzknjNs6wP+tX1YgjG7vT3L3oawBdJ0qWHxFU4NmshVhK1k2M9OsnvXwNNOdg==
X-Received: by 2002:a05:6a21:328d:b0:cc:6b15:2bd6 with SMTP id
 yt13-20020a056a21328d00b000cc6b152bd6mr26031703pzb.25.1678379470650; 
 Thu, 09 Mar 2023 08:31:10 -0800 (PST)
Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218])
 by smtp.gmail.com with ESMTPSA id
 j13-20020a62b60d000000b0058bca264253sm11376298pff.126.2023.03.09.08.31.10
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 09 Mar 2023 08:31:10 -0800 (PST)
Date: Thu, 9 Mar 2023 08:31:09 -0800
From: Stephen Hemminger <stephen@networkplumber.org>
To: Yogesh Jangra <yogesh.jangra@intel.com>
Cc: dev@dpdk.org, cristian.dumitrescu@intel.com, kamalakannan.r@intel.com,
 harshad.suresh.narayane@intel.com
Subject: Re: [PATCH] app/testpmd: fix closing softnic port before ethdev ports
Message-ID: <20230309083109.01baaebb@hermes.local>
In-Reply-To: <20230309144249.1199517-1-yogesh.jangra@intel.com>
References: <20230309144249.1199517-1-yogesh.jangra@intel.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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Thu,  9 Mar 2023 14:42:49 +0000
Yogesh Jangra <yogesh.jangra@intel.com> wrote:

> +		/*
> +		 * SoftNIC runs on the sevice core, it uses the resources from
> +		 * the testpmd application. When we run quit command, the testpmd
> +		 * application stops ethdev ports first, SoftNIC will try to
> +		 * access the port and sometimes that result in segmentation
> +		 * error. So first closing the SoftNIC port.
> +		 */
> +		RTE_ETH_FOREACH_DEV(pt_id) {
> +			if (!strcmp(ports[pt_id].dev_info.driver_name, "net_softnic")) {
> +				stop_port(pt_id);
> +				close_port(pt_id);
> +			}
> +		}
> +

NAK
No driver specific hacks please.

Instead fix the driver design or bug please.