From patchwork Wed Jul 13 05:59:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sunil Kovvuri X-Patchwork-Id: 9226855 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C746D60868 for ; Wed, 13 Jul 2016 06:03:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B840C27813 for ; Wed, 13 Jul 2016 06:03:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD1A827BFF; Wed, 13 Jul 2016 06:03:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9B58C27813 for ; Wed, 13 Jul 2016 06:03:20 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bNDF3-0003Vl-Q0; Wed, 13 Jul 2016 06:01:53 +0000 Received: from mail-pa0-x241.google.com ([2607:f8b0:400e:c03::241]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bNDE6-0002HO-1V for linux-arm-kernel@lists.infradead.org; Wed, 13 Jul 2016 06:00:56 +0000 Received: by mail-pa0-x241.google.com with SMTP id ib6so2395773pad.3 for ; Tue, 12 Jul 2016 23:00:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OptvjUfODuBbcj1BMVIzWG0HDRX+wWjwplu9mIVyaFU=; b=landOCoJ7HHzVZaHBLTTvfuLzMTwcYfx2UXpGcKQtLO3SLBSYq+za3vRlRXu2KdinV 9uefrporRpngqJ4891cAEX7YiyhBuaHJBkd+6mzxvvffxApoR1/hfPuBVyRz8+BjXpH5 4pIB+Jt1HriqLCD9JWdCyKJ1IYcPdwk0TvggesvUkFrttAaz7iBKLaqt51aMQ2PMrEZm PA+LPSrT86eG/2OTBZ/WTzGjdKADRQp/BxKoaSnVHF+juhVlh3S7S4l0sA5J8WQ3Gwgm vRrIzRKHhLkDDIfrObOMFAQCtUIMHsSh7MBmTSrJlBVo6+hVqEtXmt0/FiIVkzhBtd2s Nrfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=OptvjUfODuBbcj1BMVIzWG0HDRX+wWjwplu9mIVyaFU=; b=dW8XvfXYRtLf133DzRXSoASMGNY1bx5VnQmSEWp9TEnVsG1yu17IrNQPm9Ecqo03sc 8denfK0zWIgDOGs+Aa2sK/mSq+GpW5BhLNtZgUY9jfVJNVqPGVHjIfm9bbyjUK2BUs+e 0uF7d9iFk4eTNYy2MJTzsRET8RfaqIAtxB14IJLlcdPv7cdch8p3cvMm6j7O6jKSjk64 BtEEeR9ZLvTL+fxZsqmMbCTpzsfI9JCOQ8Co5eZBJIOSXJJQseuHg9F8pgNiinrC8/Zv Ys2S6g7M3UgVGG+3p7iV5/acaPOiVrjTSAeUkmWj/IB62MiMaMH8BLakynYqWMeycTUQ EwGA== X-Gm-Message-State: ALyK8tLe4hQlx7rdMjz4wJ7G4hPUlE4Kjv60yYrh/sd2778mRhHgA+bIpLKyQ1BoOvxp0Q== X-Received: by 10.66.219.105 with SMTP id pn9mr10460630pac.25.1468389633672; Tue, 12 Jul 2016 23:00:33 -0700 (PDT) Received: from machine421.in.caveonetworks.com ([14.140.2.178]) by smtp.googlemail.com with ESMTPSA id su7sm1634700pab.44.2016.07.12.23.00.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Jul 2016 23:00:32 -0700 (PDT) From: sunil.kovvuri@gmail.com To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 11/15] net: thunderx: Use netdev's name for naming VF's interrupts Date: Wed, 13 Jul 2016 11:29:35 +0530 Message-Id: <1468389579-482-12-git-send-email-sunil.kovvuri@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1468389579-482-1-git-send-email-sunil.kovvuri@gmail.com> References: <1468389579-482-1-git-send-email-sunil.kovvuri@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160712_230054_304194_C9927F97 X-CRM114-Status: GOOD ( 11.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sunil Goutham MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sunil Goutham This patch changes the way VF's irqs are visible in /proc/interrupts. Instead of VF id, logical interface's netdev name is used for IRQ naming and also all secondary VF's interrupts in multiqset config use primary VF's netdev name. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_main.c b/drivers/net/ethernet/cavium/thunder/nicvf_main.c index af04d9f..dbb61a8 100644 --- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c +++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c @@ -938,16 +938,19 @@ static int nicvf_register_interrupts(struct nicvf *nic) int vector; for_each_cq_irq(irq) - sprintf(nic->irq_name[irq], "NICVF%d CQ%d", - nic->vf_id, irq); + sprintf(nic->irq_name[irq], "%s-rxtx-%d", + nic->pnicvf->netdev->name, + nicvf_netdev_qidx(nic, irq)); for_each_sq_irq(irq) - sprintf(nic->irq_name[irq], "NICVF%d SQ%d", - nic->vf_id, irq - NICVF_INTR_ID_SQ); + sprintf(nic->irq_name[irq], "%s-sq-%d", + nic->pnicvf->netdev->name, + nicvf_netdev_qidx(nic, irq - NICVF_INTR_ID_SQ)); for_each_rbdr_irq(irq) - sprintf(nic->irq_name[irq], "NICVF%d RBDR%d", - nic->vf_id, irq - NICVF_INTR_ID_RBDR); + sprintf(nic->irq_name[irq], "%s-rbdr-%d", + nic->pnicvf->netdev->name, + nic->sqs_mode ? (nic->sqs_id + 1) : 0); /* Register CQ interrupts */ for (irq = 0; irq < nic->qs->cq_cnt; irq++) { @@ -971,8 +974,9 @@ static int nicvf_register_interrupts(struct nicvf *nic) } /* Register QS error interrupt */ - sprintf(nic->irq_name[NICVF_INTR_ID_QS_ERR], - "NICVF%d Qset error", nic->vf_id); + sprintf(nic->irq_name[NICVF_INTR_ID_QS_ERR], "%s-qset-err-%d", + nic->pnicvf->netdev->name, + nic->sqs_mode ? (nic->sqs_id + 1) : 0); irq = NICVF_INTR_ID_QS_ERR; ret = request_irq(nic->msix_entries[irq].vector, nicvf_qs_err_intr_handler,