Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3454107ybi; Fri, 5 Jul 2019 07:37:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvNzEv6SqHLCaYpCp5q9t00FokEGyb2gCSS3h2gB6gdW2VitSdDT2asBortFUBrlK9L8to X-Received: by 2002:a63:c34c:: with SMTP id e12mr5763536pgd.195.1562337436229; Fri, 05 Jul 2019 07:37:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562337436; cv=none; d=google.com; s=arc-20160816; b=UuDQLNBfCsZ77l0S8jUH8t2yTiYDWLV6j4TYGOe4CjEjARsXgf//FNhrEe6bXNztc1 YubbRisT9lAAjBzIotyuwUO13Z3pDRowr680tixSJ/LaCPIKvlmZSx/xSwKWNn5EY5xk 4jnPokKBdyvL0SBmjAGknvvkHW0EnUNXDMAaHpOn9N1SKl+l3nz5vGVeu/k6RuSfmZqp oglGj5TuuXVza8/87m2d0Lxi54ny7INqURVSOHxtK535FuzEAwIOF5HTdKgqV9ANmJFC JzHGtm1JSNqnUe6xKLQEA+jpjlEz+OnEDyN71I6/c9xpJ2T2uVHBybZpHtZPH5twPG9V uorA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:reply-to:references:in-reply-to :message-id:date:subject:cc:to:from; bh=iHBMHf108w9Upt+w2HmlqGYjIbTBG1wb7b4V3z4+3g0=; b=NLJXetQtSBZS3I9cj6Td9I2VubErufzABWPzr3WAxLS15/WN3Mt8dkqzOEX0DpYfVe LqArpXxWCQiEFZC1YBj1489TfXs11eiZ59gINlkPlQbwupbCHdT8Tj7kL2JVpe62EpKP xy0MpUjOWay49ZXnzATw+GufeY4iwM4zdZZ2U75XXWSEx420T7+HpyIeEhy/FuomllCV Oqz86rpuOfwZ83btyaZSZyHKZvwk+C7X/98ph+4/gSFt1D2zADrAaO+CY2HoZFhCr/c7 1YRVKn0KpEPDvxjo33Zw61A8c2B26Ea+hchA7qcyt/5OMBWeAzPqCxn0ZbfG53hMq/Cl b1cQ== 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=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n1si8760502plk.388.2019.07.05.07.36.59; Fri, 05 Jul 2019 07:37:16 -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=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726696AbfGEO1V (ORCPT + 99 others); Fri, 5 Jul 2019 10:27:21 -0400 Received: from inva020.nxp.com ([92.121.34.13]:36114 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725791AbfGEO1T (ORCPT ); Fri, 5 Jul 2019 10:27:19 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 41E4C1A07CD; Fri, 5 Jul 2019 16:27:18 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 3629C1A07C8; Fri, 5 Jul 2019 16:27:18 +0200 (CEST) Received: from fsr-ub1464-137.ea.freescale.net (fsr-ub1464-137.ea.freescale.net [10.171.82.114]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id E9D44204D6; Fri, 5 Jul 2019 16:27:17 +0200 (CEST) From: Ioana Ciornei To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Cc: ruxandra.radulescu@nxp.com, Razvan Stefanescu , Ioana Ciornei Subject: [PATCH v2 2/6] staging: fsl-dpaa2/ethsw: Add network interface statistics Date: Fri, 5 Jul 2019 17:27:12 +0300 Message-Id: <1562336836-17119-3-git-send-email-ioana.ciornei@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1562336836-17119-1-git-send-email-ioana.ciornei@nxp.com> References: <1562336836-17119-1-git-send-email-ioana.ciornei@nxp.com> Reply-to: ioana.ciornei@nxp.com X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Razvan Stefanescu Allocate MC portal with atomic context for I/O and enable network interface statistics for hardware counters. Signed-off-by: Razvan Stefanescu Signed-off-by: Ioana Ciornei --- Changes in v2: - none drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c index 87470070c3a5..b2273f840813 100644 --- a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c +++ b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c @@ -521,6 +521,7 @@ static int swdev_get_port_parent_id(struct net_device *dev, .ndo_stop = port_stop, .ndo_set_mac_address = eth_mac_addr, + .ndo_get_stats64 = port_get_stats, .ndo_change_mtu = port_change_mtu, .ndo_has_offload_stats = port_has_offload_stats, .ndo_get_offload_stats = port_get_offload_stats, @@ -1483,7 +1484,8 @@ static int ethsw_probe(struct fsl_mc_device *sw_dev) ethsw->dev = dev; dev_set_drvdata(dev, ethsw); - err = fsl_mc_portal_allocate(sw_dev, 0, ðsw->mc_io); + err = fsl_mc_portal_allocate(sw_dev, FSL_MC_IO_ATOMIC_CONTEXT_PORTAL, + ðsw->mc_io); if (err) { if (err == -ENXIO) err = -EPROBE_DEFER; -- 1.9.1