From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM05-DM3-obe.outbound.protection.outlook.com (mail-eopbgr730065.outbound.protection.outlook.com [40.107.73.65]) by dpdk.org (Postfix) with ESMTP id A6A491B1EB; Wed, 14 Nov 2018 19:17:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=za7GD2qu8FBnDp2mzeTJbkelR4zTuneG+hYIse7LUlM=; b=dNSDJUxYTSfqEKAdmME2l74MmgO+DWPp1wIpg+AclYa+1XGsRwyAmHXLnL7CXA0xyUPnRp3Q0a7aHrRCCTv8mnLwfa9YjgcMoOL7cy+S3VvuvreU48l1ZQIVszlt/7K9H15hzW/oOrC3H3VkoRVoUoiRf55oURA+G8J/S6uRV3Y= Received: from BYAPR07MB5365.namprd07.prod.outlook.com (20.177.125.18) by BYAPR07MB4760.namprd07.prod.outlook.com (52.135.205.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.26; Wed, 14 Nov 2018 18:17:41 +0000 Received: from BYAPR07MB5365.namprd07.prod.outlook.com ([fe80::4012:e217:427e:320b]) by BYAPR07MB5365.namprd07.prod.outlook.com ([fe80::4012:e217:427e:320b%3]) with mapi id 15.20.1294.045; Wed, 14 Nov 2018 18:17:41 +0000 From: "Mody, Rasesh" To: "stephen@networkplumber.org" CC: "Mody, Rasesh" , "dev@dpdk.org" , "ferruh.yigit@intel.com" , Dept-Eng DPDK Dev , "stable@dpdk.org" Thread-Topic: [PATCH 1/2] net/bnx2x: cleanup info logs Thread-Index: AQHUfEZUUXcmLyaI+Eq+XUyHdzhtpg== Date: Wed, 14 Nov 2018 18:17:41 +0000 Message-ID: <1542219449-7393-1-git-send-email-rasesh.mody@cavium.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR07CA0102.namprd07.prod.outlook.com (2603:10b6:a03:12b::43) To BYAPR07MB5365.namprd07.prod.outlook.com (2603:10b6:a03:64::18) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Rasesh.Mody@cavium.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [198.186.1.5] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; BYAPR07MB4760; 6:yZ2Co0IEqfwz3TL+WZo8+xgL3rfwkdsHn4sR7/4ZfNBrZcvBGX2S/ctr817Ez0y4dnqPuWKKi1++OJM40saVauwOxd1dVYQC9fANxUsea/DmhBaCnGJ7R63s3+uhpe87k5rwuY7dfXS8SIGEXr1/6dK6072/EqKqVoNpgXrXwH5zynPO9nXfbYeLKFVq4PvKJVdIzvU0a4lAeCpX2aBO865sCG55AfAf/gnFUDvk3xQr3YIABu2vaq/OO+PZz/rWLhSo5mHNTLQsc1JmNuWqmNv02B8bLa/CWNG3eJgRq81jXoCsYFeK4umdWLDXrJWkEp+BXPWsJmZ14j8ofti6xX56/eniuqC4J0N1EMwlK2c2WFAeFFutlLxNLATupG0fgQ4NgJ1+fytlQSU84wXVhb+9jpmRt3daTSxmF7wPfrfr9gkqZ75tH7Owj5RDnZI9ujixsMvQ31PNnBJdGT/Alg==; 5:44lDcMb2G4jetDpVauVGD+TEnGum0Otdb/bF1ITl+yskkRMwFuWFbp/LUBYU1Fn92SAkVtszTQB17SmLN5IR9x4DKuCy25BLSDvaP3XbZm4UnddnuiOiQ5hEtwdleVPGyf5pbUeZV6ml4cKy5Y+t5iMXnPY6DkTCFlLflrJMHTM=; 7:vK7wAQEtkcnSppCyCgRXb4Wf7fxmNKGgBqivdaTbVbepWIrJQNFbuaPgCsGDMC91Id/ya3ZO27mU1nYdDmuGRee1s7Q5u0A80ih4iBrH43QDnCxV2BU9tiFM0NePt1twzTKGjviULEbmJQdI+0Br+Q== x-ms-office365-filtering-correlation-id: ed8b1674-a9cd-4085-5eca-08d64a5d76f3 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:BYAPR07MB4760; x-ms-traffictypediagnostic: BYAPR07MB4760: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(823302103)(93006095)(93001095)(3231415)(944501410)(52105112)(10201501046)(3002001)(148016)(149066)(150057)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123564045)(201708071742011)(7699051)(76991095); SRVR:BYAPR07MB4760; BCL:0; PCL:0; RULEID:; SRVR:BYAPR07MB4760; x-forefront-prvs: 085634EFF4 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(136003)(39860400002)(376002)(366004)(346002)(189003)(199004)(26005)(99286004)(52116002)(6506007)(386003)(102836004)(6486002)(305945005)(6436002)(5640700003)(105586002)(4744004)(2351001)(25786009)(478600001)(106356001)(7736002)(4326008)(2501003)(36756003)(2900100001)(476003)(486006)(2616005)(68736007)(6512007)(8676002)(1730700003)(81156014)(81166006)(186003)(6916009)(54906003)(316002)(5660300001)(66066001)(14454004)(72206003)(86362001)(6116002)(256004)(97736004)(3846002)(2906002)(14444005)(8936002)(71200400001)(53936002)(71190400001); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB4760; H:BYAPR07MB5365.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: Yt8pREmghg72nWG6QWPf4cwEO8xoqPo20tk1BC+hhXPh0ktJG6RvjDLkpNF6PmE+qdgjp+yM0SrN8u+44fe6K/kb4X21xBwQT6G75p19tjKjdhME0HkMn2zbW+ZFx2XwqlfjFRo+ObA/J4cV292ELZXE6NLJLcmIasYSATEUP2FqxJSsQ88TzE/pc9VrQ+bycGTZNbLfCaN4Kiyv2Vl4DUs1EIxU8kv1lCSLhWvTcUtg6ZFK3fsGV9mxCtr7YdQViTQgZVKDpI95ocAq4iAKrteYMo2dgHnbZ3IFzcnPsVdBbVX84TBeCovPk/nr2S6ZmvJGcFnw+pUD6o/FFosa7nuxPV/ovXEEdWX7kwg5QB4= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-Network-Message-Id: ed8b1674-a9cd-4085-5eca-08d64a5d76f3 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Nov 2018 18:17:41.4894 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB4760 Subject: [dpdk-dev] [PATCH 1/2] net/bnx2x: cleanup info logs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2018 18:17:45 -0000 Reduced number of INFO logs in BNX2X PMD by converting some INFO logs to DEBUG and few NOTICE logs to INFO, removing extra new lines, printing banner bar once for the adapter and device specific info. Fixes: ba7eeb035a5f ("net/bnx2x: fix logging to include device name") Fixes: 540a211084a7 ("bnx2x: driver core") Cc: stable@dpdk.org Signed-off-by: Rasesh Mody --- drivers/net/bnx2x/bnx2x.c | 151 ++++++++++++++++++++--------------= ---- drivers/net/bnx2x/bnx2x.h | 3 +- drivers/net/bnx2x/bnx2x_ethdev.c | 20 +++-- drivers/net/bnx2x/bnx2x_ethdev.h | 1 + drivers/net/bnx2x/ecore_sp.c | 8 +- 5 files changed, 94 insertions(+), 89 deletions(-) diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c index a6d2687..e2a6580 100644 --- a/drivers/net/bnx2x/bnx2x.c +++ b/drivers/net/bnx2x/bnx2x.c @@ -5809,7 +5809,7 @@ static int bnx2x_set_power_state(struct bnx2x_softc *= sc, uint8_t state) =20 /* If there is no power capability, silently succeed */ if (!(sc->devinfo.pcie_cap_flags & BNX2X_PM_CAPABLE_FLAG)) { - PMD_DRV_LOG(WARNING, sc, "No power capability"); + PMD_DRV_LOG(INFO, sc, "No power capability"); return 0; } =20 @@ -6918,19 +6918,19 @@ static void bnx2x_link_report_locked(struct bnx2x_s= oftc *sc) return; } =20 - PMD_DRV_LOG(INFO, sc, "Change in link status : cur_data =3D %lx, last_rep= orted_link =3D %lx\n", - cur_data.link_report_flags, - sc->last_reported_link.link_report_flags); + ELINK_DEBUG_P2(sc, "Change in link status : cur_data =3D %lx, last_report= ed_link =3D %lx", + cur_data.link_report_flags, + sc->last_reported_link.link_report_flags); =20 sc->link_cnt++; =20 - PMD_DRV_LOG(INFO, sc, "link status change count =3D %x\n", sc->link_cnt); + ELINK_DEBUG_P1(sc, "link status change count =3D %x", sc->link_cnt); /* report new link params and remember the state for the next time */ rte_memcpy(&sc->last_reported_link, &cur_data, sizeof(cur_data)); =20 if (bnx2x_test_bit(BNX2X_LINK_REPORT_LINK_DOWN, &cur_data.link_report_flags)) { - PMD_DRV_LOG(INFO, sc, "NIC Link is Down"); + ELINK_DEBUG_P0(sc, "NIC Link is Down"); } else { __rte_unused const char *duplex; __rte_unused const char *flow; @@ -6938,8 +6938,10 @@ static void bnx2x_link_report_locked(struct bnx2x_so= ftc *sc) if (bnx2x_test_and_clear_bit(BNX2X_LINK_REPORT_FULL_DUPLEX, &cur_data.link_report_flags)) { duplex =3D "full"; + ELINK_DEBUG_P0(sc, "link set to full duplex"); } else { duplex =3D "half"; + ELINK_DEBUG_P0(sc, "link set to half duplex"); } =20 /* @@ -7123,7 +7125,7 @@ void bnx2x_periodic_callout(struct bnx2x_softc *sc) { if ((sc->state !=3D BNX2X_STATE_OPEN) || (atomic_load_acq_long(&sc->periodic_flags) =3D=3D PERIODIC_STOP)) { - PMD_DRV_LOG(INFO, sc, "periodic callout exit (state=3D0x%x)", + PMD_DRV_LOG(DEBUG, sc, "periodic callout exit (state=3D0x%x)", sc->state); return; } @@ -8317,7 +8319,7 @@ static int bnx2x_get_device_info(struct bnx2x_softc *= sc) ((sc->devinfo.bc_ver >> 24) & 0xff), ((sc->devinfo.bc_ver >> 16) & 0xff), ((sc->devinfo.bc_ver >> 8) & 0xff)); - PMD_DRV_LOG(INFO, sc, "Bootcode version: %s", sc->devinfo.bc_ver_str); + PMD_DRV_LOG(DEBUG, sc, "Bootcode version: %s", sc->devinfo.bc_ver_str); =20 /* get the bootcode shmem address */ sc->devinfo.mf_cfg_base =3D bnx2x_get_shmem_mf_cfg_base(sc); @@ -11743,42 +11745,36 @@ static const char *get_bnx2x_flags(uint32_t flags= ) return flag_str; } =20 -/* - * Prints useful adapter info. - */ +/* Prints useful adapter info. */ void bnx2x_print_adapter_info(struct bnx2x_softc *sc) { int i =3D 0; - __rte_unused uint32_t ext_phy_type; =20 - PMD_INIT_FUNC_TRACE(sc); - if (sc->link_vars.phy_flags & PHY_XGXS_FLAG) - ext_phy_type =3D ELINK_XGXS_EXT_PHY_TYPE(REG_RD(sc, - sc-> - devinfo.shmem_base - + offsetof(struct - shmem_region, - dev_info.port_hw_config - [0].external_phy_config))); - else - ext_phy_type =3D ELINK_SERDES_EXT_PHY_TYPE(REG_RD(sc, - sc-> - devinfo.shmem_base - + - offsetof(struct - shmem_region, - dev_info.port_hw_config - [0].external_phy_config))); - - PMD_DRV_LOG(INFO, sc, "\n\n=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D\n"); + PMD_DRV_LOG(INFO, sc, "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D"); + /* DPDK and Driver versions */ + PMD_DRV_LOG(INFO, sc, "%12s : %s", "DPDK", + rte_version()); + PMD_DRV_LOG(INFO, sc, "%12s : %s", "Driver", + bnx2x_pmd_version()); + /* Firmware versions. */ + PMD_DRV_LOG(INFO, sc, "%12s : %d.%d.%d", + "Firmware", + BNX2X_5710_FW_MAJOR_VERSION, + BNX2X_5710_FW_MINOR_VERSION, + BNX2X_5710_FW_REVISION_VERSION); + PMD_DRV_LOG(INFO, sc, "%12s : %s", + "Bootcode", sc->devinfo.bc_ver_str); /* Hardware chip info. */ PMD_DRV_LOG(INFO, sc, "%12s : %#08x", "ASIC", sc->devinfo.chip_id); PMD_DRV_LOG(INFO, sc, "%12s : %c%d", "Rev", (CHIP_REV(sc) >> 12) + 'A', (CHIP_METAL(sc) >> 4)); - - /* Bus info. */ - PMD_DRV_LOG(INFO, sc, - "%12s : %d, ", "Bus PCIe", sc->devinfo.pcie_link_width); + /* Bus PCIe info. */ + PMD_DRV_LOG(INFO, sc, "%12s : 0x%x", "Vendor Id", + sc->devinfo.vendor_id); + PMD_DRV_LOG(INFO, sc, "%12s : 0x%x", "Device Id", + sc->devinfo.device_id); + PMD_DRV_LOG(INFO, sc, "%12s : width x%d, ", "Bus PCIe", + sc->devinfo.pcie_link_width); switch (sc->devinfo.pcie_link_speed) { case 1: PMD_DRV_LOG(INFO, sc, "%23s", "2.5 Gbps"); @@ -11792,62 +11788,52 @@ void bnx2x_print_adapter_info(struct bnx2x_softc = *sc) default: PMD_DRV_LOG(INFO, sc, "%33s", "Unknown link speed"); } - /* Device features. */ PMD_DRV_LOG(INFO, sc, "%12s : ", "Flags"); - /* Miscellaneous flags. */ if (sc->devinfo.pcie_cap_flags & BNX2X_MSI_CAPABLE_FLAG) { PMD_DRV_LOG(INFO, sc, "%18s", "MSI"); i++; } - if (sc->devinfo.pcie_cap_flags & BNX2X_MSIX_CAPABLE_FLAG) { if (i > 0) PMD_DRV_LOG(INFO, sc, "|"); PMD_DRV_LOG(INFO, sc, "%20s", "MSI-X"); i++; } + PMD_DRV_LOG(INFO, sc, "%12s : %s", "OVLAN", (OVLAN(sc) ? "YES" : "NO")); + PMD_DRV_LOG(INFO, sc, "%12s : %s", "MF", (IS_MF(sc) ? "YES" : "NO")); + PMD_DRV_LOG(INFO, sc, "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D"); +} =20 - if (IS_PF(sc)) { - PMD_DRV_LOG(INFO, sc, "%12s : ", "Queues"); - switch (sc->sp->rss_rdata.rss_mode) { - case ETH_RSS_MODE_DISABLED: - PMD_DRV_LOG(INFO, sc, "%19s", "None"); - break; - case ETH_RSS_MODE_REGULAR: - PMD_DRV_LOG(INFO, sc, - "%18s : %d", "RSS", sc->num_queues); - break; - default: - PMD_DRV_LOG(INFO, sc, "%22s", "Unknown"); - break; - } - } - - /* RTE and Driver versions */ - PMD_DRV_LOG(INFO, sc, "%12s : %s", "DPDK", - rte_version()); - PMD_DRV_LOG(INFO, sc, "%12s : %s", "Driver", - bnx2x_pmd_version()); +/* Prints useful device info. */ +void bnx2x_print_device_info(struct bnx2x_softc *sc) +{ + __rte_unused uint32_t ext_phy_type; + uint32_t offset; =20 - /* Firmware versions and device features. */ - PMD_DRV_LOG(INFO, sc, "%12s : %d.%d.%d", - "Firmware", - BNX2X_5710_FW_MAJOR_VERSION, - BNX2X_5710_FW_MINOR_VERSION, - BNX2X_5710_FW_REVISION_VERSION); - PMD_DRV_LOG(INFO, sc, "%12s : %s", - "Bootcode", sc->devinfo.bc_ver_str); + PMD_INIT_FUNC_TRACE(sc); + offset =3D offsetof(struct shmem_region, + dev_info.port_hw_config[0].external_phy_config); + if (sc->link_vars.phy_flags & PHY_XGXS_FLAG) + ext_phy_type =3D ELINK_XGXS_EXT_PHY_TYPE(REG_RD(sc, + sc-> + devinfo. + shmem_base + + offset)); + else + ext_phy_type =3D ELINK_SERDES_EXT_PHY_TYPE(REG_RD(sc, + sc-> + devinfo. + shmem_base + + offset)); =20 - PMD_DRV_LOG(INFO, sc, "\n\n=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D\n"); + /* Device features. */ PMD_DRV_LOG(INFO, sc, "%12s : %u", "Bnx2x Func", sc->pcie_func); PMD_DRV_LOG(INFO, sc, "%12s : %s", "Bnx2x Flags", get_bnx2x_flags(sc->flags)); PMD_DRV_LOG(INFO, sc, "%12s : %s", "DMAE Is", (sc->dmae_ready ? "Ready" : "Not Ready")); - PMD_DRV_LOG(INFO, sc, "%12s : %s", "OVLAN", (OVLAN(sc) ? "YES" : "NO")); - PMD_DRV_LOG(INFO, sc, "%12s : %s", "MF", (IS_MF(sc) ? "YES" : "NO")); PMD_DRV_LOG(INFO, sc, "%12s : %u", "MTU", sc->mtu); PMD_DRV_LOG(INFO, sc, "%12s : %s", "PHY Type", get_ext_phy_type(ext_phy_type)); @@ -11863,9 +11849,30 @@ void bnx2x_print_adapter_info(struct bnx2x_softc *= sc) if (sc->recovery_state) PMD_DRV_LOG(INFO, sc, "%12s : %s", "Recovery", get_recovery_state(sc->recovery_state)); + /* Queue info. */ + if (IS_PF(sc)) { + switch (sc->sp->rss_rdata.rss_mode) { + case ETH_RSS_MODE_DISABLED: + PMD_DRV_LOG(INFO, sc, "%12s : %s", "Queues", "RSS mode - None"); + break; + case ETH_RSS_MODE_REGULAR: + PMD_DRV_LOG(INFO, sc, "%12s : %s,", "Queues", "RSS mode - Regular"); + PMD_DRV_LOG(INFO, sc, "%16d", sc->num_queues); + break; + default: + PMD_DRV_LOG(INFO, sc, "%12s : %s", "Queues", "RSS mode - Unknown"); + break; + } + } PMD_DRV_LOG(INFO, sc, "%12s : CQ =3D %lx, EQ =3D %lx", "SPQ Left", sc->cq_spq_left, sc->eq_spq_left); + PMD_DRV_LOG(INFO, sc, "%12s : %x", "Switch", sc->link_params.switch_cfg); - PMD_DRV_LOG(INFO, sc, "\n\n=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D\n"); + PMD_DRV_LOG(INFO, sc, "pcie_bus=3D%d, pcie_device=3D%d", + sc->pcie_bus, sc->pcie_device); + PMD_DRV_LOG(INFO, sc, "bar0.addr=3D%p, bar1.addr=3D%p", + sc->bar[BAR0].base_addr, sc->bar[BAR1].base_addr); + PMD_DRV_LOG(INFO, sc, "port=3D%d, path=3D%d, vnic=3D%d, func=3D%d", + PORT_ID(sc), PATH_ID(sc), VNIC_ID(sc), FUNC_ID(sc)); } diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h index 7478072..32a1229 100644 --- a/drivers/net/bnx2x/bnx2x.h +++ b/drivers/net/bnx2x/bnx2x.h @@ -1937,6 +1937,7 @@ void ecore_storm_memset_struct(struct bnx2x_softc *sc= , uint32_t addr, int bnx2x_tx_encap(struct bnx2x_tx_queue *txq, struct rte_mbuf *m0); uint8_t bnx2x_txeof(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp); void bnx2x_print_adapter_info(struct bnx2x_softc *sc); +void bnx2x_print_device_info(struct bnx2x_softc *sc); int bnx2x_intr_legacy(struct bnx2x_softc *sc, int scan_fp); void bnx2x_link_status_update(struct bnx2x_softc *sc); int bnx2x_complete_sp(struct bnx2x_softc *sc); @@ -1984,7 +1985,7 @@ int bnx2x_vf_setup_queue(struct bnx2x_softc *sc, stru= ct bnx2x_fastpath *fp, bnx2x_vf_set_rx_mode(sc); } } else { - PMD_DRV_LOG(NOTICE, sc, "Card is not ready to change mode"); + PMD_DRV_LOG(INFO, sc, "Card is not ready to change mode"); } } =20 diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_eth= dev.c index 0057843..cc7816d 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.c +++ b/drivers/net/bnx2x/bnx2x_ethdev.c @@ -245,8 +245,7 @@ void bnx2x_periodic_stop(void *param) return -3; } =20 - /* Print important adapter info for the user. */ - bnx2x_print_adapter_info(sc); + bnx2x_print_device_info(sc); =20 return ret; } @@ -574,6 +573,7 @@ void bnx2x_periodic_stop(void *param) struct rte_pci_device *pci_dev; struct rte_pci_addr pci_addr; struct bnx2x_softc *sc; + static bool adapter_info =3D true; =20 /* Extract key data structures */ sc =3D eth_dev->data->dev_private; @@ -632,8 +632,15 @@ void bnx2x_periodic_stop(void *param) return ret; } =20 + /* Print important adapter info for the user. */ + if (adapter_info) { + bnx2x_print_adapter_info(sc); + adapter_info =3D false; + } + /* schedule periodic poll for slowpath link events */ if (IS_PF(sc)) { + PMD_DRV_LOG(DEBUG, sc, "Scheduling periodic poll for slowpath link event= s"); ret =3D rte_eal_alarm_set(BNX2X_SP_TIMER_PERIOD, bnx2x_periodic_start, (void *)eth_dev); if (ret) { @@ -645,15 +652,6 @@ void bnx2x_periodic_stop(void *param) =20 eth_dev->data->mac_addrs =3D (struct ether_addr *)sc->link_params.mac_add= r; =20 - PMD_DRV_LOG(INFO, sc, "pcie_bus=3D%d, pcie_device=3D%d", - sc->pcie_bus, sc->pcie_device); - PMD_DRV_LOG(INFO, sc, "bar0.addr=3D%p, bar1.addr=3D%p", - sc->bar[BAR0].base_addr, sc->bar[BAR1].base_addr); - PMD_DRV_LOG(INFO, sc, "port=3D%d, path=3D%d, vnic=3D%d, func=3D%d", - PORT_ID(sc), PATH_ID(sc), VNIC_ID(sc), FUNC_ID(sc)); - PMD_DRV_LOG(INFO, sc, "portID=3D%d vendorID=3D0x%x deviceID=3D0x%x", - eth_dev->data->port_id, pci_dev->id.vendor_id, pci_dev->id.device_id); - if (IS_VF(sc)) { rte_spinlock_init(&sc->vf2pf_lock); =20 diff --git a/drivers/net/bnx2x/bnx2x_ethdev.h b/drivers/net/bnx2x/bnx2x_eth= dev.h index 807ba17..45958db 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.h +++ b/drivers/net/bnx2x/bnx2x_ethdev.h @@ -47,6 +47,7 @@ #define FALSE 0 #define TRUE 1 =20 +typedef int bool; #define false 0 #define true 1 #define min(a,b) RTE_MIN(a,b) diff --git a/drivers/net/bnx2x/ecore_sp.c b/drivers/net/bnx2x/ecore_sp.c index ab730ab..6d2bb81 100644 --- a/drivers/net/bnx2x/ecore_sp.c +++ b/drivers/net/bnx2x/ecore_sp.c @@ -530,17 +530,15 @@ static void __ecore_vlan_mac_h_read_unlock(struct bnx= 2x_softc *sc, #endif } else { o->head_reader--; - PMD_DRV_LOG(INFO, sc, - "vlan_mac_lock - decreased readers to %d", - o->head_reader); + ECORE_MSG(sc, "vlan_mac_lock - decreased readers to %d", + o->head_reader); } =20 /* It's possible a new pending execution was added, and that this reader * was last - if so we need to execute the command. */ if (!o->head_reader && o->head_exe_request) { - PMD_DRV_LOG(INFO, sc, - "vlan_mac_lock - reader release encountered a pending request"); + ECORE_MSG(sc, "vlan_mac_lock - reader release encountered a pending requ= est"); =20 /* Writer release will do the trick */ __ecore_vlan_mac_h_write_unlock(sc, o); --=20 1.7.10.3