From patchwork Fri Aug 12 11:21:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sunil Kovvuri X-Patchwork-Id: 9276801 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 23148600CB for ; Fri, 12 Aug 2016 11:30:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 12B9328905 for ; Fri, 12 Aug 2016 11:30:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 07CB32897B; Fri, 12 Aug 2016 11:30:10 +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=-2.7 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_BL_SPAMCOP_NET,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 E09F428939 for ; Fri, 12 Aug 2016 11:30:08 +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 1bYAda-0001NW-IV; Fri, 12 Aug 2016 11:28:30 +0000 Received: from mail-pa0-x244.google.com ([2607:f8b0:400e:c03::244]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bYAYT-0004IJ-5m for linux-arm-kernel@lists.infradead.org; Fri, 12 Aug 2016 11:23:18 +0000 Received: by mail-pa0-x244.google.com with SMTP id hh10so1373558pac.1 for ; Fri, 12 Aug 2016 04:22:56 -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=ir9V0wHuY7Xu1FWdHUrkob/ulHAxSITWBi+grdVCfPM=; b=owAOvEg1qolGDiQUoAnKl6zZ8Xc0rGjLQWnuGDCsbPESTZtCmYKeLMNCXgdBGimy/5 LgHlxuhEjoEvY0UQDxiX8h5o+E1s071HuM3oEl4+8IoEz+Xd7TphSMhDHI4RQ292wN8Q o0LGynCl4DFybDrndMkMh9T4pSWnAcwVYdYdk97yCNpJqEyLEfCC9KhnP721LIO/9KZl SpqhsGG3ROZOfHW7G5q6wttyq2l3Ywgn4rcRf4wDtiYUcN8CaEp675f308hiSxJleHgu xY1pYvQfsamV+9agvB9kqx5h7drskIGQww9oo4imaHSi43mEiVEUdJQUIewBq79I+DFS Ugbg== 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=ir9V0wHuY7Xu1FWdHUrkob/ulHAxSITWBi+grdVCfPM=; b=ilLoVBwnYuFxsVYfvOjXXsQ3ZBqcMNrVVEXdVT2kl6azm4mXMXalIBGV1nABw5mDJv x6873QccZjyoo1yf/UWkAlRM+6b9Mqwjy0wkECSs8/lCoKHOGtNogySAVsL2kjMo1/C7 MIaZhMwegh5cpvynTrIa5QSbr/RcVz7J/rq8t6T1VCsRoKga5trK+gJdRTx/ciBQjt7n zzzh9JmIMngGPgfrYGny6qducQTPrWbxB70oukDw0ZEmM40GGTCYTPNa7mKo6bwawrpy AC4GneTxMoM1PmOHRQAu9t8CTFJhRFw/RId8LTczg5r+3U88nv0Y58EhzKkTKgkci02/ 019Q== X-Gm-Message-State: AEkoouszXShyLChjCWfpCGLve2eG90bB9HZO7qSoX1GVeSjMPNN4UAE6UImDLBBnhdgbsQ== X-Received: by 10.66.74.103 with SMTP id s7mr26031497pav.1.1471000975663; Fri, 12 Aug 2016 04:22:55 -0700 (PDT) Received: from machine421.in.caveonetworks.com ([14.140.2.178]) by smtp.googlemail.com with ESMTPSA id ww14sm12306817pac.34.2016.08.12.04.22.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Aug 2016 04:22:54 -0700 (PDT) From: sunil.kovvuri@gmail.com To: netdev@vger.kernel.org Subject: [PATCH v2 13/21] net: thunderx: Use netdev's name for naming VF's interrupts Date: Fri, 12 Aug 2016 16:51:36 +0530 Message-Id: <1471000904-21715-14-git-send-email-sunil.kovvuri@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1471000904-21715-1-git-send-email-sunil.kovvuri@gmail.com> References: <1471000904-21715-1-git-send-email-sunil.kovvuri@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160812_042313_642818_CBD9B5EA X-CRM114-Status: GOOD ( 11.01 ) 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 , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 d9efe2f..5335ff1 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,