blob: 8c53d0f11bbb0812739dffd7a540b41c37834ce6 [file] [log] [blame]
Damjan Marionc42552d2016-04-12 05:10:25 +02001From 1ee05e874eaa3f03ee7b5fbd6a32dff7304bd620 Mon Sep 17 00:00:00 2001
2From: Damjan Marion <damarion@cisco.com>
3Date: Wed, 16 Dec 2015 03:29:22 +0100
4Subject: [PATCH 3/6] virtio: Cleanup virtio pmd debug log output, reset
5
6---
7 drivers/net/virtio/virtio_ethdev.c | 5 -----
8 drivers/net/virtio/virtio_rxtx.c | 4 +++-
9 2 files changed, 3 insertions(+), 6 deletions(-)
10
11diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
12index 63a368a..ed4e757 100644
13--- a/drivers/net/virtio/virtio_ethdev.c
14+++ b/drivers/net/virtio/virtio_ethdev.c
15@@ -1405,18 +1405,13 @@ virtio_dev_link_update(struct rte_eth_dev *dev, __rte_unused int wait_to_complet
16 link.link_speed = SPEED_10G;
17
18 if (vtpci_with_feature(hw, VIRTIO_NET_F_STATUS)) {
19- PMD_INIT_LOG(DEBUG, "Get link status from hw");
20 vtpci_read_dev_config(hw,
21 offsetof(struct virtio_net_config, status),
22 &status, sizeof(status));
23 if ((status & VIRTIO_NET_S_LINK_UP) == 0) {
24 link.link_status = ETH_LINK_DOWN;
25- PMD_INIT_LOG(DEBUG, "Port %d is down",
26- dev->data->port_id);
27 } else {
28 link.link_status = ETH_LINK_UP;
29- PMD_INIT_LOG(DEBUG, "Port %d is up",
30- dev->data->port_id);
31 }
32 } else {
33 link.link_status = ETH_LINK_UP;
34diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
35index ef21d8e..7fe14ad 100644
36--- a/drivers/net/virtio/virtio_rxtx.c
37+++ b/drivers/net/virtio/virtio_rxtx.c
38@@ -643,6 +643,7 @@ virtio_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
39 rxm->next = NULL;
40 rxm->pkt_len = (uint32_t)(len[i] - hdr_size);
41 rxm->data_len = (uint16_t)(len[i] - hdr_size);
42+ rxm->ol_flags = 0;
43
44 if (hw->vlan_strip)
45 rte_vlan_strip(rxm);
46@@ -760,6 +761,7 @@ virtio_recv_mergeable_pkts(void *rx_queue,
47 rxm->vlan_tci = 0;
48 rxm->pkt_len = (uint32_t)(len[0] - hdr_size);
49 rxm->data_len = (uint16_t)(len[0] - hdr_size);
50+ rxm->ol_flags = 0;
51
52 rxm->port = rxvq->port_id;
53 rx_pkts[nb_rx] = rxm;
54@@ -863,7 +865,7 @@ virtio_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
55 if (unlikely(nb_pkts < 1))
56 return nb_pkts;
57
58- PMD_TX_LOG(DEBUG, "%d packets to xmit", nb_pkts);
59+ PMD_TX_LOG(DEBUG, "%d packets to xmit\n", nb_pkts);
60 nb_used = VIRTQUEUE_NUSED(txvq);
61
62 virtio_rmb();
63--
642.7.4
65