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 78E98A0543 for ; Thu, 10 Nov 2022 17:22:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6EE9F410DE; Thu, 10 Nov 2022 17:22:01 +0100 (CET) Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by mails.dpdk.org (Postfix) with ESMTP id EF67540150 for ; Thu, 10 Nov 2022 17:21:58 +0100 (CET) Received: by mail-pl1-f178.google.com with SMTP id p12so1785645plq.4 for ; Thu, 10 Nov 2022 08:21:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; 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=0S4TqK726GDUmO0R+xbVjT8BrAYDbp0IAxFsMsalo3g=; b=SyeXqe6uS/wNm6fc6lKUOF4jnGklUx2a0Sk5361fi1oajaDDYu1eQK6MsP9CaVCe71 JHwGx9qrneNAad/+sXrUY2Pqf0kIeWBTYUbsAlgiOm3m9o8pf5oSON5p9+1806salfYn UREUn1nKzk56vcQbd3j4SlU4/9mjJIjYiaKYoQVaaP1y4zWRzqIInlHGaQwSJd9nS7ZQ d9fuRfCRkmrxXzr+eBcXY89SwIQ1z3LactUV6qmpMDjP7VZTIu1/AdlIFCGlEoJZLZAj 4GgQxwMRvbjZVpKxOAzUjqpIkXxJYMPBhAMQ5P1ncjPGEShtCzLuJhpc26hf1azWqCZJ /oqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=0S4TqK726GDUmO0R+xbVjT8BrAYDbp0IAxFsMsalo3g=; b=0GZ43omjH58CP22rCi2JN3DKn19PIo/TybfLfzRMoBH56Wc4angwqLUiaWamMWVUHt Kv2qDfycTi3RfI5WcBXk6MhvnX89hBDqS/5b1LTUC7jp8izVYopHB7ORmSFpO88F9LL2 K/SH75jsXMUGVwCkZSc02mLBRQ5A4Ap+AAGCvR2Sci6kbEaNPXUxhx61LXSTyo5URLMw kZrzeUxIVPnHxIPGqBxqewQ34JyBVvbC6pakrwDZlVUXfyaRVy1mEcUv0CYweP7LhdPF EspM+NmyQqZK8EeH8M0Y3bVpQAYAvoyPzzndiLTtqrpfbBf0TFqBQqsClEiRN4yxKpLG Ud2g== X-Gm-Message-State: ACrzQf1PGe8WU5kgDP8MTywCV7sJt6n/msZINnmYjgzWaRfVHbBBZWFM YDN9t3J/kUM9Ibo852G3W/g9TA== X-Google-Smtp-Source: AMsMyM5VVLMfOHtEc+nNkjiachnX7dIqm+Qaxbix73vdXYTpH8n0r8sZG4aIKqKN1BEb8QGycy3f0Q== X-Received: by 2002:a17:90b:4b4e:b0:214:9b2:423c with SMTP id mi14-20020a17090b4b4e00b0021409b2423cmr50261918pjb.125.1668097318122; Thu, 10 Nov 2022 08:21:58 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id w13-20020a1709027b8d00b00186c5e8b1d0sm11328965pll.149.2022.11.10.08.21.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 08:21:57 -0800 (PST) Date: Thu, 10 Nov 2022 08:21:54 -0800 From: Stephen Hemminger To: Bing Zhao Cc: , , , , Subject: Re: [PATCH] common/mlx5: fix the sysfs port name translation Message-ID: <20221110082154.118781cd@hermes.local> In-Reply-To: <20221110155726.649190-1-bingz@nvidia.com> References: <20221110155726.649190-1-bingz@nvidia.com> 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 Thu, 10 Nov 2022 17:57:26 +0200 Bing Zhao wrote: > With some OFED or upstream kernel of mlx5, the port name fetched from > "/sys/class/net/[DEV]/phys_port_name" may have a tailing "\n" as the > EOL. The sscanf() will return the scanned items number with this EOL. Why not fix the DPDK driver to strip off the new line when the port name is read? The code in mlx5_os.c should do it there.