]> git.droids-corp.org - dpdk.git/blobdiff - drivers/net/virtio/virtio_rxtx.c
drivers/net: remove redundant new line from logs
[dpdk.git] / drivers / net / virtio / virtio_rxtx.c
index 21948372dbc1220e38c12e91c6a2703322d6b0a2..cab6e8fc060d2fd4bc2d461d4b35542a3c0c568b 100644 (file)
@@ -133,7 +133,7 @@ virtqueue_dequeue_burst_rx(struct virtqueue *vq, struct rte_mbuf **rx_pkts,
                cookie = (struct rte_mbuf *)vq->vq_descx[desc_idx].cookie;
 
                if (unlikely(cookie == NULL)) {
-                       PMD_DRV_LOG(ERR, "vring descriptor with no mbuf cookie at %u\n",
+                       PMD_DRV_LOG(ERR, "vring descriptor with no mbuf cookie at %u",
                                vq->vq_used_cons_idx);
                        break;
                }
@@ -301,8 +301,14 @@ virtqueue_enqueue_xmit(struct virtnet_tx *txvq, struct rte_mbuf *cookie,
                hdr = (struct virtio_net_hdr *)
                        rte_pktmbuf_prepend(cookie, head_size);
                /* if offload disabled, it is not zeroed below, do it now */
-               if (offload == 0)
-                       memset(hdr, 0, head_size);
+               if (offload == 0) {
+                       ASSIGN_UNLESS_EQUAL(hdr->csum_start, 0);
+                       ASSIGN_UNLESS_EQUAL(hdr->csum_offset, 0);
+                       ASSIGN_UNLESS_EQUAL(hdr->flags, 0);
+                       ASSIGN_UNLESS_EQUAL(hdr->gso_type, 0);
+                       ASSIGN_UNLESS_EQUAL(hdr->gso_size, 0);
+                       ASSIGN_UNLESS_EQUAL(hdr->hdr_len, 0);
+               }
        } else if (use_indirect) {
                /* setup tx ring slot to point to indirect
                 * descriptor list stored in reserved region.