From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by dpdk.org (Postfix) with ESMTP id 8487CB3B0 for ; Wed, 17 Sep 2014 15:41:48 +0200 (CEST) Received: by mail-we0-f178.google.com with SMTP id q58so1470440wes.37 for ; Wed, 17 Sep 2014 06:47:29 -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:cc:subject:date:message-id:in-reply-to :references; bh=OnZghstDP7Q2HqpMm4zASBoNmv8cQ2C4nRMSiR3guoc=; b=YFqq4j54OsP2Oj8NuQ6+fNU7Zuik+92aeVcr6BdQUfESytfTmmiYoAqor13iTKyf3/ Bu5HtW5whXsKkLP0JyD31+MUwJT6zsRKTFW9U93Vj+IiGwtOcYbq/674lbNgPuDbYaHf ZrD4clA7qI+H2I+Ug0kt1Jke1rRMOwsXAlWlJOP0MqZX8e2jU06c6TRofmZ8+T1M4iAq I0LvPm31bosPI4es2uiaggAV2uoRAC9cgYojXTGHW63hNggzf0Ty+b/jlrjeJ2pDtzDo Ye1Mo0/AVkHO0qN9qeU5x5emxypytjWj88rIRQOM/41RVg38WJS8onIPDluuweZzVh8z gvpA== X-Gm-Message-State: ALoCoQlMKnabQ0klyh7UCFlpnLE/ZVJdSkKEDRevyG94ER24sHuVUyZ77jvy6IGayL85F0ONOemO X-Received: by 10.194.92.71 with SMTP id ck7mr50007347wjb.11.1410961649648; Wed, 17 Sep 2014 06:47:29 -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 fa20sm5712872wic.1.2014.09.17.06.47.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Sep 2014 06:47:28 -0700 (PDT) From: David Marchand To: dev@dpdk.org Date: Wed, 17 Sep 2014 15:46:48 +0200 Message-Id: <1410961612-8571-17-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1410961612-8571-1-git-send-email-david.marchand@6wind.com> References: <1410961612-8571-1-git-send-email-david.marchand@6wind.com> Subject: [dpdk-dev] [PATCH v3 16/20] e1000: indent logs sections 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: Wed, 17 Sep 2014 13:41:50 -0000 Prepare for next commit, indent sections where log messages will be modified so that next patch is only about \n. Signed-off-by: David Marchand --- lib/librte_pmd_e1000/em_ethdev.c | 28 ++++++++--------- lib/librte_pmd_e1000/em_rxtx.c | 60 ++++++++++++++++++------------------- lib/librte_pmd_e1000/igb_ethdev.c | 34 ++++++++++----------- lib/librte_pmd_e1000/igb_rxtx.c | 2 +- 4 files changed, 60 insertions(+), 64 deletions(-) diff --git a/lib/librte_pmd_e1000/em_ethdev.c b/lib/librte_pmd_e1000/em_ethdev.c index 4555294..71aee67 100644 --- a/lib/librte_pmd_e1000/em_ethdev.c +++ b/lib/librte_pmd_e1000/em_ethdev.c @@ -273,8 +273,8 @@ eth_em_dev_init(__attribute__((unused)) struct eth_driver *eth_drv, memset(shadow_vfta, 0, sizeof(*shadow_vfta)); PMD_INIT_LOG(INFO, "port_id %d vendorID=0x%x deviceID=0x%x\n", - eth_dev->data->port_id, pci_dev->id.vendor_id, - pci_dev->id.device_id); + eth_dev->data->port_id, pci_dev->id.vendor_id, + pci_dev->id.device_id); rte_intr_callback_register(&(pci_dev->intr_handle), eth_em_interrupt_handler, (void *)eth_dev); @@ -574,8 +574,8 @@ eth_em_start(struct rte_eth_dev *dev) error_invalid_config: PMD_INIT_LOG(ERR, "Invalid link_speed/link_duplex (%u/%u) for port " - "%u\n", dev->data->dev_conf.link_speed, - dev->data->dev_conf.link_duplex, dev->data->port_id); + "%u\n", dev->data->dev_conf.link_speed, + dev->data->dev_conf.link_duplex, dev->data->port_id); em_dev_clear_queues(dev); return (-EINVAL); } @@ -1296,20 +1296,16 @@ eth_em_interrupt_action(struct rte_eth_dev *dev) memset(&link, 0, sizeof(link)); rte_em_dev_atomic_read_link_status(dev, &link); if (link.link_status) { - PMD_INIT_LOG(INFO, - " Port %d: Link Up - speed %u Mbps - %s\n", - dev->data->port_id, (unsigned)link.link_speed, - link.link_duplex == ETH_LINK_FULL_DUPLEX ? - "full-duplex" : "half-duplex"); + PMD_INIT_LOG(INFO, " Port %d: Link Up - speed %u Mbps - %s\n", + dev->data->port_id, (unsigned)link.link_speed, + link.link_duplex == ETH_LINK_FULL_DUPLEX ? + "full-duplex" : "half-duplex"); } else { - PMD_INIT_LOG(INFO, " Port %d: Link Down\n", - dev->data->port_id); + PMD_INIT_LOG(INFO, " Port %d: Link Down\n", dev->data->port_id); } PMD_INIT_LOG(INFO, "PCI Address: %04d:%02d:%02d:%d", - dev->pci_dev->addr.domain, - dev->pci_dev->addr.bus, - dev->pci_dev->addr.devid, - dev->pci_dev->addr.function); + dev->pci_dev->addr.domain, dev->pci_dev->addr.bus, + dev->pci_dev->addr.devid, dev->pci_dev->addr.function); tctl = E1000_READ_REG(hw, E1000_TCTL); rctl = E1000_READ_REG(hw, E1000_RCTL); if (link.link_status) { @@ -1434,7 +1430,7 @@ eth_em_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf) /* At least reserve one Ethernet frame for watermark */ max_high_water = rx_buf_size - ETHER_MAX_LEN; if ((fc_conf->high_water > max_high_water) || - (fc_conf->high_water < fc_conf->low_water)) { + (fc_conf->high_water < fc_conf->low_water)) { PMD_INIT_LOG(ERR, "e1000 incorrect high/low water value \n"); PMD_INIT_LOG(ERR, "high water must <= 0x%x \n", max_high_water); return (-EINVAL); diff --git a/lib/librte_pmd_e1000/em_rxtx.c b/lib/librte_pmd_e1000/em_rxtx.c index ce0c115..278b7ee 100644 --- a/lib/librte_pmd_e1000/em_rxtx.c +++ b/lib/librte_pmd_e1000/em_rxtx.c @@ -474,12 +474,12 @@ eth_em_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, tx_last = (uint16_t) (tx_last - txq->nb_tx_desc); PMD_TX_LOG(DEBUG, "port_id=%u queue_id=%u pktlen=%u" - " tx_first=%u tx_last=%u\n", - (unsigned) txq->port_id, - (unsigned) txq->queue_id, - (unsigned) tx_pkt->pkt_len, - (unsigned) tx_id, - (unsigned) tx_last); + " tx_first=%u tx_last=%u\n", + (unsigned) txq->port_id, + (unsigned) txq->queue_id, + (unsigned) tx_pkt->pkt_len, + (unsigned) tx_id, + (unsigned) tx_last); /* * Make sure there are enough TX descriptors available to @@ -735,17 +735,17 @@ eth_em_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, * frames to its peer(s). */ PMD_RX_LOG(DEBUG, "\nport_id=%u queue_id=%u rx_id=%u " - "status=0x%x pkt_len=%u\n", - (unsigned) rxq->port_id, (unsigned) rxq->queue_id, - (unsigned) rx_id, (unsigned) status, - (unsigned) rte_le_to_cpu_16(rxd.length)); + "status=0x%x pkt_len=%u\n", + (unsigned) rxq->port_id, (unsigned) rxq->queue_id, + (unsigned) rx_id, (unsigned) status, + (unsigned) rte_le_to_cpu_16(rxd.length)); nmb = rte_rxmbuf_alloc(rxq->mb_pool); if (nmb == NULL) { PMD_RX_LOG(DEBUG, "RX mbuf alloc failed port_id=%u " - "queue_id=%u\n", - (unsigned) rxq->port_id, - (unsigned) rxq->queue_id); + "queue_id=%u\n", + (unsigned) rxq->port_id, + (unsigned) rxq->queue_id); rte_eth_devices[rxq->port_id].data->rx_mbuf_alloc_failed++; break; } @@ -828,10 +828,10 @@ eth_em_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, nb_hold = (uint16_t) (nb_hold + rxq->nb_rx_hold); if (nb_hold > rxq->rx_free_thresh) { PMD_RX_LOG(DEBUG, "port_id=%u queue_id=%u rx_tail=%u " - "nb_hold=%u nb_rx=%u\n", - (unsigned) rxq->port_id, (unsigned) rxq->queue_id, - (unsigned) rx_id, (unsigned) nb_hold, - (unsigned) nb_rx); + "nb_hold=%u nb_rx=%u\n", + (unsigned) rxq->port_id, (unsigned) rxq->queue_id, + (unsigned) rx_id, (unsigned) nb_hold, + (unsigned) nb_rx); rx_id = (uint16_t) ((rx_id == 0) ? (rxq->nb_rx_desc - 1) : (rx_id - 1)); E1000_PCI_REG_WRITE(rxq->rdt_reg_addr, rx_id); @@ -915,16 +915,16 @@ eth_em_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, * frames to its peer(s). */ PMD_RX_LOG(DEBUG, "\nport_id=%u queue_id=%u rx_id=%u " - "status=0x%x data_len=%u\n", - (unsigned) rxq->port_id, (unsigned) rxq->queue_id, - (unsigned) rx_id, (unsigned) status, - (unsigned) rte_le_to_cpu_16(rxd.length)); + "status=0x%x data_len=%u\n", + (unsigned) rxq->port_id, (unsigned) rxq->queue_id, + (unsigned) rx_id, (unsigned) status, + (unsigned) rte_le_to_cpu_16(rxd.length)); nmb = rte_rxmbuf_alloc(rxq->mb_pool); if (nmb == NULL) { PMD_RX_LOG(DEBUG, "RX mbuf alloc failed port_id=%u " - "queue_id=%u\n", (unsigned) rxq->port_id, - (unsigned) rxq->queue_id); + "queue_id=%u\n", (unsigned) rxq->port_id, + (unsigned) rxq->queue_id); rte_eth_devices[rxq->port_id].data->rx_mbuf_alloc_failed++; break; } @@ -1072,10 +1072,10 @@ eth_em_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, nb_hold = (uint16_t) (nb_hold + rxq->nb_rx_hold); if (nb_hold > rxq->rx_free_thresh) { PMD_RX_LOG(DEBUG, "port_id=%u queue_id=%u rx_tail=%u " - "nb_hold=%u nb_rx=%u\n", - (unsigned) rxq->port_id, (unsigned) rxq->queue_id, - (unsigned) rx_id, (unsigned) nb_hold, - (unsigned) nb_rx); + "nb_hold=%u nb_rx=%u\n", + (unsigned) rxq->port_id, (unsigned) rxq->queue_id, + (unsigned) rx_id, (unsigned) nb_hold, + (unsigned) nb_rx); rx_id = (uint16_t) ((rx_id == 0) ? (rxq->nb_rx_desc - 1) : (rx_id - 1)); E1000_PCI_REG_WRITE(rxq->rdt_reg_addr, rx_id); @@ -1312,7 +1312,7 @@ eth_em_tx_queue_setup(struct rte_eth_dev *dev, txq->tx_ring = (struct e1000_data_desc *) tz->addr; PMD_INIT_LOG(DEBUG, "sw_ring=%p hw_ring=%p dma_addr=0x%"PRIx64"\n", - txq->sw_ring, txq->tx_ring, txq->tx_ring_phys_addr); + txq->sw_ring, txq->tx_ring, txq->tx_ring_phys_addr); em_reset_tx_queue(txq); @@ -1442,7 +1442,7 @@ eth_em_rx_queue_setup(struct rte_eth_dev *dev, rxq->rx_ring = (struct e1000_rx_desc *) rz->addr; PMD_INIT_LOG(DEBUG, "sw_ring=%p hw_ring=%p dma_addr=0x%"PRIx64"\n", - rxq->sw_ring, rxq->rx_ring, rxq->rx_ring_phys_addr); + rxq->sw_ring, rxq->rx_ring, rxq->rx_ring_phys_addr); dev->data->rx_queues[queue_idx] = rxq; em_reset_rx_queue(rxq); @@ -1605,7 +1605,7 @@ em_alloc_rx_queue_mbufs(struct em_rx_queue *rxq) if (mbuf == NULL) { PMD_INIT_LOG(ERR, "RX mbuf alloc failed " - "queue_id=%hu\n", rxq->queue_id); + "queue_id=%hu\n", rxq->queue_id); return (-ENOMEM); } diff --git a/lib/librte_pmd_e1000/igb_ethdev.c b/lib/librte_pmd_e1000/igb_ethdev.c index b45eb24..7cdea10 100644 --- a/lib/librte_pmd_e1000/igb_ethdev.c +++ b/lib/librte_pmd_e1000/igb_ethdev.c @@ -651,10 +651,9 @@ eth_igbvf_dev_init(__attribute__((unused)) struct eth_driver *eth_drv, ð_dev->data->mac_addrs[0]); PMD_INIT_LOG(DEBUG, "\nport %d vendorID=0x%x deviceID=0x%x " - "mac.type=%s\n", - eth_dev->data->port_id, pci_dev->id.vendor_id, - pci_dev->id.device_id, - "igb_mac_82576_vf"); + "mac.type=%s\n", + eth_dev->data->port_id, pci_dev->id.vendor_id, + pci_dev->id.device_id, "igb_mac_82576_vf"); return 0; } @@ -889,8 +888,8 @@ eth_igb_start(struct rte_eth_dev *dev) error_invalid_config: PMD_INIT_LOG(ERR, "Invalid link_speed/link_duplex (%u/%u) for port %u\n", - dev->data->dev_conf.link_speed, - dev->data->dev_conf.link_duplex, dev->data->port_id); + dev->data->dev_conf.link_speed, + dev->data->dev_conf.link_duplex, dev->data->port_id); igb_dev_clear_queues(dev); return (-EINVAL); } @@ -1790,19 +1789,20 @@ eth_igb_interrupt_action(struct rte_eth_dev *dev) rte_igb_dev_atomic_read_link_status(dev, &link); if (link.link_status) { PMD_INIT_LOG(INFO, - " Port %d: Link Up - speed %u Mbps - %s\n", - dev->data->port_id, (unsigned)link.link_speed, - link.link_duplex == ETH_LINK_FULL_DUPLEX ? - "full-duplex" : "half-duplex"); + " Port %d: Link Up - speed %u Mbps - %s\n", + dev->data->port_id, + (unsigned)link.link_speed, + link.link_duplex == ETH_LINK_FULL_DUPLEX ? + "full-duplex" : "half-duplex"); } else { PMD_INIT_LOG(INFO, " Port %d: Link Down\n", - dev->data->port_id); + dev->data->port_id); } PMD_INIT_LOG(INFO, "PCI Address: %04d:%02d:%02d:%d", - dev->pci_dev->addr.domain, - dev->pci_dev->addr.bus, - dev->pci_dev->addr.devid, - dev->pci_dev->addr.function); + dev->pci_dev->addr.domain, + dev->pci_dev->addr.bus, + dev->pci_dev->addr.devid, + dev->pci_dev->addr.function); tctl = E1000_READ_REG(hw, E1000_TCTL); rctl = E1000_READ_REG(hw, E1000_RCTL); if (link.link_status) { @@ -1928,7 +1928,7 @@ eth_igb_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf) /* At least reserve one Ethernet frame for watermark */ max_high_water = rx_buf_size - ETHER_MAX_LEN; if ((fc_conf->high_water > max_high_water) || - (fc_conf->high_water < fc_conf->low_water)) { + (fc_conf->high_water < fc_conf->low_water)) { PMD_INIT_LOG(ERR, "e1000 incorrect high/low water value \n"); PMD_INIT_LOG(ERR, "high water must <= 0x%x \n", max_high_water); return (-EINVAL); @@ -2078,7 +2078,7 @@ igbvf_dev_configure(struct rte_eth_dev *dev) struct rte_eth_conf* conf = &dev->data->dev_conf; PMD_INIT_LOG(DEBUG, "\nConfigured Virtual Function port id: %d\n", - dev->data->port_id); + dev->data->port_id); /* * VF has no ability to enable/disable HW CRC diff --git a/lib/librte_pmd_e1000/igb_rxtx.c b/lib/librte_pmd_e1000/igb_rxtx.c index 5600d02..4946b8d 100644 --- a/lib/librte_pmd_e1000/igb_rxtx.c +++ b/lib/librte_pmd_e1000/igb_rxtx.c @@ -1847,7 +1847,7 @@ igb_alloc_rx_queue_mbufs(struct igb_rx_queue *rxq) if (mbuf == NULL) { PMD_INIT_LOG(ERR, "RX mbuf alloc failed " - "queue_id=%hu\n", rxq->queue_id); + "queue_id=%hu\n", rxq->queue_id); return (-ENOMEM); } dma_addr = -- 1.7.10.4