From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by dpdk.org (Postfix) with ESMTP id 03CEBB3BF for ; Mon, 1 Sep 2014 12:20:38 +0200 (CEST) Received: by mail-wi0-f173.google.com with SMTP id cc10so5426831wib.12 for ; Mon, 01 Sep 2014 03:25:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=cd7XIC7ZphIB/7x0b/nopdSGq6zq6bO2btlyrYhfCRI=; b=h+7iGgPNvkjB+qCRdsOsJNBO4JY3264DFk76ii1xuVRx8JUUtS6YBN5YJyekNHRaWl 0kxab641jx9c9KQwXkBw6yMWAf+K/WggKxM1xOFGgLMiywS3FTgGhP72b6uyLiFKhrLU Kr8HqLoscIR+b2/23JPOnmmY8OByfk526XabZQX2s04CG/nNdPMijD1IUj2sMGdCE6LL y+hrTa5d/9YcNa9Qe2+ypPcE/j7PPYv3iJLw3AAw3PPthQxyrmNAzg/rq/grY6vhlyPI QTBNPVYiLYG5kjh38BjA3W2k71N9n8jshlbqEPUxrHe71Ng8tv7gHp1ES05u1j63gfMt 8keg== X-Gm-Message-State: ALoCoQm8Zl0FZ36HPUIc8nBb9eHzmmexXRc0AUhsVr+HEezRbtrCOUBINB9ltbz5r0xGgtgK7yqn X-Received: by 10.194.75.138 with SMTP id c10mr31690690wjw.9.1409567104822; Mon, 01 Sep 2014 03:25:04 -0700 (PDT) Received: from alcyon.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by mx.google.com with ESMTPSA id lm18sm24287018wic.22.2014.09.01.03.25.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Sep 2014 03:25:04 -0700 (PDT) From: David Marchand To: dev@dpdk.org Date: Mon, 1 Sep 2014 12:24:32 +0200 Message-Id: <1409567080-27083-10-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1409567080-27083-1-git-send-email-david.marchand@6wind.com> References: <1409567080-27083-1-git-send-email-david.marchand@6wind.com> Subject: [dpdk-dev] [PATCH v2 09/17] i40e: clean log messages X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 10:20:38 -0000 Clean log messages: - remove leading \n in some messages, - remove trailing \n in some messages, - split multi lines messages, - replace some PMD_INIT_LOG(DEBUG, "some_func") with PMD_INIT_FUNC_TRACE(). Signed-off-by: David Marchand --- lib/librte_pmd_i40e/i40e_ethdev.c | 418 +++++++++++++++++----------------- lib/librte_pmd_i40e/i40e_ethdev_vf.c | 166 +++++++------- lib/librte_pmd_i40e/i40e_pf.c | 75 +++--- lib/librte_pmd_i40e/i40e_rxtx.c | 118 +++++----- 4 files changed, 385 insertions(+), 392 deletions(-) diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c index 352beb1..1a5b55d 100644 --- a/lib/librte_pmd_i40e/i40e_ethdev.c +++ b/lib/librte_pmd_i40e/i40e_ethdev.c @@ -371,7 +371,7 @@ eth_i40e_dev_init(__rte_unused struct eth_driver *eth_drv, hw->hw_addr = (uint8_t *)(pci_dev->mem_resource[0].addr); if (!hw->hw_addr) { PMD_INIT_LOG(ERR, "Hardware is not available, " - "as address is NULL\n"); + "as address is NULL"); return -ENODEV; } @@ -395,7 +395,8 @@ eth_i40e_dev_init(__rte_unused struct eth_driver *eth_drv, /* Initialize the shared code (base driver) */ ret = i40e_init_shared_code(hw); if (ret) { - PMD_INIT_LOG(ERR, "Failed to init shared code (base driver): %d", ret); + PMD_INIT_LOG(ERR, "Failed to init shared code (base driver):" + "%d", ret); return ret; } @@ -406,8 +407,7 @@ eth_i40e_dev_init(__rte_unused struct eth_driver *eth_drv, PMD_INIT_LOG(ERR, "Failed to init adminq: %d", ret); return -EIO; } - PMD_INIT_LOG(INFO, "FW %d.%d API %d.%d NVM " - "%02d.%02d.%02d eetrack %04x\n", + PMD_INIT_LOG(INFO, "FW %d.%d API %d.%d NVM %02d.%02d.%02d eetrack %04x", hw->aq.fw_maj_ver, hw->aq.fw_min_ver, hw->aq.api_maj_ver, hw->aq.api_min_ver, ((hw->nvm.version >> 12) & 0xf), @@ -417,7 +417,7 @@ eth_i40e_dev_init(__rte_unused struct eth_driver *eth_drv, /* Disable LLDP */ ret = i40e_aq_stop_lldp(hw, true, NULL); if (ret != I40E_SUCCESS) /* Its failure can be ignored */ - PMD_INIT_LOG(INFO, "Failed to stop lldp\n"); + PMD_INIT_LOG(INFO, "Failed to stop lldp"); /* Clear PXE mode */ i40e_clear_pxe_mode(hw); @@ -439,13 +439,13 @@ eth_i40e_dev_init(__rte_unused struct eth_driver *eth_drv, /* Initialize the queue management */ ret = i40e_res_pool_init(&pf->qp_pool, 0, hw->func_caps.num_tx_qp); if (ret < 0) { - PMD_INIT_LOG(ERR, "Failed to init queue pool\n"); + PMD_INIT_LOG(ERR, "Failed to init queue pool"); goto err_qp_pool_init; } ret = i40e_res_pool_init(&pf->msix_pool, 1, hw->func_caps.num_msix_vectors - 1); if (ret < 0) { - PMD_INIT_LOG(ERR, "Failed to init MSIX pool\n"); + PMD_INIT_LOG(ERR, "Failed to init MSIX pool"); goto err_msix_pool_init; } @@ -499,8 +499,8 @@ eth_i40e_dev_init(__rte_unused struct eth_driver *eth_drv, /* Should be after VSI initialized */ dev->data->mac_addrs = rte_zmalloc("i40e", len, 0); if (!dev->data->mac_addrs) { - PMD_INIT_LOG(ERR, "Failed to allocated memory " - "for storing mac address"); + PMD_INIT_LOG(ERR, "Failed to allocated memory for storing " + "mac address"); goto err_get_mac_addr; } ether_addr_copy((struct ether_addr *)hw->mac.perm_addr, @@ -723,9 +723,9 @@ i40e_phy_conf_link(struct i40e_hw *hw, uint8_t abilities, uint8_t force_speed) phy_conf.eeer = phy_ab.eeer_val; phy_conf.low_power_ctrl = phy_ab.d3_lpan; - PMD_DRV_LOG(DEBUG, "\n\tCurrent: abilities %x, link_speed %x\n" - "\tConfig: abilities %x, link_speed %x", - phy_ab.abilities, phy_ab.link_speed, + PMD_DRV_LOG(DEBUG, "\tCurrent: abilities %x, link_speed %x", + phy_ab.abilities, phy_ab.link_speed); + PMD_DRV_LOG(DEBUG, "\tConfig: abilities %x, link_speed %x", phy_conf.abilities, phy_conf.link_speed); status = i40e_aq_set_phy_config(hw, &phy_conf, NULL); @@ -763,7 +763,7 @@ i40e_dev_start(struct rte_eth_dev *dev) if ((dev->data->dev_conf.link_duplex != ETH_LINK_AUTONEG_DUPLEX) && (dev->data->dev_conf.link_duplex != ETH_LINK_FULL_DUPLEX)) { - PMD_INIT_LOG(ERR, "Invalid link_duplex (%hu) for port %hhu\n", + PMD_INIT_LOG(ERR, "Invalid link_duplex (%hu) for port %hhu", dev->data->dev_conf.link_duplex, dev->data->port_id); return -EINVAL; @@ -772,7 +772,7 @@ i40e_dev_start(struct rte_eth_dev *dev) /* Initialize VSI */ ret = i40e_vsi_init(vsi); if (ret != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Failed to init VSI\n"); + PMD_DRV_LOG(ERR, "Failed to init VSI"); goto err_up; } @@ -783,7 +783,7 @@ i40e_dev_start(struct rte_eth_dev *dev) /* Enable all queues which have been configured */ ret = i40e_vsi_switch_queues(vsi, TRUE); if (ret != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Failed to enable VSI\n"); + PMD_DRV_LOG(ERR, "Failed to enable VSI"); goto err_up; } @@ -791,13 +791,13 @@ i40e_dev_start(struct rte_eth_dev *dev) if ((vsi->type == I40E_VSI_MAIN) || (vsi->type == I40E_VSI_VMDQ2)) { ret = i40e_aq_set_vsi_broadcast(hw, vsi->seid, true, NULL); if (ret != I40E_SUCCESS) - PMD_DRV_LOG(INFO, "fail to set vsi broadcast\n"); + PMD_DRV_LOG(INFO, "fail to set vsi broadcast"); } /* Apply link configure */ ret = i40e_apply_link_speed(dev); if (I40E_SUCCESS != ret) { - PMD_DRV_LOG(ERR, "Fail to apply link setting\n"); + PMD_DRV_LOG(ERR, "Fail to apply link setting"); goto err_up; } @@ -872,12 +872,12 @@ i40e_dev_promiscuous_enable(struct rte_eth_dev *dev) status = i40e_aq_set_vsi_unicast_promiscuous(hw, vsi->seid, true, NULL); if (status != I40E_SUCCESS) - PMD_DRV_LOG(ERR, "Failed to enable unicast promiscuous\n"); + PMD_DRV_LOG(ERR, "Failed to enable unicast promiscuous"); status = i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid, TRUE, NULL); if (status != I40E_SUCCESS) - PMD_DRV_LOG(ERR, "Failed to enable multicast promiscuous\n"); + PMD_DRV_LOG(ERR, "Failed to enable multicast promiscuous"); } @@ -892,12 +892,12 @@ i40e_dev_promiscuous_disable(struct rte_eth_dev *dev) status = i40e_aq_set_vsi_unicast_promiscuous(hw, vsi->seid, false, NULL); if (status != I40E_SUCCESS) - PMD_DRV_LOG(ERR, "Failed to disable unicast promiscuous\n"); + PMD_DRV_LOG(ERR, "Failed to disable unicast promiscuous"); status = i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid, false, NULL); if (status != I40E_SUCCESS) - PMD_DRV_LOG(ERR, "Failed to disable multicast promiscuous\n"); + PMD_DRV_LOG(ERR, "Failed to disable multicast promiscuous"); } static void @@ -910,7 +910,7 @@ i40e_dev_allmulticast_enable(struct rte_eth_dev *dev) ret = i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid, TRUE, NULL); if (ret != I40E_SUCCESS) - PMD_DRV_LOG(ERR, "Failed to enable multicast promiscuous\n"); + PMD_DRV_LOG(ERR, "Failed to enable multicast promiscuous"); } static void @@ -927,7 +927,7 @@ i40e_dev_allmulticast_disable(struct rte_eth_dev *dev) ret = i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid, FALSE, NULL); if (ret != I40E_SUCCESS) - PMD_DRV_LOG(ERR, "Failed to disable multicast promiscuous\n"); + PMD_DRV_LOG(ERR, "Failed to disable multicast promiscuous"); } /* @@ -972,7 +972,7 @@ i40e_dev_link_update(struct rte_eth_dev *dev, if (status != I40E_SUCCESS) { link.link_speed = ETH_LINK_SPEED_100; link.link_duplex = ETH_LINK_FULL_DUPLEX; - PMD_DRV_LOG(ERR, "Failed to get link info\n"); + PMD_DRV_LOG(ERR, "Failed to get link info"); goto out; } @@ -1059,22 +1059,22 @@ i40e_update_vsi_stats(struct i40e_vsi *vsi) &oes->tx_errors, &nes->tx_errors); vsi->offset_loaded = true; - PMD_DRV_LOG(DEBUG, "***************** VSI[%u] stats start *******************\n", + PMD_DRV_LOG(DEBUG, "***************** VSI[%u] stats start *******************", vsi->vsi_id); - PMD_DRV_LOG(DEBUG, "rx_bytes: %lu\n", nes->rx_bytes); - PMD_DRV_LOG(DEBUG, "rx_unicast: %lu\n", nes->rx_unicast); - PMD_DRV_LOG(DEBUG, "rx_multicast: %lu\n", nes->rx_multicast); - PMD_DRV_LOG(DEBUG, "rx_broadcast: %lu\n", nes->rx_broadcast); - PMD_DRV_LOG(DEBUG, "rx_discards: %lu\n", nes->rx_discards); - PMD_DRV_LOG(DEBUG, "rx_unknown_protocol: %lu\n", + PMD_DRV_LOG(DEBUG, "rx_bytes: %lu", nes->rx_bytes); + PMD_DRV_LOG(DEBUG, "rx_unicast: %lu", nes->rx_unicast); + PMD_DRV_LOG(DEBUG, "rx_multicast: %lu", nes->rx_multicast); + PMD_DRV_LOG(DEBUG, "rx_broadcast: %lu", nes->rx_broadcast); + PMD_DRV_LOG(DEBUG, "rx_discards: %lu", nes->rx_discards); + PMD_DRV_LOG(DEBUG, "rx_unknown_protocol: %lu", nes->rx_unknown_protocol); - PMD_DRV_LOG(DEBUG, "tx_bytes: %lu\n", nes->tx_bytes); - PMD_DRV_LOG(DEBUG, "tx_unicast: %lu\n", nes->tx_unicast); - PMD_DRV_LOG(DEBUG, "tx_multicast: %lu\n", nes->tx_multicast); - PMD_DRV_LOG(DEBUG, "tx_broadcast: %lu\n", nes->tx_broadcast); - PMD_DRV_LOG(DEBUG, "tx_discards: %lu\n", nes->tx_discards); - PMD_DRV_LOG(DEBUG, "tx_errors: %lu\n", nes->tx_errors); - PMD_DRV_LOG(DEBUG, "***************** VSI[%u] stats end *******************\n", + PMD_DRV_LOG(DEBUG, "tx_bytes: %lu", nes->tx_bytes); + PMD_DRV_LOG(DEBUG, "tx_unicast: %lu", nes->tx_unicast); + PMD_DRV_LOG(DEBUG, "tx_multicast: %lu", nes->tx_multicast); + PMD_DRV_LOG(DEBUG, "tx_broadcast: %lu", nes->tx_broadcast); + PMD_DRV_LOG(DEBUG, "tx_discards: %lu", nes->tx_discards); + PMD_DRV_LOG(DEBUG, "tx_errors: %lu", nes->tx_errors); + PMD_DRV_LOG(DEBUG, "***************** VSI[%u] stats end *******************", vsi->vsi_id); } @@ -1276,74 +1276,74 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) if (pf->main_vsi) i40e_update_vsi_stats(pf->main_vsi); - PMD_DRV_LOG(DEBUG, "***************** PF stats start *******************\n"); - PMD_DRV_LOG(DEBUG, "rx_bytes: %lu\n", ns->eth.rx_bytes); - PMD_DRV_LOG(DEBUG, "rx_unicast: %lu\n", ns->eth.rx_unicast); - PMD_DRV_LOG(DEBUG, "rx_multicast: %lu\n", ns->eth.rx_multicast); - PMD_DRV_LOG(DEBUG, "rx_broadcast: %lu\n", ns->eth.rx_broadcast); - PMD_DRV_LOG(DEBUG, "rx_discards: %lu\n", ns->eth.rx_discards); - PMD_DRV_LOG(DEBUG, "rx_unknown_protocol: %lu\n", + PMD_DRV_LOG(DEBUG, "***************** PF stats start *******************"); + PMD_DRV_LOG(DEBUG, "rx_bytes: %lu", ns->eth.rx_bytes); + PMD_DRV_LOG(DEBUG, "rx_unicast: %lu", ns->eth.rx_unicast); + PMD_DRV_LOG(DEBUG, "rx_multicast: %lu", ns->eth.rx_multicast); + PMD_DRV_LOG(DEBUG, "rx_broadcast: %lu", ns->eth.rx_broadcast); + PMD_DRV_LOG(DEBUG, "rx_discards: %lu", ns->eth.rx_discards); + PMD_DRV_LOG(DEBUG, "rx_unknown_protocol: %lu", ns->eth.rx_unknown_protocol); - PMD_DRV_LOG(DEBUG, "tx_bytes: %lu\n", ns->eth.tx_bytes); - PMD_DRV_LOG(DEBUG, "tx_unicast: %lu\n", ns->eth.tx_unicast); - PMD_DRV_LOG(DEBUG, "tx_multicast: %lu\n", ns->eth.tx_multicast); - PMD_DRV_LOG(DEBUG, "tx_broadcast: %lu\n", ns->eth.tx_broadcast); - PMD_DRV_LOG(DEBUG, "tx_discards: %lu\n", ns->eth.tx_discards); - PMD_DRV_LOG(DEBUG, "tx_errors: %lu\n", ns->eth.tx_errors); - - PMD_DRV_LOG(DEBUG, "tx_dropped_link_down: %lu\n", + PMD_DRV_LOG(DEBUG, "tx_bytes: %lu", ns->eth.tx_bytes); + PMD_DRV_LOG(DEBUG, "tx_unicast: %lu", ns->eth.tx_unicast); + PMD_DRV_LOG(DEBUG, "tx_multicast: %lu", ns->eth.tx_multicast); + PMD_DRV_LOG(DEBUG, "tx_broadcast: %lu", ns->eth.tx_broadcast); + PMD_DRV_LOG(DEBUG, "tx_discards: %lu", ns->eth.tx_discards); + PMD_DRV_LOG(DEBUG, "tx_errors: %lu", ns->eth.tx_errors); + + PMD_DRV_LOG(DEBUG, "tx_dropped_link_down: %lu", ns->tx_dropped_link_down); - PMD_DRV_LOG(DEBUG, "crc_errors: %lu\n", ns->crc_errors); - PMD_DRV_LOG(DEBUG, "illegal_bytes: %lu\n", + PMD_DRV_LOG(DEBUG, "crc_errors: %lu", ns->crc_errors); + PMD_DRV_LOG(DEBUG, "illegal_bytes: %lu", ns->illegal_bytes); - PMD_DRV_LOG(DEBUG, "error_bytes: %lu\n", ns->error_bytes); - PMD_DRV_LOG(DEBUG, "mac_local_faults: %lu\n", + PMD_DRV_LOG(DEBUG, "error_bytes: %lu", ns->error_bytes); + PMD_DRV_LOG(DEBUG, "mac_local_faults: %lu", ns->mac_local_faults); - PMD_DRV_LOG(DEBUG, "mac_remote_faults: %lu\n", + PMD_DRV_LOG(DEBUG, "mac_remote_faults: %lu", ns->mac_remote_faults); - PMD_DRV_LOG(DEBUG, "rx_length_errors: %lu\n", + PMD_DRV_LOG(DEBUG, "rx_length_errors: %lu", ns->rx_length_errors); - PMD_DRV_LOG(DEBUG, "link_xon_rx: %lu\n", ns->link_xon_rx); - PMD_DRV_LOG(DEBUG, "link_xoff_rx: %lu\n", ns->link_xoff_rx); + PMD_DRV_LOG(DEBUG, "link_xon_rx: %lu", ns->link_xon_rx); + PMD_DRV_LOG(DEBUG, "link_xoff_rx: %lu", ns->link_xoff_rx); for (i = 0; i < 8; i++) { - PMD_DRV_LOG(DEBUG, "priority_xon_rx[%d]: %lu\n", + PMD_DRV_LOG(DEBUG, "priority_xon_rx[%d]: %lu", i, ns->priority_xon_rx[i]); - PMD_DRV_LOG(DEBUG, "priority_xoff_rx[%d]: %lu\n", + PMD_DRV_LOG(DEBUG, "priority_xoff_rx[%d]: %lu", i, ns->priority_xoff_rx[i]); } - PMD_DRV_LOG(DEBUG, "link_xon_tx: %lu\n", ns->link_xon_tx); - PMD_DRV_LOG(DEBUG, "link_xoff_tx: %lu\n", ns->link_xoff_tx); + PMD_DRV_LOG(DEBUG, "link_xon_tx: %lu", ns->link_xon_tx); + PMD_DRV_LOG(DEBUG, "link_xoff_tx: %lu", ns->link_xoff_tx); for (i = 0; i < 8; i++) { - PMD_DRV_LOG(DEBUG, "priority_xon_tx[%d]: %lu\n", + PMD_DRV_LOG(DEBUG, "priority_xon_tx[%d]: %lu", i, ns->priority_xon_tx[i]); - PMD_DRV_LOG(DEBUG, "priority_xoff_tx[%d]: %lu\n", + PMD_DRV_LOG(DEBUG, "priority_xoff_tx[%d]: %lu", i, ns->priority_xoff_tx[i]); - PMD_DRV_LOG(DEBUG, "priority_xon_2_xoff[%d]: %lu\n", + PMD_DRV_LOG(DEBUG, "priority_xon_2_xoff[%d]: %lu", i, ns->priority_xon_2_xoff[i]); } - PMD_DRV_LOG(DEBUG, "rx_size_64: %lu\n", ns->rx_size_64); - PMD_DRV_LOG(DEBUG, "rx_size_127: %lu\n", ns->rx_size_127); - PMD_DRV_LOG(DEBUG, "rx_size_255: %lu\n", ns->rx_size_255); - PMD_DRV_LOG(DEBUG, "rx_size_511: %lu\n", ns->rx_size_511); - PMD_DRV_LOG(DEBUG, "rx_size_1023: %lu\n", ns->rx_size_1023); - PMD_DRV_LOG(DEBUG, "rx_size_1522: %lu\n", ns->rx_size_1522); - PMD_DRV_LOG(DEBUG, "rx_size_big: %lu\n", ns->rx_size_big); - PMD_DRV_LOG(DEBUG, "rx_undersize: %lu\n", ns->rx_undersize); - PMD_DRV_LOG(DEBUG, "rx_fragments: %lu\n", ns->rx_fragments); - PMD_DRV_LOG(DEBUG, "rx_oversize: %lu\n", ns->rx_oversize); - PMD_DRV_LOG(DEBUG, "rx_jabber: %lu\n", ns->rx_jabber); - PMD_DRV_LOG(DEBUG, "tx_size_64: %lu\n", ns->tx_size_64); - PMD_DRV_LOG(DEBUG, "tx_size_127: %lu\n", ns->tx_size_127); - PMD_DRV_LOG(DEBUG, "tx_size_255: %lu\n", ns->tx_size_255); - PMD_DRV_LOG(DEBUG, "tx_size_511: %lu\n", ns->tx_size_511); - PMD_DRV_LOG(DEBUG, "tx_size_1023: %lu\n", ns->tx_size_1023); - PMD_DRV_LOG(DEBUG, "tx_size_1522: %lu\n", ns->tx_size_1522); - PMD_DRV_LOG(DEBUG, "tx_size_big: %lu\n", ns->tx_size_big); - PMD_DRV_LOG(DEBUG, "mac_short_packet_dropped: %lu\n", + PMD_DRV_LOG(DEBUG, "rx_size_64: %lu", ns->rx_size_64); + PMD_DRV_LOG(DEBUG, "rx_size_127: %lu", ns->rx_size_127); + PMD_DRV_LOG(DEBUG, "rx_size_255: %lu", ns->rx_size_255); + PMD_DRV_LOG(DEBUG, "rx_size_511: %lu", ns->rx_size_511); + PMD_DRV_LOG(DEBUG, "rx_size_1023: %lu", ns->rx_size_1023); + PMD_DRV_LOG(DEBUG, "rx_size_1522: %lu", ns->rx_size_1522); + PMD_DRV_LOG(DEBUG, "rx_size_big: %lu", ns->rx_size_big); + PMD_DRV_LOG(DEBUG, "rx_undersize: %lu", ns->rx_undersize); + PMD_DRV_LOG(DEBUG, "rx_fragments: %lu", ns->rx_fragments); + PMD_DRV_LOG(DEBUG, "rx_oversize: %lu", ns->rx_oversize); + PMD_DRV_LOG(DEBUG, "rx_jabber: %lu", ns->rx_jabber); + PMD_DRV_LOG(DEBUG, "tx_size_64: %lu", ns->tx_size_64); + PMD_DRV_LOG(DEBUG, "tx_size_127: %lu", ns->tx_size_127); + PMD_DRV_LOG(DEBUG, "tx_size_255: %lu", ns->tx_size_255); + PMD_DRV_LOG(DEBUG, "tx_size_511: %lu", ns->tx_size_511); + PMD_DRV_LOG(DEBUG, "tx_size_1023: %lu", ns->tx_size_1023); + PMD_DRV_LOG(DEBUG, "tx_size_1522: %lu", ns->tx_size_1522); + PMD_DRV_LOG(DEBUG, "tx_size_big: %lu", ns->tx_size_big); + PMD_DRV_LOG(DEBUG, "mac_short_packet_dropped: %lu", ns->mac_short_packet_dropped); - PMD_DRV_LOG(DEBUG, "checksum_error: %lu\n", + PMD_DRV_LOG(DEBUG, "checksum_error: %lu", ns->checksum_error); - PMD_DRV_LOG(DEBUG, "***************** PF stats end ********************\n"); + PMD_DRV_LOG(DEBUG, "***************** PF stats end ********************"); } /* Reset the statistics */ @@ -1520,12 +1520,12 @@ i40e_macaddr_add(struct rte_eth_dev *dev, int ret; if (!is_valid_assigned_ether_addr(mac_addr)) { - PMD_DRV_LOG(ERR, "Invalid ethernet address\n"); + PMD_DRV_LOG(ERR, "Invalid ethernet address"); return; } if (is_same_ether_addr(mac_addr, &(pf->dev_addr))) { - PMD_DRV_LOG(INFO, "Ignore adding permanent mac address\n"); + PMD_DRV_LOG(INFO, "Ignore adding permanent mac address"); return; } @@ -1533,7 +1533,7 @@ i40e_macaddr_add(struct rte_eth_dev *dev, ret = i40e_aq_mac_address_write(hw, I40E_AQC_WRITE_TYPE_LAA_ONLY, mac_addr->addr_bytes, NULL); if (ret != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Failed to write mac address\n"); + PMD_DRV_LOG(ERR, "Failed to write mac address"); return; } @@ -1543,7 +1543,7 @@ i40e_macaddr_add(struct rte_eth_dev *dev, ret = i40e_vsi_add_mac(vsi, mac_addr); if (ret != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Failed to add MACVLAN filter\n"); + PMD_DRV_LOG(ERR, "Failed to add MACVLAN filter"); return; } @@ -1573,7 +1573,7 @@ i40e_macaddr_remove(struct rte_eth_dev *dev, uint32_t index) ret = i40e_aq_mac_address_write(hw, I40E_AQC_WRITE_TYPE_LAA_ONLY, hw->mac.perm_addr, NULL); if (ret != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Failed to write mac address\n"); + PMD_DRV_LOG(ERR, "Failed to write mac address"); return; } @@ -1794,7 +1794,7 @@ i40e_get_cap(struct i40e_hw *hw) I40E_MAX_CAP_ELE_NUM; buf = rte_zmalloc("i40e", len, 0); if (!buf) { - PMD_DRV_LOG(ERR, "Failed to allocate memory\n"); + PMD_DRV_LOG(ERR, "Failed to allocate memory"); return I40E_ERR_NO_MEMORY; } @@ -1802,7 +1802,7 @@ i40e_get_cap(struct i40e_hw *hw) ret = i40e_aq_discover_capabilities(hw, buf, len, &size, i40e_aqc_opc_list_func_capabilities, NULL); if (ret != I40E_SUCCESS) - PMD_DRV_LOG(ERR, "Failed to discover capabilities\n"); + PMD_DRV_LOG(ERR, "Failed to discover capabilities"); /* Free the temporary buffer after being used */ rte_free(buf); @@ -1819,13 +1819,13 @@ i40e_pf_parameter_init(struct rte_eth_dev *dev) /* First check if FW support SRIOV */ if (dev->pci_dev->max_vfs && !hw->func_caps.sr_iov_1_1) { - PMD_INIT_LOG(ERR, "HW configuration doesn't support SRIOV\n"); + PMD_INIT_LOG(ERR, "HW configuration doesn't support SRIOV"); return -EINVAL; } pf->flags = I40E_FLAG_HEADER_SPLIT_DISABLED; pf->max_num_vsi = RTE_MIN(hw->func_caps.num_vsis, I40E_MAX_NUM_VSIS); - PMD_INIT_LOG(INFO, "Max supported VSIs:%u\n", pf->max_num_vsi); + PMD_INIT_LOG(INFO, "Max supported VSIs:%u", pf->max_num_vsi); /* Allocate queues for pf */ if (hw->func_caps.rss) { pf->flags |= I40E_FLAG_RSS; @@ -1837,27 +1837,27 @@ i40e_pf_parameter_init(struct rte_eth_dev *dev) sum_queues = pf->lan_nb_qps; /* Default VSI is not counted in */ sum_vsis = 0; - PMD_INIT_LOG(INFO, "PF queue pairs:%u\n", pf->lan_nb_qps); + PMD_INIT_LOG(INFO, "PF queue pairs:%u", pf->lan_nb_qps); if (hw->func_caps.sr_iov_1_1 && dev->pci_dev->max_vfs) { pf->flags |= I40E_FLAG_SRIOV; pf->vf_nb_qps = RTE_LIBRTE_I40E_QUEUE_NUM_PER_VF; if (dev->pci_dev->max_vfs > hw->func_caps.num_vfs) { PMD_INIT_LOG(ERR, "Config VF number %u, " - "max supported %u.\n", dev->pci_dev->max_vfs, + "max supported %u.", dev->pci_dev->max_vfs, hw->func_caps.num_vfs); return -EINVAL; } if (pf->vf_nb_qps > I40E_MAX_QP_NUM_PER_VF) { PMD_INIT_LOG(ERR, "FVL VF queue %u, " - "max support %u queues.\n", pf->vf_nb_qps, + "max support %u queues.", pf->vf_nb_qps, I40E_MAX_QP_NUM_PER_VF); return -EINVAL; } pf->vf_num = dev->pci_dev->max_vfs; sum_queues += pf->vf_nb_qps * pf->vf_num; sum_vsis += pf->vf_num; - PMD_INIT_LOG(INFO, "Max VF num:%u each has queue pairs:%u\n", + PMD_INIT_LOG(INFO, "Max VF num:%u each has queue pairs:%u", pf->vf_num, pf->vf_nb_qps); } else pf->vf_num = 0; @@ -1867,7 +1867,7 @@ i40e_pf_parameter_init(struct rte_eth_dev *dev) pf->vmdq_nb_qps = I40E_DEFAULT_QP_NUM_VMDQ; sum_queues += pf->vmdq_nb_qps; sum_vsis += 1; - PMD_INIT_LOG(INFO, "VMDQ queue pairs:%u\n", pf->vmdq_nb_qps); + PMD_INIT_LOG(INFO, "VMDQ queue pairs:%u", pf->vmdq_nb_qps); } if (hw->func_caps.fd) { @@ -1881,17 +1881,18 @@ i40e_pf_parameter_init(struct rte_eth_dev *dev) if (sum_vsis > pf->max_num_vsi || sum_queues > hw->func_caps.num_rx_qp) { - PMD_INIT_LOG(ERR, "VSI/QUEUE setting can't be satisfied\n"); - PMD_INIT_LOG(ERR, "Max VSIs: %u, asked:%u\n", + PMD_INIT_LOG(ERR, "VSI/QUEUE setting can't be satisfied"); + PMD_INIT_LOG(ERR, "Max VSIs: %u, asked:%u", pf->max_num_vsi, sum_vsis); - PMD_INIT_LOG(ERR, "Total queue pairs:%u, asked:%u\n", + PMD_INIT_LOG(ERR, "Total queue pairs:%u, asked:%u", hw->func_caps.num_rx_qp, sum_queues); return -EINVAL; } - /* Each VSI occupy 1 MSIX interrupt at least, plus IRQ0 for misc intr cause */ + /* Each VSI occupy 1 MSIX interrupt at least, plus IRQ0 for misc intr + * cause */ if (sum_vsis > hw->func_caps.num_msix_vectors - 1) { - PMD_INIT_LOG(ERR, "Too many VSIs(%u), MSIX intr(%u) not enough\n", + PMD_INIT_LOG(ERR, "Too many VSIs(%u), MSIX intr(%u) not enough", sum_vsis, hw->func_caps.num_msix_vectors); return -EINVAL; } @@ -1910,7 +1911,7 @@ i40e_pf_get_switch_config(struct i40e_pf *pf) switch_config = (struct i40e_aqc_get_switch_config_resp *)\ rte_zmalloc("i40e", I40E_AQ_LARGE_BUF, 0); if (!switch_config) { - PMD_DRV_LOG(ERR, "Failed to allocated memory\n"); + PMD_DRV_LOG(ERR, "Failed to allocated memory"); return -ENOMEM; } @@ -1918,12 +1919,12 @@ i40e_pf_get_switch_config(struct i40e_pf *pf) ret = i40e_aq_get_switch_config(hw, switch_config, I40E_AQ_LARGE_BUF, &start_seid, NULL); if (ret != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Failed to get switch configurations\n"); + PMD_DRV_LOG(ERR, "Failed to get switch configurations"); goto fail; } num_reported = rte_le_to_cpu_16(switch_config->header.num_reported); if (num_reported != 1) { /* The number should be 1 */ - PMD_DRV_LOG(ERR, "Wrong number of switch config reported\n"); + PMD_DRV_LOG(ERR, "Wrong number of switch config reported"); goto fail; } @@ -1933,7 +1934,7 @@ i40e_pf_get_switch_config(struct i40e_pf *pf) pf->mac_seid = rte_le_to_cpu_16(element->uplink_seid); pf->main_vsi_seid = rte_le_to_cpu_16(element->seid); } else - PMD_DRV_LOG(INFO, "Unknown element type\n"); + PMD_DRV_LOG(INFO, "Unknown element type"); fail: rte_free(switch_config); @@ -1952,8 +1953,7 @@ i40e_res_pool_init (struct i40e_res_pool_info *pool, uint32_t base, entry = rte_zmalloc("i40e", sizeof(*entry), 0); if (entry == NULL) { - PMD_DRV_LOG(ERR, "Failed to allocate memory for " - "resource pool\n"); + PMD_DRV_LOG(ERR, "Failed to allocate memory for resource pool"); return -ENOMEM; } @@ -2006,7 +2006,7 @@ i40e_res_pool_free(struct i40e_res_pool_info *pool, int insert; if (pool == NULL) { - PMD_DRV_LOG(ERR, "Invalid parameter\n"); + PMD_DRV_LOG(ERR, "Invalid parameter"); return -EINVAL; } @@ -2022,7 +2022,7 @@ i40e_res_pool_free(struct i40e_res_pool_info *pool, /* Not find, return */ if (valid_entry == NULL) { - PMD_DRV_LOG(ERR, "Failed to find entry\n"); + PMD_DRV_LOG(ERR, "Failed to find entry"); return -EINVAL; } @@ -2091,12 +2091,12 @@ i40e_res_pool_alloc(struct i40e_res_pool_info *pool, struct pool_entry *entry, *valid_entry; if (pool == NULL || num == 0) { - PMD_DRV_LOG(ERR, "Invalid parameter\n"); + PMD_DRV_LOG(ERR, "Invalid parameter"); return -EINVAL; } if (pool->num_free < num) { - PMD_DRV_LOG(ERR, "No resource. ask:%u, available:%u\n", + PMD_DRV_LOG(ERR, "No resource. ask:%u, available:%u", num, pool->num_free); return -ENOMEM; } @@ -2117,7 +2117,7 @@ i40e_res_pool_alloc(struct i40e_res_pool_info *pool, /* Not find one to satisfy the request, return */ if (valid_entry == NULL) { - PMD_DRV_LOG(ERR, "No valid entry found\n"); + PMD_DRV_LOG(ERR, "No valid entry found"); return -ENOMEM; } /** @@ -2135,7 +2135,7 @@ i40e_res_pool_alloc(struct i40e_res_pool_info *pool, entry = rte_zmalloc("res_pool", sizeof(*entry), 0); if (entry == NULL) { PMD_DRV_LOG(ERR, "Failed to allocate memory for " - "resource pool\n"); + "resource pool"); return -ENOMEM; } entry->base = valid_entry->base; @@ -2170,15 +2170,14 @@ validate_tcmap_parameter(struct i40e_vsi *vsi, uint8_t enabled_tcmap) /* If DCB is not supported, only default TC is supported */ if (!hw->func_caps.dcb && enabled_tcmap != I40E_DEFAULT_TCMAP) { - PMD_DRV_LOG(ERR, "DCB is not enabled, " - "only TC0 is supported\n"); + PMD_DRV_LOG(ERR, "DCB is not enabled, only TC0 is supported"); return -EINVAL; } if (!bitmap_is_subset(hw->func_caps.enabled_tcmap, enabled_tcmap)) { PMD_DRV_LOG(ERR, "Enabled TC map 0x%x not applicable to " - "HW support 0x%x\n", hw->func_caps.enabled_tcmap, - enabled_tcmap); + "HW support 0x%x", hw->func_caps.enabled_tcmap, + enabled_tcmap); return -EINVAL; } return I40E_SUCCESS; @@ -2194,7 +2193,7 @@ i40e_vsi_vlan_pvid_set(struct i40e_vsi *vsi, int ret; if (vsi == NULL || info == NULL) { - PMD_DRV_LOG(ERR, "invalid parameters\n"); + PMD_DRV_LOG(ERR, "invalid parameters"); return I40E_ERR_PARAM; } @@ -2226,7 +2225,7 @@ i40e_vsi_vlan_pvid_set(struct i40e_vsi *vsi, hw = I40E_VSI_TO_HW(vsi); ret = i40e_aq_update_vsi_params(hw, &ctxt, NULL); if (ret != I40E_SUCCESS) - PMD_DRV_LOG(ERR, "Failed to update VSI params\n"); + PMD_DRV_LOG(ERR, "Failed to update VSI params"); return ret; } @@ -2243,7 +2242,7 @@ i40e_vsi_update_tc_bandwidth(struct i40e_vsi *vsi, uint8_t enabled_tcmap) return ret; if (!vsi->seid) { - PMD_DRV_LOG(ERR, "seid not valid\n"); + PMD_DRV_LOG(ERR, "seid not valid"); return -EINVAL; } @@ -2255,7 +2254,7 @@ i40e_vsi_update_tc_bandwidth(struct i40e_vsi *vsi, uint8_t enabled_tcmap) ret = i40e_aq_config_vsi_tc_bw(hw, vsi->seid, &tc_bw_data, NULL); if (ret != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Failed to configure TC BW\n"); + PMD_DRV_LOG(ERR, "Failed to configure TC BW"); return ret; } @@ -2333,7 +2332,7 @@ i40e_veb_release(struct i40e_veb *veb) return -EINVAL; if (!TAILQ_EMPTY(&veb->head)) { - PMD_DRV_LOG(ERR, "VEB still has VSI attached, can't remove\n"); + PMD_DRV_LOG(ERR, "VEB still has VSI attached, can't remove"); return -EACCES; } @@ -2357,14 +2356,14 @@ i40e_veb_setup(struct i40e_pf *pf, struct i40e_vsi *vsi) if (NULL == pf || vsi == NULL) { PMD_DRV_LOG(ERR, "veb setup failed, " - "associated VSI shouldn't null\n"); + "associated VSI shouldn't null"); return NULL; } hw = I40E_PF_TO_HW(pf); veb = rte_zmalloc("i40e_veb", sizeof(struct i40e_veb), 0); if (!veb) { - PMD_DRV_LOG(ERR, "Failed to allocate memory for veb\n"); + PMD_DRV_LOG(ERR, "Failed to allocate memory for veb"); goto fail; } @@ -2376,8 +2375,8 @@ i40e_veb_setup(struct i40e_pf *pf, struct i40e_vsi *vsi) I40E_DEFAULT_TCMAP, false, false, &veb->seid, NULL); if (ret != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Add veb failed, aq_err: %d\n", - hw->aq.asq_last_status); + PMD_DRV_LOG(ERR, "Add veb failed, aq_err: %d", + hw->aq.asq_last_status); goto fail; } @@ -2385,8 +2384,8 @@ i40e_veb_setup(struct i40e_pf *pf, struct i40e_vsi *vsi) ret = i40e_aq_get_veb_parameters(hw, veb->seid, NULL, NULL, &veb->stats_idx, NULL, NULL, NULL); if (ret != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Get veb statics index failed, aq_err: %d\n", - hw->aq.asq_last_status); + PMD_DRV_LOG(ERR, "Get veb statics index failed, aq_err: %d", + hw->aq.asq_last_status); goto fail; } @@ -2433,7 +2432,7 @@ i40e_vsi_release(struct i40e_vsi *vsi) if (vsi->type != I40E_VSI_MAIN) { /* Remove vsi from parent's sibling list */ if (vsi->parent_vsi == NULL || vsi->parent_vsi->veb == NULL) { - PMD_DRV_LOG(ERR, "VSI's parent VSI is NULL\n"); + PMD_DRV_LOG(ERR, "VSI's parent VSI is NULL"); return I40E_ERR_PARAM; } TAILQ_REMOVE(&vsi->parent_vsi->veb->head, @@ -2442,7 +2441,7 @@ i40e_vsi_release(struct i40e_vsi *vsi) /* Remove all switch element of the VSI */ ret = i40e_aq_delete_element(hw, vsi->seid, NULL); if (ret != I40E_SUCCESS) - PMD_DRV_LOG(ERR, "Failed to delete element\n"); + PMD_DRV_LOG(ERR, "Failed to delete element"); } i40e_res_pool_free(&pf->qp_pool, vsi->base_queue); @@ -2473,11 +2472,11 @@ i40e_update_default_filter_setting(struct i40e_vsi *vsi) struct i40e_mac_filter *f; PMD_DRV_LOG(WARNING, "Cannot remove the default " - "macvlan filter\n"); + "macvlan filter"); /* It needs to add the permanent mac into mac list */ f = rte_zmalloc("macv_filter", sizeof(*f), 0); if (f == NULL) { - PMD_DRV_LOG(ERR, "failed to allocate memory\n"); + PMD_DRV_LOG(ERR, "failed to allocate memory"); return I40E_ERR_NO_MEMORY; } (void)rte_memcpy(&f->macaddr.addr_bytes, hw->mac.perm_addr, @@ -2504,7 +2503,7 @@ i40e_vsi_dump_bw_config(struct i40e_vsi *vsi) ret = i40e_aq_query_vsi_bw_config(hw, vsi->seid, &bw_config, NULL); if (ret != I40E_SUCCESS) { PMD_DRV_LOG(ERR, "VSI failed to get bandwidth " - "configuration %u\n", hw->aq.asq_last_status); + "configuration %u", hw->aq.asq_last_status); return ret; } @@ -2513,21 +2512,21 @@ i40e_vsi_dump_bw_config(struct i40e_vsi *vsi) &ets_sla_config, NULL); if (ret != I40E_SUCCESS) { PMD_DRV_LOG(ERR, "VSI failed to get TC bandwdith " - "configuration %u\n", hw->aq.asq_last_status); + "configuration %u", hw->aq.asq_last_status); return ret; } /* Not store the info yet, just print out */ - PMD_DRV_LOG(INFO, "VSI bw limit:%u\n", bw_config.port_bw_limit); - PMD_DRV_LOG(INFO, "VSI max_bw:%u\n", bw_config.max_bw); + PMD_DRV_LOG(INFO, "VSI bw limit:%u", bw_config.port_bw_limit); + PMD_DRV_LOG(INFO, "VSI max_bw:%u", bw_config.max_bw); for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) { - PMD_DRV_LOG(INFO, "\tVSI TC%u:share credits %u\n", i, - ets_sla_config.share_credits[i]); - PMD_DRV_LOG(INFO, "\tVSI TC%u:credits %u\n", i, - rte_le_to_cpu_16(ets_sla_config.credits[i])); + PMD_DRV_LOG(INFO, "\tVSI TC%u:share credits %u", i, + ets_sla_config.share_credits[i]); + PMD_DRV_LOG(INFO, "\tVSI TC%u:credits %u", i, + rte_le_to_cpu_16(ets_sla_config.credits[i])); PMD_DRV_LOG(INFO, "\tVSI TC%u: max credits: %u", i, - rte_le_to_cpu_16(ets_sla_config.credits[i / 4]) >> - (i * 4)); + rte_le_to_cpu_16(ets_sla_config.credits[i / 4]) >> + (i * 4)); } return 0; @@ -2549,13 +2548,13 @@ i40e_vsi_setup(struct i40e_pf *pf, if (type != I40E_VSI_MAIN && uplink_vsi == NULL) { PMD_DRV_LOG(ERR, "VSI setup failed, " - "VSI link shouldn't be NULL\n"); + "VSI link shouldn't be NULL"); return NULL; } if (type == I40E_VSI_MAIN && uplink_vsi != NULL) { PMD_DRV_LOG(ERR, "VSI setup failed, MAIN VSI " - "uplink VSI should be NULL\n"); + "uplink VSI should be NULL"); return NULL; } @@ -2564,14 +2563,14 @@ i40e_vsi_setup(struct i40e_pf *pf, uplink_vsi->veb = i40e_veb_setup(pf, uplink_vsi); if (NULL == uplink_vsi->veb) { - PMD_DRV_LOG(ERR, "VEB setup failed\n"); + PMD_DRV_LOG(ERR, "VEB setup failed"); return NULL; } } vsi = rte_zmalloc("i40e_vsi", sizeof(struct i40e_vsi), 0); if (!vsi) { - PMD_DRV_LOG(ERR, "Failed to allocate memory for vsi\n"); + PMD_DRV_LOG(ERR, "Failed to allocate memory for vsi"); return NULL; } TAILQ_INIT(&vsi->mac_list); @@ -2594,7 +2593,7 @@ i40e_vsi_setup(struct i40e_pf *pf, ret = i40e_res_pool_alloc(&pf->qp_pool, vsi->nb_qps); if (ret < 0) { PMD_DRV_LOG(ERR, "VSI %d allocate queue failed %d", - vsi->seid, ret); + vsi->seid, ret); goto fail_mem; } vsi->base_queue = ret; @@ -2603,7 +2602,8 @@ i40e_vsi_setup(struct i40e_pf *pf, if (type != I40E_VSI_SRIOV) { ret = i40e_res_pool_alloc(&pf->msix_pool, 1); if (ret < 0) { - PMD_DRV_LOG(ERR, "VSI %d get heap failed %d", vsi->seid, ret); + PMD_DRV_LOG(ERR, "VSI %d get heap failed %d", + vsi->seid, ret); goto fail_queue_alloc; } vsi->msix_intr = ret; @@ -2629,7 +2629,7 @@ i40e_vsi_setup(struct i40e_pf *pf, ctxt.vf_num = 0; ret = i40e_aq_get_vsi_params(hw, &ctxt, NULL); if (ret != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Failed to get VSI params\n"); + PMD_DRV_LOG(ERR, "Failed to get VSI params"); goto fail_msix_alloc; } (void)rte_memcpy(&vsi->info, &ctxt.info, @@ -2640,7 +2640,7 @@ i40e_vsi_setup(struct i40e_pf *pf, /* Configure tc, enabled TC0 only */ if (i40e_vsi_update_tc_bandwidth(vsi, I40E_DEFAULT_TCMAP) != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Failed to update TC bandwidth\n"); + PMD_DRV_LOG(ERR, "Failed to update TC bandwidth"); goto fail_msix_alloc; } @@ -2656,7 +2656,7 @@ i40e_vsi_setup(struct i40e_pf *pf, I40E_DEFAULT_TCMAP); if (ret != I40E_SUCCESS) { PMD_DRV_LOG(ERR, "Failed to configure " - "TC queue mapping\n"); + "TC queue mapping"); goto fail_msix_alloc; } ctxt.seid = vsi->seid; @@ -2667,7 +2667,7 @@ i40e_vsi_setup(struct i40e_pf *pf, /* Update VSI parameters */ ret = i40e_aq_update_vsi_params(hw, &ctxt, NULL); if (ret != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Failed to update VSI params\n"); + PMD_DRV_LOG(ERR, "Failed to update VSI params"); goto fail_msix_alloc; } @@ -2719,7 +2719,7 @@ i40e_vsi_setup(struct i40e_pf *pf, I40E_DEFAULT_TCMAP); if (ret != I40E_SUCCESS) { PMD_DRV_LOG(ERR, "Failed to configure " - "TC queue mapping\n"); + "TC queue mapping"); goto fail_msix_alloc; } ctxt.info.up_enable_bits = I40E_DEFAULT_TCMAP; @@ -2731,15 +2731,15 @@ i40e_vsi_setup(struct i40e_pf *pf, */ } else { - PMD_DRV_LOG(ERR, "VSI: Not support other type VSI yet\n"); + PMD_DRV_LOG(ERR, "VSI: Not support other type VSI yet"); goto fail_msix_alloc; } if (vsi->type != I40E_VSI_MAIN) { ret = i40e_aq_add_vsi(hw, &ctxt, NULL); if (ret) { - PMD_DRV_LOG(ERR, "add vsi failed, aq_err=%d\n", - hw->aq.asq_last_status); + PMD_DRV_LOG(ERR, "add vsi failed, aq_err=%d", + hw->aq.asq_last_status); goto fail_msix_alloc; } memcpy(&vsi->info, &ctxt.info, sizeof(ctxt.info)); @@ -2754,7 +2754,7 @@ i40e_vsi_setup(struct i40e_pf *pf, /* MAC/VLAN configuration */ ret = i40e_vsi_add_mac(vsi, &broadcast); if (ret != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Failed to add MACVLAN filter\n"); + PMD_DRV_LOG(ERR, "Failed to add MACVLAN filter"); goto fail_msix_alloc; } @@ -2806,8 +2806,8 @@ i40e_vsi_config_vlan_stripping(struct i40e_vsi *vsi, bool on) (void)rte_memcpy(&ctxt.info, &vsi->info, sizeof(vsi->info)); ret = i40e_aq_update_vsi_params(hw, &ctxt, NULL); if (ret) - PMD_DRV_LOG(INFO, "Update VSI failed to %s vlan stripping\n", - on ? "enable" : "disable"); + PMD_DRV_LOG(INFO, "Update VSI failed to %s vlan stripping", + on ? "enable" : "disable"); return ret; } @@ -2827,7 +2827,7 @@ i40e_dev_init_vlan(struct rte_eth_dev *dev) ret = i40e_vlan_pvid_set(dev, data->dev_conf.txmode.pvid, data->dev_conf.txmode.hw_vlan_insert_pvid); if (ret) - PMD_DRV_LOG(INFO, "Failed to update VSI params\n"); + PMD_DRV_LOG(INFO, "Failed to update VSI params"); return ret; } @@ -2852,13 +2852,13 @@ i40e_update_flow_control(struct i40e_hw *hw) memset(&link_status, 0, sizeof(link_status)); ret = i40e_aq_get_link_info(hw, FALSE, &link_status, NULL); if (ret != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Failed to get link status information\n"); + PMD_DRV_LOG(ERR, "Failed to get link status information"); goto write_reg; /* Disable flow control */ } an_info = hw->phy.link_info.an_info; if (!(an_info & I40E_AQ_AN_COMPLETED)) { - PMD_DRV_LOG(INFO, "Link auto negotiation not completed\n"); + PMD_DRV_LOG(INFO, "Link auto negotiation not completed"); ret = I40E_ERR_NOT_READY; goto write_reg; /* Disable flow control */ } @@ -2936,7 +2936,7 @@ i40e_pf_setup(struct i40e_pf *pf) ret = i40e_set_filter_control(hw, &settings); if (ret) PMD_INIT_LOG(WARNING, "setup_pf_filter_control failed: %d", - ret); + ret); /* Update flow control according to the auto negotiation */ i40e_update_flow_control(hw); @@ -2996,8 +2996,8 @@ i40e_switch_tx_queue(struct i40e_hw *hw, uint16_t q_idx, bool on) } /* Check if it is timeout */ if (j >= I40E_CHK_Q_ENA_COUNT) { - PMD_DRV_LOG(ERR, "Failed to %s tx queue[%u]\n", - (on ? "enable" : "disable"), q_idx); + PMD_DRV_LOG(ERR, "Failed to %s tx queue[%u]", + (on ? "enable" : "disable"), q_idx); return I40E_ERR_TIMEOUT; } @@ -3075,8 +3075,8 @@ i40e_switch_rx_queue(struct i40e_hw *hw, uint16_t q_idx, bool on) /* Check if it is timeout */ if (j >= I40E_CHK_Q_ENA_COUNT) { - PMD_DRV_LOG(ERR, "Failed to %s rx queue[%u]\n", - (on ? "enable" : "disable"), q_idx); + PMD_DRV_LOG(ERR, "Failed to %s rx queue[%u]", + (on ? "enable" : "disable"), q_idx); return I40E_ERR_TIMEOUT; } @@ -3119,7 +3119,7 @@ i40e_vsi_switch_queues(struct i40e_vsi *vsi, bool on) /* enable rx queues before enabling tx queues */ ret = i40e_vsi_switch_rx_queues(vsi, on); if (ret) { - PMD_DRV_LOG(ERR, "Failed to switch rx queues\n"); + PMD_DRV_LOG(ERR, "Failed to switch rx queues"); return ret; } ret = i40e_vsi_switch_tx_queues(vsi, on); @@ -3127,7 +3127,7 @@ i40e_vsi_switch_queues(struct i40e_vsi *vsi, bool on) /* Stop tx queues before stopping rx queues */ ret = i40e_vsi_switch_tx_queues(vsi, on); if (ret) { - PMD_DRV_LOG(ERR, "Failed to switch tx queues\n"); + PMD_DRV_LOG(ERR, "Failed to switch tx queues"); return ret; } ret = i40e_vsi_switch_rx_queues(vsi, on); @@ -3168,7 +3168,7 @@ i40e_vsi_rx_init(struct i40e_vsi *vsi) ret = i40e_rx_queue_init(data->rx_queues[i]); if (ret != I40E_SUCCESS) { PMD_DRV_LOG(ERR, "Failed to do RX queue " - "initialization\n"); + "initialization"); break; } } @@ -3184,12 +3184,12 @@ i40e_vsi_init(struct i40e_vsi *vsi) err = i40e_vsi_tx_init(vsi); if (err) { - PMD_DRV_LOG(ERR, "Failed to do vsi TX initialization\n"); + PMD_DRV_LOG(ERR, "Failed to do vsi TX initialization"); return err; } err = i40e_vsi_rx_init(vsi); if (err) { - PMD_DRV_LOG(ERR, "Failed to do vsi RX initialization\n"); + PMD_DRV_LOG(ERR, "Failed to do vsi RX initialization"); return err; } @@ -3318,14 +3318,14 @@ i40e_dev_handle_vfr_event(struct rte_eth_dev *dev) /* Clear the event first */ I40E_WRITE_REG(hw, I40E_GLGEN_VFLRSTAT(index), (0x1 << offset)); - PMD_DRV_LOG(INFO, "VF %u reset occured\n", abs_vf_id); + PMD_DRV_LOG(INFO, "VF %u reset occured", abs_vf_id); /** * Only notify a VF reset event occured, * don't trigger another SW reset */ ret = i40e_pf_host_vf_reset(&pf->vfs[i], 0); if (ret != I40E_SUCCESS) - PMD_DRV_LOG(ERR, "Failed to do VF reset\n"); + PMD_DRV_LOG(ERR, "Failed to do VF reset"); } } } @@ -3341,7 +3341,7 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev) info.msg_size = I40E_AQ_BUF_SZ; info.msg_buf = rte_zmalloc("msg_buffer", I40E_AQ_BUF_SZ, 0); if (!info.msg_buf) { - PMD_DRV_LOG(ERR, "Failed to allocate mem\n"); + PMD_DRV_LOG(ERR, "Failed to allocate mem"); return; } @@ -3351,7 +3351,7 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev) if (ret != I40E_SUCCESS) { PMD_DRV_LOG(INFO, "Failed to read msg from AdminQ, " - "aq_err: %u\n", hw->aq.asq_last_status); + "aq_err: %u", hw->aq.asq_last_status); break; } opcode = rte_le_to_cpu_16(info.desc.opcode); @@ -3367,8 +3367,8 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev) info.msg_size); break; default: - PMD_DRV_LOG(ERR, "Request %u is not supported yet\n", - opcode); + PMD_DRV_LOG(ERR, "Request %u is not supported yet", + opcode); break; } /* Reset the buffer after processing one */ @@ -3405,38 +3405,38 @@ i40e_dev_interrupt_handler(__rte_unused struct rte_intr_handle *handle, /* Shared IRQ case, return */ if (!(cause & I40E_PFINT_ICR0_INTEVENT_MASK)) { PMD_DRV_LOG(INFO, "Port%d INT0:share IRQ case, " - "no INT event to process\n", hw->pf_id); + "no INT event to process", hw->pf_id); goto done; } if (cause & I40E_PFINT_ICR0_LINK_STAT_CHANGE_MASK) { - PMD_DRV_LOG(INFO, "INT:Link status changed\n"); + PMD_DRV_LOG(INFO, "INT:Link status changed"); i40e_dev_link_update(dev, 0); } if (cause & I40E_PFINT_ICR0_ECC_ERR_MASK) - PMD_DRV_LOG(INFO, "INT:Unrecoverable ECC Error\n"); + PMD_DRV_LOG(INFO, "INT:Unrecoverable ECC Error"); if (cause & I40E_PFINT_ICR0_MAL_DETECT_MASK) - PMD_DRV_LOG(INFO, "INT:Malicious programming detected\n"); + PMD_DRV_LOG(INFO, "INT:Malicious programming detected"); if (cause & I40E_PFINT_ICR0_GRST_MASK) - PMD_DRV_LOG(INFO, "INT:Global Resets Requested\n"); + PMD_DRV_LOG(INFO, "INT:Global Resets Requested"); if (cause & I40E_PFINT_ICR0_PCI_EXCEPTION_MASK) - PMD_DRV_LOG(INFO, "INT:PCI EXCEPTION occured\n"); + PMD_DRV_LOG(INFO, "INT:PCI EXCEPTION occured"); if (cause & I40E_PFINT_ICR0_HMC_ERR_MASK) - PMD_DRV_LOG(INFO, "INT:HMC error occured\n"); + PMD_DRV_LOG(INFO, "INT:HMC error occured"); /* Add processing func to deal with VF reset vent */ if (cause & I40E_PFINT_ICR0_VFLR_MASK) { - PMD_DRV_LOG(INFO, "INT:VF reset detected\n"); + PMD_DRV_LOG(INFO, "INT:VF reset detected"); i40e_dev_handle_vfr_event(dev); } /* Find admin queue event */ if (cause & I40E_PFINT_ICR0_ADMINQ_MASK) { - PMD_DRV_LOG(INFO, "INT:ADMINQ event\n"); + PMD_DRV_LOG(INFO, "INT:ADMINQ event"); i40e_dev_handle_aq_msg(dev); } @@ -3466,7 +3466,7 @@ i40e_add_macvlan_filters(struct i40e_vsi *vsi, req_list = rte_zmalloc("macvlan_add", ele_buff_size, 0); if (req_list == NULL) { - PMD_DRV_LOG(ERR, "Fail to allocate memory\n"); + PMD_DRV_LOG(ERR, "Fail to allocate memory"); return I40E_ERR_NO_MEMORY; } @@ -3488,7 +3488,7 @@ i40e_add_macvlan_filters(struct i40e_vsi *vsi, ret = i40e_aq_add_macvlan(hw, vsi->seid, req_list, actual_num, NULL); if (ret != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Failed to add macvlan filter\n"); + PMD_DRV_LOG(ERR, "Failed to add macvlan filter"); goto DONE; } num += actual_num; @@ -3518,7 +3518,7 @@ i40e_remove_macvlan_filters(struct i40e_vsi *vsi, req_list = rte_zmalloc("macvlan_remove", ele_buff_size, 0); if (req_list == NULL) { - PMD_DRV_LOG(ERR, "Fail to allocate memory\n"); + PMD_DRV_LOG(ERR, "Fail to allocate memory"); return I40E_ERR_NO_MEMORY; } @@ -3538,7 +3538,7 @@ i40e_remove_macvlan_filters(struct i40e_vsi *vsi, ret = i40e_aq_remove_macvlan(hw, vsi->seid, req_list, actual_num, NULL); if (ret != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Failed to remove macvlan filter\n"); + PMD_DRV_LOG(ERR, "Failed to remove macvlan filter"); goto DONE; } num += actual_num; @@ -3626,7 +3626,7 @@ i40e_find_all_vlan_for_mac(struct i40e_vsi *vsi, if (vsi->vfta[j] & (1 << k)) { if (i > num - 1) { PMD_DRV_LOG(ERR, "vlan number " - "not match\n"); + "not match"); return I40E_ERR_PARAM; } (void)rte_memcpy(&mv_f[i].macaddr, @@ -3655,7 +3655,7 @@ i40e_find_all_mac_for_vlan(struct i40e_vsi *vsi, TAILQ_FOREACH(f, &vsi->mac_list, next) { if (i > num - 1) { - PMD_DRV_LOG(ERR, "buffer number not match\n"); + PMD_DRV_LOG(ERR, "buffer number not match"); return I40E_ERR_PARAM; } (void)rte_memcpy(&mv_f[i].macaddr, &f->macaddr, ETH_ADDR_LEN); @@ -3685,7 +3685,7 @@ i40e_vsi_remove_all_macvlan_filter(struct i40e_vsi *vsi) mv_f = rte_zmalloc("macvlan_data", num * sizeof(*mv_f), 0); if (mv_f == NULL) { - PMD_DRV_LOG(ERR, "failed to allocate memory\n"); + PMD_DRV_LOG(ERR, "failed to allocate memory"); return I40E_ERR_NO_MEMORY; } @@ -3731,14 +3731,14 @@ i40e_vsi_add_vlan(struct i40e_vsi *vsi, uint16_t vlan) mac_num = vsi->mac_num; if (mac_num == 0) { - PMD_DRV_LOG(ERR, "Error! VSI doesn't have a mac addr\n"); + PMD_DRV_LOG(ERR, "Error! VSI doesn't have a mac addr"); return I40E_ERR_PARAM; } mv_f = rte_zmalloc("macvlan_data", mac_num * sizeof(*mv_f), 0); if (mv_f == NULL) { - PMD_DRV_LOG(ERR, "failed to allocate memory\n"); + PMD_DRV_LOG(ERR, "failed to allocate memory"); return I40E_ERR_NO_MEMORY; } @@ -3782,14 +3782,14 @@ i40e_vsi_delete_vlan(struct i40e_vsi *vsi, uint16_t vlan) mac_num = vsi->mac_num; if (mac_num == 0) { - PMD_DRV_LOG(ERR, "Error! VSI doesn't have a mac addr\n"); + PMD_DRV_LOG(ERR, "Error! VSI doesn't have a mac addr"); return I40E_ERR_PARAM; } mv_f = rte_zmalloc("macvlan_data", mac_num * sizeof(*mv_f), 0); if (mv_f == NULL) { - PMD_DRV_LOG(ERR, "failed to allocate memory\n"); + PMD_DRV_LOG(ERR, "failed to allocate memory"); return I40E_ERR_NO_MEMORY; } @@ -3849,7 +3849,7 @@ i40e_vsi_add_mac(struct i40e_vsi *vsi, struct ether_addr *addr) mv_f = rte_zmalloc("macvlan_data", vlan_num * sizeof(*mv_f), 0); if (mv_f == NULL) { - PMD_DRV_LOG(ERR, "failed to allocate memory\n"); + PMD_DRV_LOG(ERR, "failed to allocate memory"); return I40E_ERR_NO_MEMORY; } @@ -3864,7 +3864,7 @@ i40e_vsi_add_mac(struct i40e_vsi *vsi, struct ether_addr *addr) /* Add the mac addr into mac list */ f = rte_zmalloc("macv_filter", sizeof(*f), 0); if (f == NULL) { - PMD_DRV_LOG(ERR, "failed to allocate memory\n"); + PMD_DRV_LOG(ERR, "failed to allocate memory"); ret = I40E_ERR_NO_MEMORY; goto DONE; } @@ -3894,12 +3894,12 @@ i40e_vsi_delete_mac(struct i40e_vsi *vsi, struct ether_addr *addr) vlan_num = vsi->vlan_num; if (vlan_num == 0) { - PMD_DRV_LOG(ERR, "VLAN number shouldn't be 0\n"); + PMD_DRV_LOG(ERR, "VLAN number shouldn't be 0"); return I40E_ERR_PARAM; } mv_f = rte_zmalloc("macvlan_data", vlan_num * sizeof(*mv_f), 0); if (mv_f == NULL) { - PMD_DRV_LOG(ERR, "failed to allocate memory\n"); + PMD_DRV_LOG(ERR, "failed to allocate memory"); return I40E_ERR_NO_MEMORY; } diff --git a/lib/librte_pmd_i40e/i40e_ethdev_vf.c b/lib/librte_pmd_i40e/i40e_ethdev_vf.c index 9c1ae94..8c89465 100644 --- a/lib/librte_pmd_i40e/i40e_ethdev_vf.c +++ b/lib/librte_pmd_i40e/i40e_ethdev_vf.c @@ -205,23 +205,22 @@ i40evf_parse_pfmsg(struct i40e_vf *vf, vf->link_up = vpe->event_data.link_event.link_status; vf->pend_msg |= PFMSG_LINK_CHANGE; - PMD_DRV_LOG(INFO, "Link status update:%s\n", - vf->link_up ? "up" : "down"); + PMD_DRV_LOG(INFO, "Link status update:%s", + vf->link_up ? "up" : "down"); break; case I40E_VIRTCHNL_EVENT_RESET_IMPENDING: vf->vf_reset = true; vf->pend_msg |= PFMSG_RESET_IMPENDING; - PMD_DRV_LOG(INFO, "vf is reseting\n"); + PMD_DRV_LOG(INFO, "vf is reseting"); break; case I40E_VIRTCHNL_EVENT_PF_DRIVER_CLOSE: vf->dev_closed = true; vf->pend_msg |= PFMSG_DRIVER_CLOSE; - PMD_DRV_LOG(INFO, "PF driver closed\n"); + PMD_DRV_LOG(INFO, "PF driver closed"); break; default: - PMD_DRV_LOG(ERR, - "%s: Unknown event %d from pf\n", - __func__, vpe->event); + PMD_DRV_LOG(ERR, "%s: Unknown event %d from pf", + __func__, vpe->event); } } else { /* async reply msg on command issued by vf previously */ @@ -315,7 +314,7 @@ _atomic_set_cmd(struct i40e_vf *vf, enum i40e_virtchnl_ops ops) I40E_VIRTCHNL_OP_UNKNOWN, ops); if (!ret) - PMD_DRV_LOG(ERR, "There is incomplete cmd %d\n", vf->pend_cmd); + PMD_DRV_LOG(ERR, "There is incomplete cmd %d", vf->pend_cmd); return !ret; } @@ -339,7 +338,7 @@ i40evf_execute_vf_cmd(struct rte_eth_dev *dev, struct vf_cmd_info *args) err = i40e_aq_send_msg_to_pf(hw, args->ops, I40E_SUCCESS, args->in_args, args->in_args_size, NULL); if (err) { - PMD_DRV_LOG(ERR, "fail to send cmd %d\n", args->ops); + PMD_DRV_LOG(ERR, "fail to send cmd %d", args->ops); return err; } @@ -348,10 +347,10 @@ i40evf_execute_vf_cmd(struct rte_eth_dev *dev, struct vf_cmd_info *args) if (!err && args->ops == info.ops) _clear_cmd(vf); else if (err) - PMD_DRV_LOG(ERR, "Failed to read message from AdminQ\n"); + PMD_DRV_LOG(ERR, "Failed to read message from AdminQ"); else if (args->ops != info.ops) - PMD_DRV_LOG(ERR, "command mismatch, expect %u, get %u\n", - args->ops, info.ops); + PMD_DRV_LOG(ERR, "command mismatch, expect %u, get %u", + args->ops, info.ops); return (err | info.result); } @@ -378,7 +377,7 @@ i40evf_check_api_version(struct rte_eth_dev *dev) err = i40evf_execute_vf_cmd(dev, &args); if (err) { - PMD_INIT_LOG(ERR, "fail to execute command OP_VERSION\n"); + PMD_INIT_LOG(ERR, "fail to execute command OP_VERSION"); return err; } @@ -386,14 +385,14 @@ i40evf_check_api_version(struct rte_eth_dev *dev) /* We are talking with DPDK host */ if (pver->major == I40E_DPDK_VERSION_MAJOR) { vf->host_is_dpdk = TRUE; - PMD_DRV_LOG(INFO, "Detect PF host is DPDK app\n"); + PMD_DRV_LOG(INFO, "Detect PF host is DPDK app"); } /* It's linux host driver */ else if ((pver->major != version.major) || (pver->minor != version.minor)) { PMD_INIT_LOG(ERR, "pf/vf API version mismatch. " - "(%u.%u)-(%u.%u)\n", pver->major, pver->minor, - version.major, version.minor); + "(%u.%u)-(%u.%u)", pver->major, pver->minor, + version.major, version.minor); return -1; } @@ -418,8 +417,7 @@ i40evf_get_vf_resource(struct rte_eth_dev *dev) err = i40evf_execute_vf_cmd(dev, &args); if (err) { - PMD_DRV_LOG(ERR, "fail to execute command " - "OP_GET_VF_RESOURCE\n"); + PMD_DRV_LOG(ERR, "fail to execute command OP_GET_VF_RESOURCE"); return err; } @@ -462,7 +460,7 @@ i40evf_config_promisc(struct rte_eth_dev *dev, if (err) PMD_DRV_LOG(ERR, "fail to execute command " - "CONFIG_PROMISCUOUS_MODE\n"); + "CONFIG_PROMISCUOUS_MODE"); return err; } @@ -487,7 +485,7 @@ i40evf_config_vlan_offload(struct rte_eth_dev *dev, err = i40evf_execute_vf_cmd(dev, &args); if (err) - PMD_DRV_LOG(ERR, "fail to execute command CFG_VLAN_OFFLOAD\n"); + PMD_DRV_LOG(ERR, "fail to execute command CFG_VLAN_OFFLOAD"); return err; } @@ -502,7 +500,7 @@ i40evf_config_vlan_pvid(struct rte_eth_dev *dev, struct i40e_virtchnl_pvid_info tpid_info; if (dev == NULL || info == NULL) { - PMD_DRV_LOG(ERR, "invalid parameters\n"); + PMD_DRV_LOG(ERR, "invalid parameters"); return I40E_ERR_PARAM; } @@ -518,7 +516,7 @@ i40evf_config_vlan_pvid(struct rte_eth_dev *dev, err = i40evf_execute_vf_cmd(dev, &args); if (err) - PMD_DRV_LOG(ERR, "fail to execute command CFG_VLAN_PVID\n"); + PMD_DRV_LOG(ERR, "fail to execute command CFG_VLAN_PVID"); return err; } @@ -542,7 +540,7 @@ i40evf_configure_queues(struct rte_eth_dev *dev) len = sizeof(*queue_info) + sizeof(*queue_cfg) * nb_qpairs; queue_info = rte_zmalloc("queue_info", len, 0); if (queue_info == NULL) { - PMD_INIT_LOG(ERR, "failed alloc memory for queue_info\n"); + PMD_INIT_LOG(ERR, "failed alloc memory for queue_info"); return -1; } queue_info->vsi_id = vf->vsi_res->vsi_id; @@ -595,7 +593,7 @@ i40evf_configure_queues(struct rte_eth_dev *dev) err = i40evf_execute_vf_cmd(dev, &args); if (err) PMD_DRV_LOG(ERR, "fail to execute command " - "OP_CONFIG_VSI_QUEUES\n"); + "OP_CONFIG_VSI_QUEUES"); rte_free(queue_info); return err; @@ -630,7 +628,7 @@ i40evf_config_irq_map(struct rte_eth_dev *dev) args.out_size = I40E_AQ_BUF_SZ; err = i40evf_execute_vf_cmd(dev, &args); if (err) - PMD_DRV_LOG(ERR, "fail to execute command OP_ENABLE_QUEUES\n"); + PMD_DRV_LOG(ERR, "fail to execute command OP_ENABLE_QUEUES"); return err; } @@ -661,8 +659,8 @@ i40evf_switch_queue(struct rte_eth_dev *dev, bool isrx, uint16_t qid, args.out_size = I40E_AQ_BUF_SZ; err = i40evf_execute_vf_cmd(dev, &args); if (err) - PMD_DRV_LOG(ERR, "fail to switch %s %u %s\n", isrx ? "RX" : "TX", - qid, on ? "on" : "off"); + PMD_DRV_LOG(ERR, "fail to switch %s %u %s", isrx ? "RX" : "TX", + qid, on ? "on" : "off"); return err; } @@ -680,8 +678,7 @@ i40evf_start_queues(struct rte_eth_dev *dev) if (rxq->start_rx_per_q) continue; if (i40evf_dev_rx_queue_start(dev, i) != 0) { - PMD_DRV_LOG(ERR, "Fail to start queue %u\n", - i); + PMD_DRV_LOG(ERR, "Fail to start queue %u", i); return -1; } } @@ -691,8 +688,7 @@ i40evf_start_queues(struct rte_eth_dev *dev) if (txq->start_tx_per_q) continue; if (i40evf_dev_tx_queue_start(dev, i) != 0) { - PMD_DRV_LOG(ERR, "Fail to start queue %u\n", - i); + PMD_DRV_LOG(ERR, "Fail to start queue %u", i); return -1; } } @@ -708,8 +704,7 @@ i40evf_stop_queues(struct rte_eth_dev *dev) /* Stop TX queues first */ for (i = 0; i < dev->data->nb_tx_queues; i++) { if (i40evf_dev_tx_queue_stop(dev, i) != 0) { - PMD_DRV_LOG(ERR, "Fail to start queue %u\n", - i); + PMD_DRV_LOG(ERR, "Fail to start queue %u", i); return -1; } } @@ -717,8 +712,7 @@ i40evf_stop_queues(struct rte_eth_dev *dev) /* Then stop RX queues */ for (i = 0; i < dev->data->nb_rx_queues; i++) { if (i40evf_dev_rx_queue_stop(dev, i) != 0) { - PMD_DRV_LOG(ERR, "Fail to start queue %u\n", - i); + PMD_DRV_LOG(ERR, "Fail to start queue %u", i); return -1; } } @@ -737,10 +731,10 @@ i40evf_add_mac_addr(struct rte_eth_dev *dev, struct ether_addr *addr) struct vf_cmd_info args; if (i40e_validate_mac_addr(addr->addr_bytes) != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Invalid mac:%x:%x:%x:%x:%x:%x\n", - addr->addr_bytes[0], addr->addr_bytes[1], - addr->addr_bytes[2], addr->addr_bytes[3], - addr->addr_bytes[4], addr->addr_bytes[5]); + PMD_DRV_LOG(ERR, "Invalid mac:%x:%x:%x:%x:%x:%x", + addr->addr_bytes[0], addr->addr_bytes[1], + addr->addr_bytes[2], addr->addr_bytes[3], + addr->addr_bytes[4], addr->addr_bytes[5]); return -1; } @@ -758,7 +752,7 @@ i40evf_add_mac_addr(struct rte_eth_dev *dev, struct ether_addr *addr) err = i40evf_execute_vf_cmd(dev, &args); if (err) PMD_DRV_LOG(ERR, "fail to execute command " - "OP_ADD_ETHER_ADDRESS\n"); + "OP_ADD_ETHER_ADDRESS"); return err; } @@ -774,10 +768,10 @@ i40evf_del_mac_addr(struct rte_eth_dev *dev, struct ether_addr *addr) struct vf_cmd_info args; if (i40e_validate_mac_addr(addr->addr_bytes) != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Invalid mac:%x-%x-%x-%x-%x-%x\n", - addr->addr_bytes[0], addr->addr_bytes[1], - addr->addr_bytes[2], addr->addr_bytes[3], - addr->addr_bytes[4], addr->addr_bytes[5]); + PMD_DRV_LOG(ERR, "Invalid mac:%x-%x-%x-%x-%x-%x", + addr->addr_bytes[0], addr->addr_bytes[1], + addr->addr_bytes[2], addr->addr_bytes[3], + addr->addr_bytes[4], addr->addr_bytes[5]); return -1; } @@ -795,7 +789,7 @@ i40evf_del_mac_addr(struct rte_eth_dev *dev, struct ether_addr *addr) err = i40evf_execute_vf_cmd(dev, &args); if (err) PMD_DRV_LOG(ERR, "fail to execute command " - "OP_DEL_ETHER_ADDRESS\n"); + "OP_DEL_ETHER_ADDRESS"); return err; } @@ -819,7 +813,7 @@ i40evf_get_statics(struct rte_eth_dev *dev, struct rte_eth_stats *stats) err = i40evf_execute_vf_cmd(dev, &args); if (err) { - PMD_DRV_LOG(ERR, "fail to execute command OP_GET_STATS\n"); + PMD_DRV_LOG(ERR, "fail to execute command OP_GET_STATS"); return err; } pstats = (struct i40e_eth_stats *)args.out_buffer; @@ -857,7 +851,7 @@ i40evf_add_vlan(struct rte_eth_dev *dev, uint16_t vlanid) args.out_size = I40E_AQ_BUF_SZ; err = i40evf_execute_vf_cmd(dev, &args); if (err) - PMD_DRV_LOG(ERR, "fail to execute command OP_ADD_VLAN\n"); + PMD_DRV_LOG(ERR, "fail to execute command OP_ADD_VLAN"); return err; } @@ -884,7 +878,7 @@ i40evf_del_vlan(struct rte_eth_dev *dev, uint16_t vlanid) args.out_size = I40E_AQ_BUF_SZ; err = i40evf_execute_vf_cmd(dev, &args); if (err) - PMD_DRV_LOG(ERR, "fail to execute command OP_DEL_VLAN\n"); + PMD_DRV_LOG(ERR, "fail to execute command OP_DEL_VLAN"); return err; } @@ -903,7 +897,7 @@ i40evf_get_link_status(struct rte_eth_dev *dev, struct rte_eth_link *link) args.out_size = I40E_AQ_BUF_SZ; err = i40evf_execute_vf_cmd(dev, &args); if (err) { - PMD_DRV_LOG(ERR, "fail to execute command OP_GET_LINK_STAT\n"); + PMD_DRV_LOG(ERR, "fail to execute command OP_GET_LINK_STAT"); return err; } @@ -939,7 +933,7 @@ i40evf_reset_vf(struct i40e_hw *hw) int i, reset; if (i40e_vf_reset(hw) != I40E_SUCCESS) { - PMD_INIT_LOG(ERR, "Reset VF NIC failed\n"); + PMD_INIT_LOG(ERR, "Reset VF NIC failed"); return -1; } /** @@ -964,7 +958,7 @@ i40evf_reset_vf(struct i40e_hw *hw) } if (i >= MAX_RESET_WAIT_CNT) { - PMD_INIT_LOG(ERR, "Reset VF NIC failed\n"); + PMD_INIT_LOG(ERR, "Reset VF NIC failed"); return -1; } @@ -980,49 +974,49 @@ i40evf_init_vf(struct rte_eth_dev *dev) err = i40evf_set_mac_type(hw); if (err) { - PMD_INIT_LOG(ERR, "set_mac_type failed: %d\n", err); + PMD_INIT_LOG(ERR, "set_mac_type failed: %d", err); goto err; } i40e_init_adminq_parameter(hw); err = i40e_init_adminq(hw); if (err) { - PMD_INIT_LOG(ERR, "init_adminq failed: %d\n", err); + PMD_INIT_LOG(ERR, "init_adminq failed: %d", err); goto err; } /* Reset VF and wait until it's complete */ if (i40evf_reset_vf(hw)) { - PMD_INIT_LOG(ERR, "reset NIC failed\n"); + PMD_INIT_LOG(ERR, "reset NIC failed"); goto err_aq; } /* VF reset, shutdown admin queue and initialize again */ if (i40e_shutdown_adminq(hw) != I40E_SUCCESS) { - PMD_INIT_LOG(ERR, "i40e_shutdown_adminq failed\n"); + PMD_INIT_LOG(ERR, "i40e_shutdown_adminq failed"); return -1; } i40e_init_adminq_parameter(hw); if (i40e_init_adminq(hw) != I40E_SUCCESS) { - PMD_INIT_LOG(ERR, "init_adminq failed\n"); + PMD_INIT_LOG(ERR, "init_adminq failed"); return -1; } if (i40evf_check_api_version(dev) != 0) { - PMD_INIT_LOG(ERR, "check_api version failed\n"); + PMD_INIT_LOG(ERR, "check_api version failed"); goto err_aq; } bufsz = sizeof(struct i40e_virtchnl_vf_resource) + (I40E_MAX_VF_VSI * sizeof(struct i40e_virtchnl_vsi_resource)); vf->vf_res = rte_zmalloc("vf_res", bufsz, 0); if (!vf->vf_res) { - PMD_INIT_LOG(ERR, "unable to allocate vf_res memory\n"); + PMD_INIT_LOG(ERR, "unable to allocate vf_res memory"); goto err_aq; } if (i40evf_get_vf_resource(dev) != 0) { - PMD_INIT_LOG(ERR, "i40evf_get_vf_config failed\n"); + PMD_INIT_LOG(ERR, "i40evf_get_vf_config failed"); goto err_alloc; } @@ -1033,7 +1027,7 @@ i40evf_init_vf(struct rte_eth_dev *dev) } if (!vf->vsi_res) { - PMD_INIT_LOG(ERR, "no LAN VSI found\n"); + PMD_INIT_LOG(ERR, "no LAN VSI found"); goto err_alloc; } @@ -1092,7 +1086,7 @@ i40evf_dev_init(__rte_unused struct eth_driver *eth_drv, hw->hw_addr = (void *)eth_dev->pci_dev->mem_resource[0].addr; if(i40evf_init_vf(eth_dev) != 0) { - PMD_INIT_LOG(ERR, "Init vf failed\n"); + PMD_INIT_LOG(ERR, "Init vf failed"); return -1; } @@ -1101,7 +1095,7 @@ i40evf_dev_init(__rte_unused struct eth_driver *eth_drv, ETHER_ADDR_LEN, 0); if (eth_dev->data->mac_addrs == NULL) { PMD_INIT_LOG(ERR, "Failed to allocate %d bytes needed to " - "store MAC addresses", ETHER_ADDR_LEN); + "store MAC addresses", ETHER_ADDR_LEN); return -ENOMEM; } ether_addr_copy((struct ether_addr *)hw->mac.addr, @@ -1229,7 +1223,7 @@ i40evf_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id) err = i40e_alloc_rx_queue_mbufs(rxq); if (err) { - PMD_DRV_LOG(ERR, "Failed to allocate RX queue mbuf\n"); + PMD_DRV_LOG(ERR, "Failed to allocate RX queue mbuf"); return err; } @@ -1243,8 +1237,8 @@ i40evf_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id) err = i40evf_switch_queue(dev, TRUE, rx_queue_id, TRUE); if (err) - PMD_DRV_LOG(ERR, "Failed to switch RX queue %u on\n", - rx_queue_id); + PMD_DRV_LOG(ERR, "Failed to switch RX queue %u on", + rx_queue_id); } return err; @@ -1262,8 +1256,8 @@ i40evf_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id) err = i40evf_switch_queue(dev, TRUE, rx_queue_id, FALSE); if (err) { - PMD_DRV_LOG(ERR, "Failed to switch RX queue %u off\n", - rx_queue_id); + PMD_DRV_LOG(ERR, "Failed to switch RX queue %u off", + rx_queue_id); return err; } @@ -1287,8 +1281,8 @@ i40evf_dev_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id) err = i40evf_switch_queue(dev, FALSE, tx_queue_id, TRUE); if (err) - PMD_DRV_LOG(ERR, "Failed to switch TX queue %u on\n", - tx_queue_id); + PMD_DRV_LOG(ERR, "Failed to switch TX queue %u on", + tx_queue_id); } return err; @@ -1306,8 +1300,8 @@ i40evf_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id) err = i40evf_switch_queue(dev, FALSE, tx_queue_id, FALSE); if (err) { - PMD_DRV_LOG(ERR, "Failed to switch TX queue %u of\n", - tx_queue_id); + PMD_DRV_LOG(ERR, "Failed to switch TX queue %u of", + tx_queue_id); return err; } @@ -1384,27 +1378,27 @@ i40evf_dev_start(struct rte_eth_dev *dev) struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private); struct ether_addr mac_addr; - PMD_DRV_LOG(DEBUG, "i40evf_dev_start"); + PMD_INIT_FUNC_TRACE(); vf->max_pkt_len = dev->data->dev_conf.rxmode.max_rx_pkt_len; if (dev->data->dev_conf.rxmode.jumbo_frame == 1) { if (vf->max_pkt_len <= ETHER_MAX_LEN || vf->max_pkt_len > I40E_FRAME_SIZE_MAX) { PMD_DRV_LOG(ERR, "maximum packet length must " - "be larger than %u and smaller than %u," - "as jumbo frame is enabled\n", - (uint32_t)ETHER_MAX_LEN, - (uint32_t)I40E_FRAME_SIZE_MAX); + "be larger than %u and smaller than %u," + "as jumbo frame is enabled", + (uint32_t)ETHER_MAX_LEN, + (uint32_t)I40E_FRAME_SIZE_MAX); return I40E_ERR_CONFIG; } } else { if (vf->max_pkt_len < ETHER_MIN_LEN || vf->max_pkt_len > ETHER_MAX_LEN) { PMD_DRV_LOG(ERR, "maximum packet length must be " - "larger than %u and smaller than %u, " - "as jumbo frame is disabled\n", - (uint32_t)ETHER_MIN_LEN, - (uint32_t)ETHER_MAX_LEN); + "larger than %u and smaller than %u, " + "as jumbo frame is disabled", + (uint32_t)ETHER_MIN_LEN, + (uint32_t)ETHER_MAX_LEN); return I40E_ERR_CONFIG; } } @@ -1413,18 +1407,18 @@ i40evf_dev_start(struct rte_eth_dev *dev) dev->data->nb_tx_queues); if (i40evf_rx_init(dev) != 0){ - PMD_DRV_LOG(ERR, "failed to do RX init\n"); + PMD_DRV_LOG(ERR, "failed to do RX init"); return -1; } i40evf_tx_init(dev); if (i40evf_configure_queues(dev) != 0) { - PMD_DRV_LOG(ERR, "configure queues failed\n"); + PMD_DRV_LOG(ERR, "configure queues failed"); goto err_queue; } if (i40evf_config_irq_map(dev)) { - PMD_DRV_LOG(ERR, "config_irq_map failed\n"); + PMD_DRV_LOG(ERR, "config_irq_map failed"); goto err_queue; } @@ -1432,12 +1426,12 @@ i40evf_dev_start(struct rte_eth_dev *dev) (void)rte_memcpy(mac_addr.addr_bytes, hw->mac.addr, sizeof(mac_addr.addr_bytes)); if (i40evf_add_mac_addr(dev, &mac_addr)) { - PMD_DRV_LOG(ERR, "Failed to add mac addr\n"); + PMD_DRV_LOG(ERR, "Failed to add mac addr"); goto err_queue; } if (i40evf_start_queues(dev) != 0) { - PMD_DRV_LOG(ERR, "enable queues failed\n"); + PMD_DRV_LOG(ERR, "enable queues failed"); goto err_mac; } @@ -1561,7 +1555,7 @@ i40evf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) { memset(stats, 0, sizeof(*stats)); if (i40evf_get_statics(dev, stats)) - PMD_DRV_LOG(ERR, "Get statics failed\n"); + PMD_DRV_LOG(ERR, "Get statics failed"); } static void diff --git a/lib/librte_pmd_i40e/i40e_pf.c b/lib/librte_pmd_i40e/i40e_pf.c index eec291f..682ff44 100644 --- a/lib/librte_pmd_i40e/i40e_pf.c +++ b/lib/librte_pmd_i40e/i40e_pf.c @@ -158,7 +158,7 @@ i40e_pf_host_vf_reset(struct i40e_pf_vf *vf, bool do_hw_reset) } if (i >= VFRESET_MAX_WAIT_CNT) { - PMD_DRV_LOG(ERR, "VF reset timeout\n"); + PMD_DRV_LOG(ERR, "VF reset timeout"); return -ETIMEDOUT; } @@ -171,7 +171,7 @@ i40e_pf_host_vf_reset(struct i40e_pf_vf *vf, bool do_hw_reset) qsel.tx_queues = qsel.rx_queues; ret = i40e_pf_host_switch_queues(vf, &qsel, false); if (ret != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Disable VF queues failed\n"); + PMD_DRV_LOG(ERR, "Disable VF queues failed"); return -EFAULT; } @@ -190,7 +190,7 @@ i40e_pf_host_vf_reset(struct i40e_pf_vf *vf, bool do_hw_reset) /* remove VSI */ ret = i40e_vsi_release(vf->vsi); if (ret != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Release VSI failed\n"); + PMD_DRV_LOG(ERR, "Release VSI failed"); return -EFAULT; } } @@ -209,7 +209,7 @@ i40e_pf_host_vf_reset(struct i40e_pf_vf *vf, bool do_hw_reset) } if (i >= VFRESET_MAX_WAIT_CNT) { - PMD_DRV_LOG(ERR, "Wait VF PCI transaction end timeout\n"); + PMD_DRV_LOG(ERR, "Wait VF PCI transaction end timeout"); return -ETIMEDOUT; } @@ -225,13 +225,13 @@ i40e_pf_host_vf_reset(struct i40e_pf_vf *vf, bool do_hw_reset) vf->vsi = i40e_vsi_setup(vf->pf, I40E_VSI_SRIOV, vf->pf->main_vsi, vf->vf_idx); if (vf->vsi == NULL) { - PMD_DRV_LOG(ERR, "Add vsi failed\n"); + PMD_DRV_LOG(ERR, "Add vsi failed"); return -EFAULT; } ret = i40e_pf_vf_queues_mapping(vf); if (ret != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "queue mapping error\n"); + PMD_DRV_LOG(ERR, "queue mapping error"); i40e_vsi_release(vf->vsi); return -EFAULT; } @@ -253,7 +253,7 @@ i40e_pf_host_send_msg_to_vf(struct i40e_pf_vf *vf, ret = i40e_aq_send_msg_to_vf(hw, abs_vf_id, opcode, retval, msg, msglen, NULL); if (ret) { - PMD_INIT_LOG(ERR, "Fail to send message to VF, err %u\n", + PMD_INIT_LOG(ERR, "Fail to send message to VF, err %u", hw->aq.asq_last_status); } @@ -295,7 +295,7 @@ i40e_pf_host_process_cmd_get_vf_resource(struct i40e_pf_vf *vf) vf_res = rte_zmalloc("i40e_vf_res", len, 0); if (vf_res == NULL) { - PMD_DRV_LOG(ERR, "failed to allocate mem\n"); + PMD_DRV_LOG(ERR, "failed to allocate mem"); ret = I40E_ERR_NO_MEMORY; vf_res = NULL; len = 0; @@ -421,7 +421,7 @@ i40e_pf_host_process_cmd_config_vsi_queues(struct i40e_pf_vf *vf, if (msg == NULL || msglen <= sizeof(*qconfig) || qconfig->num_queue_pairs > vsi->nb_qps) { - PMD_DRV_LOG(ERR, "vsi_queue_config_info argument wrong\n"); + PMD_DRV_LOG(ERR, "vsi_queue_config_info argument wrong"); ret = I40E_ERR_PARAM; goto send_msg; } @@ -466,20 +466,20 @@ i40e_pf_host_process_cmd_config_irq_map(struct i40e_pf_vf *vf, (struct i40e_virtchnl_irq_map_info *)msg; if (msg == NULL || msglen < sizeof(struct i40e_virtchnl_irq_map_info)) { - PMD_DRV_LOG(ERR, "buffer too short\n"); + PMD_DRV_LOG(ERR, "buffer too short"); ret = I40E_ERR_PARAM; goto send_msg; } /* Assume VF only have 1 vector to bind all queues */ if (irqmap->num_vectors != 1) { - PMD_DRV_LOG(ERR, "DKDK host only support 1 vector\n"); + PMD_DRV_LOG(ERR, "DKDK host only support 1 vector"); ret = I40E_ERR_PARAM; goto send_msg; } if (irqmap->vecmap[0].vector_id == 0) { - PMD_DRV_LOG(ERR, "DPDK host don't support use IRQ0\n"); + PMD_DRV_LOG(ERR, "DPDK host don't support use IRQ0"); ret = I40E_ERR_PARAM; goto send_msg; } @@ -601,7 +601,7 @@ i40e_pf_host_process_cmd_add_ether_address(struct i40e_pf_vf *vf, struct ether_addr *mac; if (msg == NULL || msglen <= sizeof(*addr_list)) { - PMD_DRV_LOG(ERR, "add_ether_address argument too short\n"); + PMD_DRV_LOG(ERR, "add_ether_address argument too short"); ret = I40E_ERR_PARAM; goto send_msg; } @@ -634,7 +634,7 @@ i40e_pf_host_process_cmd_del_ether_address(struct i40e_pf_vf *vf, struct ether_addr *mac; if (msg == NULL || msglen <= sizeof(*addr_list)) { - PMD_DRV_LOG(ERR, "delete_ether_address argument too short\n"); + PMD_DRV_LOG(ERR, "delete_ether_address argument too short"); ret = I40E_ERR_PARAM; goto send_msg; } @@ -667,7 +667,7 @@ i40e_pf_host_process_cmd_add_vlan(struct i40e_pf_vf *vf, uint16_t *vid; if (msg == NULL || msglen <= sizeof(*vlan_filter_list)) { - PMD_DRV_LOG(ERR, "add_vlan argument too short\n"); + PMD_DRV_LOG(ERR, "add_vlan argument too short"); ret = I40E_ERR_PARAM; goto send_msg; } @@ -699,7 +699,7 @@ i40e_pf_host_process_cmd_del_vlan(struct i40e_pf_vf *vf, uint16_t *vid; if (msg == NULL || msglen <= sizeof(*vlan_filter_list)) { - PMD_DRV_LOG(ERR, "delete_vlan argument too short\n"); + PMD_DRV_LOG(ERR, "delete_vlan argument too short"); ret = I40E_ERR_PARAM; goto send_msg; } @@ -796,7 +796,7 @@ i40e_pf_host_process_cmd_cfg_vlan_offload( ret = i40e_vsi_config_vlan_stripping(vf->vsi, !!offload->enable_vlan_strip); if (ret != 0) - PMD_DRV_LOG(ERR, "Failed to configure vlan stripping\n"); + PMD_DRV_LOG(ERR, "Failed to configure vlan stripping"); send_msg: i40e_pf_host_send_msg_to_vf(vf, I40E_VIRTCHNL_OP_CFG_VLAN_OFFLOAD, @@ -842,13 +842,13 @@ i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev, uint16_t vf_id = abs_vf_id - hw->func_caps.vf_base_id; if (!dev || vf_id > pf->vf_num - 1 || !pf->vfs) { - PMD_DRV_LOG(ERR, "invalid argument\n"); + PMD_DRV_LOG(ERR, "invalid argument"); return; } vf = &pf->vfs[vf_id]; if (!vf->vsi) { - PMD_DRV_LOG(ERR, "NO VSI associated with VF found\n"); + PMD_DRV_LOG(ERR, "NO VSI associated with VF found"); i40e_pf_host_send_msg_to_vf(vf, opcode, I40E_ERR_NO_AVAILABLE_VSI, NULL, 0); return; @@ -856,82 +856,81 @@ i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev, switch (opcode) { case I40E_VIRTCHNL_OP_VERSION : - PMD_DRV_LOG(INFO, "OP_VERSION received\n"); + PMD_DRV_LOG(INFO, "OP_VERSION received"); i40e_pf_host_process_cmd_version(vf); break; case I40E_VIRTCHNL_OP_RESET_VF : - PMD_DRV_LOG(INFO, "OP_RESET_VF received\n"); + PMD_DRV_LOG(INFO, "OP_RESET_VF received"); i40e_pf_host_process_cmd_reset_vf(vf); break; case I40E_VIRTCHNL_OP_GET_VF_RESOURCES: - PMD_DRV_LOG(INFO, "OP_GET_VF_RESOURCES received\n"); + PMD_DRV_LOG(INFO, "OP_GET_VF_RESOURCES received"); i40e_pf_host_process_cmd_get_vf_resource(vf); break; case I40E_VIRTCHNL_OP_CONFIG_VSI_QUEUES: - PMD_DRV_LOG(INFO, "OP_CONFIG_VSI_QUEUES received\n"); + PMD_DRV_LOG(INFO, "OP_CONFIG_VSI_QUEUES received"); i40e_pf_host_process_cmd_config_vsi_queues(vf, msg, msglen); break; case I40E_VIRTCHNL_OP_CONFIG_IRQ_MAP: - PMD_DRV_LOG(INFO, "OP_CONFIG_IRQ_MAP received\n"); + PMD_DRV_LOG(INFO, "OP_CONFIG_IRQ_MAP received"); i40e_pf_host_process_cmd_config_irq_map(vf, msg, msglen); break; case I40E_VIRTCHNL_OP_ENABLE_QUEUES: - PMD_DRV_LOG(INFO, "OP_ENABLE_QUEUES received\n"); + PMD_DRV_LOG(INFO, "OP_ENABLE_QUEUES received"); i40e_pf_host_process_cmd_enable_queues(vf, msg, msglen); break; case I40E_VIRTCHNL_OP_DISABLE_QUEUES: - PMD_DRV_LOG(INFO, "OP_DISABLE_QUEUE received\n"); + PMD_DRV_LOG(INFO, "OP_DISABLE_QUEUE received"); i40e_pf_host_process_cmd_disable_queues(vf, msg, msglen); break; case I40E_VIRTCHNL_OP_ADD_ETHER_ADDRESS: - PMD_DRV_LOG(INFO, "OP_ADD_ETHER_ADDRESS received\n"); + PMD_DRV_LOG(INFO, "OP_ADD_ETHER_ADDRESS received"); i40e_pf_host_process_cmd_add_ether_address(vf, msg, msglen); break; case I40E_VIRTCHNL_OP_DEL_ETHER_ADDRESS: - PMD_DRV_LOG(INFO, "OP_DEL_ETHER_ADDRESS received\n"); + PMD_DRV_LOG(INFO, "OP_DEL_ETHER_ADDRESS received"); i40e_pf_host_process_cmd_del_ether_address(vf, msg, msglen); break; case I40E_VIRTCHNL_OP_ADD_VLAN: - PMD_DRV_LOG(INFO, "OP_ADD_VLAN received\n"); + PMD_DRV_LOG(INFO, "OP_ADD_VLAN received"); i40e_pf_host_process_cmd_add_vlan(vf, msg, msglen); break; case I40E_VIRTCHNL_OP_DEL_VLAN: - PMD_DRV_LOG(INFO, "OP_DEL_VLAN received\n"); + PMD_DRV_LOG(INFO, "OP_DEL_VLAN received"); i40e_pf_host_process_cmd_del_vlan(vf, msg, msglen); break; case I40E_VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE: - PMD_DRV_LOG(INFO, "OP_CONFIG_PROMISCUOUS_MODE received\n"); + PMD_DRV_LOG(INFO, "OP_CONFIG_PROMISCUOUS_MODE received"); i40e_pf_host_process_cmd_config_promisc_mode(vf, msg, msglen); break; case I40E_VIRTCHNL_OP_GET_STATS: - PMD_DRV_LOG(INFO, "OP_GET_STATS received\n"); + PMD_DRV_LOG(INFO, "OP_GET_STATS received"); i40e_pf_host_process_cmd_get_stats(vf); break; case I40E_VIRTCHNL_OP_GET_LINK_STAT: - PMD_DRV_LOG(INFO, "OP_GET_LINK_STAT received\n"); + PMD_DRV_LOG(INFO, "OP_GET_LINK_STAT received"); i40e_pf_host_process_cmd_get_link_status(vf); break; case I40E_VIRTCHNL_OP_CFG_VLAN_OFFLOAD: - PMD_DRV_LOG(INFO, "OP_CFG_VLAN_OFFLOAD received\n"); + PMD_DRV_LOG(INFO, "OP_CFG_VLAN_OFFLOAD received"); i40e_pf_host_process_cmd_cfg_vlan_offload(vf, msg, msglen); break; case I40E_VIRTCHNL_OP_CFG_VLAN_PVID: - PMD_DRV_LOG(INFO, "OP_CFG_VLAN_PVID received\n"); + PMD_DRV_LOG(INFO, "OP_CFG_VLAN_PVID received"); i40e_pf_host_process_cmd_cfg_pvid(vf, msg, msglen); break; /* Don't add command supported below, which will * return an error code. */ case I40E_VIRTCHNL_OP_FCOE: - PMD_DRV_LOG(ERR, "OP_FCOE received, not supported\n"); + PMD_DRV_LOG(ERR, "OP_FCOE received, not supported"); default: - PMD_DRV_LOG(ERR, "%u received, not supported\n", - opcode); + PMD_DRV_LOG(ERR, "%u received, not supported", opcode); i40e_pf_host_send_msg_to_vf(vf, opcode, I40E_ERR_PARAM, NULL, 0); break; diff --git a/lib/librte_pmd_i40e/i40e_rxtx.c b/lib/librte_pmd_i40e/i40e_rxtx.c index 6987200..70fabaa 100644 --- a/lib/librte_pmd_i40e/i40e_rxtx.c +++ b/lib/librte_pmd_i40e/i40e_rxtx.c @@ -420,13 +420,13 @@ i40e_txd_enable_checksum(uint32_t ol_flags, uint8_t l3_len) { if (!l2_len) { - PMD_DRV_LOG(DEBUG, "L2 length set to 0\n"); + PMD_DRV_LOG(DEBUG, "L2 length set to 0"); return; } *td_offset |= (l2_len >> 1) << I40E_TX_DESC_LENGTH_MACLEN_SHIFT; if (!l3_len) { - PMD_DRV_LOG(DEBUG, "L3 length set to 0\n"); + PMD_DRV_LOG(DEBUG, "L3 length set to 0"); return; } @@ -507,7 +507,7 @@ i40e_xmit_cleanup(struct i40e_tx_queue *txq) if (!(txd[desc_to_clean_to].cmd_type_offset_bsz & rte_cpu_to_le_64(I40E_TX_DESC_DTYPE_DESC_DONE))) { PMD_TX_FREE_LOG(DEBUG, "TX descriptor %4u is not done " - "(port=%d queue=%d)", desc_to_clean_to, + "(port=%d queue=%d)", desc_to_clean_to, txq->port_id, txq->queue_id); return -1; } @@ -676,7 +676,7 @@ i40e_rx_alloc_bufs(struct i40e_rx_queue *rxq) diag = rte_mempool_get_bulk(rxq->mp, (void *)rxep, rxq->rx_free_thresh); if (unlikely(diag != 0)) { - PMD_DRV_LOG(ERR, "Failed to get mbufs in bulk\n"); + PMD_DRV_LOG(ERR, "Failed to get mbufs in bulk"); return -ENOMEM; } @@ -729,7 +729,7 @@ rx_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) uint16_t i, j; PMD_RX_LOG(DEBUG, "Rx mbuf alloc failed for " - "port_id=%u, queue_id=%u\n", + "port_id=%u, queue_id=%u", rxq->port_id, rxq->queue_id); rxq->rx_nb_avail = 0; rxq->rx_tail = (uint16_t)(rxq->rx_tail - nb_rx); @@ -1441,7 +1441,7 @@ i40e_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id) err = i40e_alloc_rx_queue_mbufs(rxq); if (err) { - PMD_DRV_LOG(ERR, "Failed to allocate RX queue mbuf\n"); + PMD_DRV_LOG(ERR, "Failed to allocate RX queue mbuf"); return err; } @@ -1453,8 +1453,8 @@ i40e_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id) err = i40e_switch_rx_queue(hw, rx_queue_id + q_base, TRUE); if (err) { - PMD_DRV_LOG(ERR, "Failed to switch RX queue %u on\n", - rx_queue_id); + PMD_DRV_LOG(ERR, "Failed to switch RX queue %u on", + rx_queue_id); i40e_rx_queue_release_mbufs(rxq); i40e_reset_rx_queue(rxq); @@ -1479,8 +1479,8 @@ i40e_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id) err = i40e_switch_rx_queue(hw, rx_queue_id + q_base, FALSE); if (err) { - PMD_DRV_LOG(ERR, "Failed to switch RX queue %u off\n", - rx_queue_id); + PMD_DRV_LOG(ERR, "Failed to switch RX queue %u off", + rx_queue_id); return err; } i40e_rx_queue_release_mbufs(rxq); @@ -1503,8 +1503,8 @@ i40e_dev_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id) if (tx_queue_id < dev->data->nb_tx_queues) { err = i40e_switch_tx_queue(hw, tx_queue_id + q_base, TRUE); if (err) - PMD_DRV_LOG(ERR, "Failed to switch TX queue %u on\n", - tx_queue_id); + PMD_DRV_LOG(ERR, "Failed to switch TX queue %u on", + tx_queue_id); } return err; @@ -1525,8 +1525,8 @@ i40e_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id) err = i40e_switch_tx_queue(hw, tx_queue_id + q_base, FALSE); if (err) { - PMD_DRV_LOG(ERR, "Failed to switch TX queue %u of\n", - tx_queue_id); + PMD_DRV_LOG(ERR, "Failed to switch TX queue %u of", + tx_queue_id); return err; } @@ -1554,14 +1554,14 @@ i40e_dev_rx_queue_setup(struct rte_eth_dev *dev, if (!vsi || queue_idx >= vsi->nb_qps) { PMD_DRV_LOG(ERR, "VSI not available or queue " - "index exceeds the maximum\n"); + "index exceeds the maximum"); return I40E_ERR_PARAM; } if (((nb_desc * sizeof(union i40e_rx_desc)) % I40E_ALIGN) != 0 || (nb_desc > I40E_MAX_RING_DESC) || (nb_desc < I40E_MIN_RING_DESC)) { PMD_DRV_LOG(ERR, "Number (%u) of receive descriptors is " - "invalid\n", nb_desc); + "invalid", nb_desc); return I40E_ERR_PARAM; } @@ -1578,7 +1578,7 @@ i40e_dev_rx_queue_setup(struct rte_eth_dev *dev, socket_id); if (!rxq) { PMD_DRV_LOG(ERR, "Failed to allocate memory for " - "rx queue data structure\n"); + "rx queue data structure"); return (-ENOMEM); } rxq->mp = mp; @@ -1603,7 +1603,7 @@ i40e_dev_rx_queue_setup(struct rte_eth_dev *dev, socket_id); if (!rz) { i40e_dev_rx_queue_release(rxq); - PMD_DRV_LOG(ERR, "Failed to reserve DMA memory for RX\n"); + PMD_DRV_LOG(ERR, "Failed to reserve DMA memory for RX"); return (-ENOMEM); } @@ -1632,7 +1632,7 @@ i40e_dev_rx_queue_setup(struct rte_eth_dev *dev, socket_id); if (!rxq->sw_ring) { i40e_dev_rx_queue_release(rxq); - PMD_DRV_LOG(ERR, "Failed to allocate memory for SW ring\n"); + PMD_DRV_LOG(ERR, "Failed to allocate memory for SW ring"); return (-ENOMEM); } @@ -1645,17 +1645,17 @@ i40e_dev_rx_queue_setup(struct rte_eth_dev *dev, if (!use_def_burst_func && !dev->data->scattered_rx) { #ifdef RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC PMD_INIT_LOG(DEBUG, "Rx Burst Bulk Alloc Preconditions are " - "satisfied. Rx Burst Bulk Alloc function will be " - "used on port=%d, queue=%d.\n", - rxq->port_id, rxq->queue_id); + "satisfied. Rx Burst Bulk Alloc function will be " + "used on port=%d, queue=%d.", + rxq->port_id, rxq->queue_id); dev->rx_pkt_burst = i40e_recv_pkts_bulk_alloc; #endif /* RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC */ } else { PMD_INIT_LOG(DEBUG, "Rx Burst Bulk Alloc Preconditions are " - "not satisfied, Scattered Rx is requested, " - "or RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC is " - "not enabled on port=%d, queue=%d.\n", - rxq->port_id, rxq->queue_id); + "not satisfied, Scattered Rx is requested, " + "or RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC is " + "not enabled on port=%d, queue=%d.", + rxq->port_id, rxq->queue_id); } return 0; @@ -1667,7 +1667,7 @@ i40e_dev_rx_queue_release(void *rxq) struct i40e_rx_queue *q = (struct i40e_rx_queue *)rxq; if (!q) { - PMD_DRV_LOG(DEBUG, "Pointer to rxq is NULL\n"); + PMD_DRV_LOG(DEBUG, "Pointer to rxq is NULL"); return; } @@ -1685,7 +1685,7 @@ i40e_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id) uint16_t desc = 0; if (unlikely(rx_queue_id >= dev->data->nb_rx_queues)) { - PMD_DRV_LOG(ERR, "Invalid RX queue id %u\n", rx_queue_id); + PMD_DRV_LOG(ERR, "Invalid RX queue id %u", rx_queue_id); return 0; } @@ -1719,7 +1719,7 @@ i40e_dev_rx_descriptor_done(void *rx_queue, uint16_t offset) int ret; if (unlikely(offset >= rxq->nb_rx_desc)) { - PMD_DRV_LOG(ERR, "Invalid RX queue id %u\n", offset); + PMD_DRV_LOG(ERR, "Invalid RX queue id %u", offset); return 0; } @@ -1751,7 +1751,7 @@ i40e_dev_tx_queue_setup(struct rte_eth_dev *dev, if (!vsi || queue_idx >= vsi->nb_qps) { PMD_DRV_LOG(ERR, "VSI is NULL, or queue index (%u) " - "exceeds the maximum\n", queue_idx); + "exceeds the maximum", queue_idx); return I40E_ERR_PARAM; } @@ -1759,7 +1759,7 @@ i40e_dev_tx_queue_setup(struct rte_eth_dev *dev, (nb_desc > I40E_MAX_RING_DESC) || (nb_desc < I40E_MIN_RING_DESC)) { PMD_DRV_LOG(ERR, "Number (%u) of transmit descriptors is " - "invalid\n", nb_desc); + "invalid", nb_desc); return I40E_ERR_PARAM; } @@ -1790,7 +1790,7 @@ i40e_dev_tx_queue_setup(struct rte_eth_dev *dev, if (tx_rs_thresh >= (nb_desc - 2)) { PMD_INIT_LOG(ERR, "tx_rs_thresh must be less than the " "number of TX descriptors minus 2. " - "(tx_rs_thresh=%u port=%d queue=%d)\n", + "(tx_rs_thresh=%u port=%d queue=%d)", (unsigned int)tx_rs_thresh, (int)dev->data->port_id, (int)queue_idx); @@ -1800,7 +1800,7 @@ i40e_dev_tx_queue_setup(struct rte_eth_dev *dev, PMD_INIT_LOG(ERR, "tx_rs_thresh must be less than the " "tx_free_thresh must be less than the " "number of TX descriptors minus 3. " - "(tx_free_thresh=%u port=%d queue=%d)\n", + "(tx_free_thresh=%u port=%d queue=%d)", (unsigned int)tx_free_thresh, (int)dev->data->port_id, (int)queue_idx); @@ -1809,7 +1809,7 @@ i40e_dev_tx_queue_setup(struct rte_eth_dev *dev, if (tx_rs_thresh > tx_free_thresh) { PMD_INIT_LOG(ERR, "tx_rs_thresh must be less than or " "equal to tx_free_thresh. (tx_free_thresh=%u" - " tx_rs_thresh=%u port=%d queue=%d)\n", + " tx_rs_thresh=%u port=%d queue=%d)", (unsigned int)tx_free_thresh, (unsigned int)tx_rs_thresh, (int)dev->data->port_id, @@ -1819,7 +1819,7 @@ i40e_dev_tx_queue_setup(struct rte_eth_dev *dev, if ((nb_desc % tx_rs_thresh) != 0) { PMD_INIT_LOG(ERR, "tx_rs_thresh must be a divisor of the " "number of TX descriptors. (tx_rs_thresh=%u" - " port=%d queue=%d)\n", + " port=%d queue=%d)", (unsigned int)tx_rs_thresh, (int)dev->data->port_id, (int)queue_idx); @@ -1828,7 +1828,7 @@ i40e_dev_tx_queue_setup(struct rte_eth_dev *dev, if ((tx_rs_thresh > 1) && (tx_conf->tx_thresh.wthresh != 0)) { PMD_INIT_LOG(ERR, "TX WTHRESH must be set to 0 if " "tx_rs_thresh is greater than 1. " - "(tx_rs_thresh=%u port=%d queue=%d)\n", + "(tx_rs_thresh=%u port=%d queue=%d)", (unsigned int)tx_rs_thresh, (int)dev->data->port_id, (int)queue_idx); @@ -1848,7 +1848,7 @@ i40e_dev_tx_queue_setup(struct rte_eth_dev *dev, socket_id); if (!txq) { PMD_DRV_LOG(ERR, "Failed to allocate memory for " - "tx queue structure\n"); + "tx queue structure"); return (-ENOMEM); } @@ -1862,7 +1862,7 @@ i40e_dev_tx_queue_setup(struct rte_eth_dev *dev, socket_id); if (!tz) { i40e_dev_tx_queue_release(txq); - PMD_DRV_LOG(ERR, "Failed to reserve DMA memory for TX\n"); + PMD_DRV_LOG(ERR, "Failed to reserve DMA memory for TX"); return (-ENOMEM); } @@ -1894,7 +1894,7 @@ i40e_dev_tx_queue_setup(struct rte_eth_dev *dev, socket_id); if (!txq->sw_ring) { i40e_dev_tx_queue_release(txq); - PMD_DRV_LOG(ERR, "Failed to allocate memory for SW TX ring\n"); + PMD_DRV_LOG(ERR, "Failed to allocate memory for SW TX ring"); return (-ENOMEM); } @@ -1905,10 +1905,10 @@ i40e_dev_tx_queue_setup(struct rte_eth_dev *dev, /* Use a simple TX queue without offloads or multi segs if possible */ if (((txq->txq_flags & I40E_SIMPLE_FLAGS) == I40E_SIMPLE_FLAGS) && (txq->tx_rs_thresh >= I40E_TX_MAX_BURST)) { - PMD_INIT_LOG(INFO, "Using simple tx path\n"); + PMD_INIT_LOG(INFO, "Using simple tx path"); dev->tx_pkt_burst = i40e_xmit_pkts_simple; } else { - PMD_INIT_LOG(INFO, "Using full-featured tx path\n"); + PMD_INIT_LOG(INFO, "Using full-featured tx path"); dev->tx_pkt_burst = i40e_xmit_pkts; } @@ -1921,7 +1921,7 @@ i40e_dev_tx_queue_release(void *txq) struct i40e_tx_queue *q = (struct i40e_tx_queue *)txq; if (!q) { - PMD_DRV_LOG(DEBUG, "Pointer to TX queue is NULL\n"); + PMD_DRV_LOG(DEBUG, "Pointer to TX queue is NULL"); return; } @@ -1962,7 +1962,7 @@ i40e_rx_queue_release_mbufs(struct i40e_rx_queue *rxq) uint16_t i; if (!rxq || !rxq->sw_ring) { - PMD_DRV_LOG(DEBUG, "Pointer to rxq or sw_ring is NULL\n"); + PMD_DRV_LOG(DEBUG, "Pointer to rxq or sw_ring is NULL"); return; } @@ -2022,7 +2022,7 @@ i40e_tx_queue_release_mbufs(struct i40e_tx_queue *txq) uint16_t i; if (!txq || !txq->sw_ring) { - PMD_DRV_LOG(DEBUG, "Pointer to rxq or sw_ring is NULL\n"); + PMD_DRV_LOG(DEBUG, "Pointer to rxq or sw_ring is NULL"); return; } @@ -2041,7 +2041,7 @@ i40e_reset_tx_queue(struct i40e_tx_queue *txq) uint16_t i, prev, size; if (!txq) { - PMD_DRV_LOG(DEBUG, "Pointer to txq is NULL\n"); + PMD_DRV_LOG(DEBUG, "Pointer to txq is NULL"); return; } @@ -2092,13 +2092,13 @@ i40e_tx_queue_init(struct i40e_tx_queue *txq) err = i40e_clear_lan_tx_queue_context(hw, pf_q); if (err != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Failure of clean lan tx queue context\n"); + PMD_DRV_LOG(ERR, "Failure of clean lan tx queue context"); return err; } err = i40e_set_lan_tx_queue_context(hw, pf_q, &tx_ctx); if (err != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Failure of set lan tx queue context\n"); + PMD_DRV_LOG(ERR, "Failure of set lan tx queue context"); return err; } @@ -2126,7 +2126,7 @@ i40e_alloc_rx_queue_mbufs(struct i40e_rx_queue *rxq) struct rte_mbuf *mbuf = rte_rxmbuf_alloc(rxq->mp); if (unlikely(!mbuf)) { - PMD_DRV_LOG(ERR, "Failed to allocate mbuf for RX\n"); + PMD_DRV_LOG(ERR, "Failed to allocate mbuf for RX"); return -ENOMEM; } @@ -2194,20 +2194,20 @@ i40e_rx_queue_config(struct i40e_rx_queue *rxq) if (rxq->max_pkt_len <= ETHER_MAX_LEN || rxq->max_pkt_len > I40E_FRAME_SIZE_MAX) { PMD_DRV_LOG(ERR, "maximum packet length must " - "be larger than %u and smaller than %u," - "as jumbo frame is enabled\n", - (uint32_t)ETHER_MAX_LEN, - (uint32_t)I40E_FRAME_SIZE_MAX); + "be larger than %u and smaller than %u," + "as jumbo frame is enabled", + (uint32_t)ETHER_MAX_LEN, + (uint32_t)I40E_FRAME_SIZE_MAX); return I40E_ERR_CONFIG; } } else { if (rxq->max_pkt_len < ETHER_MIN_LEN || rxq->max_pkt_len > ETHER_MAX_LEN) { PMD_DRV_LOG(ERR, "maximum packet length must be " - "larger than %u and smaller than %u, " - "as jumbo frame is disabled\n", - (uint32_t)ETHER_MIN_LEN, - (uint32_t)ETHER_MAX_LEN); + "larger than %u and smaller than %u, " + "as jumbo frame is disabled", + (uint32_t)ETHER_MIN_LEN, + (uint32_t)ETHER_MAX_LEN); return I40E_ERR_CONFIG; } } @@ -2230,7 +2230,7 @@ i40e_rx_queue_init(struct i40e_rx_queue *rxq) err = i40e_rx_queue_config(rxq); if (err < 0) { - PMD_DRV_LOG(ERR, "Failed to config RX queue\n"); + PMD_DRV_LOG(ERR, "Failed to config RX queue"); return err; } @@ -2262,12 +2262,12 @@ i40e_rx_queue_init(struct i40e_rx_queue *rxq) err = i40e_clear_lan_rx_queue_context(hw, pf_q); if (err != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Failed to clear LAN RX queue context\n"); + PMD_DRV_LOG(ERR, "Failed to clear LAN RX queue context"); return err; } err = i40e_set_lan_rx_queue_context(hw, pf_q, &rx_ctx); if (err != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Failed to set LAN RX queue context\n"); + PMD_DRV_LOG(ERR, "Failed to set LAN RX queue context"); return err; } -- 1.7.10.4