e1000: indent logs sections
authorDavid Marchand <david.marchand@6wind.com>
Wed, 17 Sep 2014 13:46:48 +0000 (15:46 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 18 Sep 2014 18:52:42 +0000 (20:52 +0200)
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 <david.marchand@6wind.com>
lib/librte_pmd_e1000/em_ethdev.c
lib/librte_pmd_e1000/em_rxtx.c
lib/librte_pmd_e1000/igb_ethdev.c
lib/librte_pmd_e1000/igb_rxtx.c

index 4555294..71aee67 100644 (file)
@@ -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);
index eabd0dd..66de44b 100644 (file)
@@ -472,12 +472,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
@@ -732,17 +732,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;
                }
@@ -825,10 +825,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);
@@ -912,16 +912,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;
                }
@@ -1070,10 +1070,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);
@@ -1310,7 +1310,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);
 
@@ -1440,7 +1440,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);
@@ -1603,7 +1603,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);
                }
 
index b45eb24..7cdea10 100644 (file)
@@ -651,10 +651,9 @@ eth_igbvf_dev_init(__attribute__((unused)) struct eth_driver *eth_drv,
                        &eth_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
index a245536..08e03ed 100644 (file)
@@ -1840,7 +1840,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 =