net/softnic: fix memory leak as profile is freed
[dpdk.git] / drivers / net / virtio / virtio_rxtx.h
index ca546cc..6ce5d67 100644 (file)
@@ -18,9 +18,8 @@ struct virtnet_stats {
 };
 
 struct virtnet_rx {
-       struct virtqueue *vq;
        /* dummy mbuf, for wraparound when processing RX ring. */
-       struct rte_mbuf fake_mbuf;
+       struct rte_mbuf *fake_mbuf;
        uint64_t mbuf_initializer; /**< value to init mbufs. */
        struct rte_mempool *mpool; /**< mempool for mbuf allocation */
 
@@ -34,7 +33,6 @@ struct virtnet_rx {
 };
 
 struct virtnet_tx {
-       struct virtqueue *vq;
        /**< memzone to populate hdr. */
        const struct rte_memzone *virtio_net_hdr_mz;
        rte_iova_t virtio_net_hdr_mem;   /**< hdr for each xmit packet */
@@ -49,17 +47,16 @@ struct virtnet_tx {
 };
 
 struct virtnet_ctl {
-       struct virtqueue *vq;
        /**< memzone to populate hdr. */
        const struct rte_memzone *virtio_net_hdr_mz;
        rte_iova_t virtio_net_hdr_mem;  /**< hdr for each xmit packet */
        uint16_t port_id;               /**< Device port identifier. */
        const struct rte_memzone *mz;   /**< mem zone to populate CTL ring. */
+       rte_spinlock_t lock;              /**< spinlock for control queue. */
 };
 
 int virtio_rxq_vec_setup(struct virtnet_rx *rxvq);
-
-int virtqueue_enqueue_recv_refill_simple(struct virtqueue *vq,
-       struct rte_mbuf *m);
+void virtio_update_packet_stats(struct virtnet_stats *stats,
+                               struct rte_mbuf *mbuf);
 
 #endif /* _VIRTIO_RXTX_H_ */