From patchwork Thu Apr 19 03:55:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dann frazier X-Patchwork-Id: 133693 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp182037ljf; Wed, 18 Apr 2018 21:04:45 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/ONvNosQFFfb+AGLiaqWTGi4EzFhI0ALNSFk3G6DeBeln2uMw6Ze3Sd9uyBido6nB2/0Zn X-Received: by 2002:a17:902:8601:: with SMTP id f1-v6mr4428837plo.220.1524110685737; Wed, 18 Apr 2018 21:04:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524110685; cv=none; d=google.com; s=arc-20160816; b=b/tDy7ahAAseY0ZdJ0d5p9bOeOxaqATHDjXsVzkoKZeTrLday84Y0/KqKw09VWM3OB LKBxyn01qLib4twsh3nUpiQOBUfWjHjG2srUwGt/thK/CnD53TPYqytRJPplabpzVDjA c/atjd/aRKLFHa8gea85uECBUQgP4vPphkY6yzb5aYYvq/pmgZbkKAaIrHcv0jMZK7uT H5HZt+3tPBV7MYMNtJcpul/JNbrkceMyn92WDfVHhlhvDyc1P9dF927SKsRcw6W0jfaA tcZN20Ar1BYumNSYBQ8uF8qs9tEmLCaQpisKrq6eXaFLH195mF1uQl62q9A+C6CA//Nx 8x7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=QVpmehJR+OEuEXS1a328moAGT4DD2mYRKoUt1WgpktE=; b=qUsbRLNJSuMLkmex74ya5e5PzQUuQGys/D7p9dYWOfWgzx9SK3cIrYQRr0wVHMn2in HqAHVhdSlSjD1VnowhcAabW6YwlbeEB+H0hNCewnN8eNeG7mmUYb4iu/sDF0JztZqWYO S/owrPvRts1gI5KCz+w90GCYVQx4M17yPnU7uqwfDU1+kRm5LUvhQtVdREe8FbINjGOV SXlXcLQB+pZSyUB3pPmXEfQ3D0ytK3Dc1aVzQxy9nqSM+xeH86efMH1skGp7BxCs3YRo osNeANOi2jC1v+0T9XIWhN76qhZ8qwu5Sqbo2TOW8qW2X/Q1wu1GXsx9fnNJVuVOacWZ 1ptg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d5si2225885pgc.236.2018.04.18.21.04.45; Wed, 18 Apr 2018 21:04:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752028AbeDSEEm (ORCPT + 29 others); Thu, 19 Apr 2018 00:04:42 -0400 Received: from complete.lackof.org ([198.49.126.79]:35384 "EHLO complete.lackof.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750974AbeDSEEl (ORCPT ); Thu, 19 Apr 2018 00:04:41 -0400 X-Greylist: delayed 512 seconds by postgrey-1.27 at vger.kernel.org; Thu, 19 Apr 2018 00:04:41 EDT Received: from localhost (c-73-78-137-212.hsd1.co.comcast.net [73.78.137.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by complete.lackof.org (Postfix) with ESMTPSA id B534E33E0021; Wed, 18 Apr 2018 21:56:01 -0600 (MDT) From: dann frazier To: Yisen Zhuang , Salil Mehta , "David S. Miller" Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Lin Yun Sheng Subject: [PATCH] net: hns: Avoid action name truncation Date: Wed, 18 Apr 2018 21:55:41 -0600 Message-Id: <20180419035541.6318-1-dann.frazier@canonical.com> X-Mailer: git-send-email 2.17.0 X-Virus-Scanned: clamav-milter 0.99.4 at complete.lackof.org X-Virus-Status: Clean X-Spam-Status: No, score=0.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on complete.lackof.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When longer interface names are used, the action names exposed in /proc/interrupts and /proc/irq/* maybe truncated. For example, when using the predictable name algorithm in systemd on a HiSilicon D05, I see: ubuntu@d05-3:~$ grep enahisic2i0-tx /proc/interrupts | sed 's/.* //' enahisic2i0-tx0 enahisic2i0-tx1 [...] enahisic2i0-tx8 enahisic2i0-tx9 enahisic2i0-tx1 enahisic2i0-tx1 enahisic2i0-tx1 enahisic2i0-tx1 enahisic2i0-tx1 enahisic2i0-tx1 Increase the max ring name length to allow for an interface name of IFNAMSIZE. After this change, I now see: $ grep enahisic2i0-tx /proc/interrupts | sed 's/.* //' enahisic2i0-tx0 enahisic2i0-tx1 enahisic2i0-tx2 [...] enahisic2i0-tx8 enahisic2i0-tx9 enahisic2i0-tx10 enahisic2i0-tx11 enahisic2i0-tx12 enahisic2i0-tx13 enahisic2i0-tx14 enahisic2i0-tx15 Signed-off-by: dann frazier --- drivers/net/ethernet/hisilicon/hns/hnae.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.0 diff --git a/drivers/net/ethernet/hisilicon/hns/hnae.h b/drivers/net/ethernet/hisilicon/hns/hnae.h index 3e62692af011..fa5b30f547f6 100644 --- a/drivers/net/ethernet/hisilicon/hns/hnae.h +++ b/drivers/net/ethernet/hisilicon/hns/hnae.h @@ -87,7 +87,7 @@ do { \ #define HNAE_AE_REGISTER 0x1 -#define RCB_RING_NAME_LEN 16 +#define RCB_RING_NAME_LEN (IFNAMSIZ + 4) #define HNAE_LOWEST_LATENCY_COAL_PARAM 30 #define HNAE_LOW_LATENCY_COAL_PARAM 80