From patchwork Fri Jul 15 12:58:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sunil Kovvuri X-Patchwork-Id: 9232023 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 3176F60865 for ; Fri, 15 Jul 2016 13:05:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20DBB27FA4 for ; Fri, 15 Jul 2016 13:05:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 15BF128324; Fri, 15 Jul 2016 13:05:23 +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 8891D27FA4 for ; Fri, 15 Jul 2016 13:05:22 +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 1bO2mT-0004V9-PA; Fri, 15 Jul 2016 13:03:49 +0000 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bO2iu-0008Oz-8E for linux-arm-kernel@lists.infradead.org; Fri, 15 Jul 2016 13:00:10 +0000 Received: by mail-pf0-x242.google.com with SMTP id t190so6299482pfb.2 for ; Fri, 15 Jul 2016 05:59:47 -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=sCiBvTCVgm5q8Bud8RH5/fers1WOqCOtKo7pBjViAh5aqHZR7Itu6ZNAtA+T5Ziv7c 30j4EmU6togS4kqjRVJ4H9P+jPfkU90Qmr9SfjP6WmbhpML0xLcSUlclAabzK9qlTU/S 5wgYrR0dqafGEkiFLDy0nNSd9MCjd80p4HthkeFMl9Z15Xg2zY6HeMheH/9lNPmAGUBn iRiHlw3XppTwBMt+jUG0NukO1/f2R+QkiArmu+z2uvkul3Kq4Y/5za960NYmD0OSadAs 6T9eHMP3P1l32za9/b9ZlxCCqmSxj6o9TG2cemRj9c40m4Ngy4vrtOxxIPp4zzARy/j1 FSZQ== 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=C3zhhLYrOiBnTj/uU6VJR4JvTTjgDvZ552zdRXsz8qQB6ryk9UPmdKEZfJhX15OjPS wE/X9IwcJc7Sab0KT0MqFrdBrXMyvrZu3ycxWNFGgVPCs8v/Ywh/x+JNjd71I94FPWHG UO32xN0T4etoc4LOBCWj6YQQcshIsCkmJNF9VhKeB6hCC4+IUYCscLKh15eHJ9Y9s1eu kxYGBkpclKmr+3sDabm3InvjnTr+XiYMN8nm14ul8EsLZJcNZIF+DwjCe7EnOrfkTrON GgWqT0bymPpKYE3UHzxB4DM0gZIiIXGt2zADJvuWtkJnumnv2H8CxsWFpuraE8yzOwHp FJUQ== X-Gm-Message-State: ALyK8tIgjSbxlUtFOBKSRFE+v6eQnw0E8vd7ZRjV7hwMo5/ZQ/nnEFN5B8IqOIini5/UZQ== X-Received: by 10.98.32.81 with SMTP id g78mr21515660pfg.20.1468587587103; Fri, 15 Jul 2016 05:59:47 -0700 (PDT) Received: from machine421.in.caveonetworks.com ([14.140.2.178]) by smtp.googlemail.com with ESMTPSA id t80sm5365880pfj.38.2016.07.15.05.59.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 15 Jul 2016 05:59:46 -0700 (PDT) From: sunil.kovvuri@gmail.com To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 11/15] net: thunderx: Use netdev's name for naming VF's interrupts Date: Fri, 15 Jul 2016 18:28:16 +0530 Message-Id: <1468587500-32103-12-git-send-email-sunil.kovvuri@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1468587500-32103-1-git-send-email-sunil.kovvuri@gmail.com> References: <1468587500-32103-1-git-send-email-sunil.kovvuri@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160715_060008_462232_40B4E592 X-CRM114-Status: GOOD ( 11.16 ) 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,