summaryrefslogtreecommitdiff
path: root/drivers/net/virtio
diff options
context:
space:
mode:
authorTiwei Bie <tiwei.bie@intel.com>2019-03-19 14:43:09 +0800
committerFerruh Yigit <ferruh.yigit@intel.com>2019-03-20 18:15:42 +0100
commitbc80357cd6775f94bacc83b60b01a3c886df8ceb (patch)
tree34c856cc7d799547fc2012e373491442f73d10b0 /drivers/net/virtio
parent4cdc4d98313e717df7d1dba769d71e7e4050da54 (diff)
downloaddpdk-next-eventdev-bc80357cd6775f94bacc83b60b01a3c886df8ceb.zip
dpdk-next-eventdev-bc80357cd6775f94bacc83b60b01a3c886df8ceb.tar.gz
dpdk-next-eventdev-bc80357cd6775f94bacc83b60b01a3c886df8ceb.tar.xz
net/virtio: drop unused field in Tx region structure
Drop the unused field tx_indir_pq from virtio_tx_region structure. Signed-off-by: Tiwei Bie <tiwei.bie@intel.com> Reviewed-by: Jens Freimann <jfreimann@redhat.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Diffstat (limited to 'drivers/net/virtio')
-rw-r--r--drivers/net/virtio/virtio_ethdev.c10
-rw-r--r--drivers/net/virtio/virtqueue.h8
2 files changed, 3 insertions, 15 deletions
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index f452a9a..8aa2509 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -603,17 +603,9 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx)
memset(txr, 0, vq_size * sizeof(*txr));
for (i = 0; i < vq_size; i++) {
struct vring_desc *start_dp = txr[i].tx_indir;
- struct vring_packed_desc *start_dp_packed =
- txr[i].tx_indir_pq;
/* first indirect descriptor is always the tx header */
- if (vtpci_packed_queue(hw)) {
- start_dp_packed->addr = txvq->virtio_net_hdr_mem
- + i * sizeof(*txr)
- + offsetof(struct virtio_tx_region,
- tx_hdr);
- start_dp_packed->len = hw->vtnet_hdr_size;
- } else {
+ if (!vtpci_packed_queue(hw)) {
vring_desc_init_split(start_dp,
RTE_DIM(txr[i].tx_indir));
start_dp->addr = txvq->virtio_net_hdr_mem
diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h
index 78df6d3..6dab7db 100644
--- a/drivers/net/virtio/virtqueue.h
+++ b/drivers/net/virtio/virtqueue.h
@@ -277,12 +277,8 @@ struct virtio_net_hdr_mrg_rxbuf {
#define VIRTIO_MAX_TX_INDIRECT 8
struct virtio_tx_region {
struct virtio_net_hdr_mrg_rxbuf tx_hdr;
- union {
- struct vring_desc tx_indir[VIRTIO_MAX_TX_INDIRECT]
- __attribute__((__aligned__(16)));
- struct vring_packed_desc tx_indir_pq[VIRTIO_MAX_TX_INDIRECT]
- __attribute__((__aligned__(16)));
- };
+ struct vring_desc tx_indir[VIRTIO_MAX_TX_INDIRECT]
+ __attribute__((__aligned__(16)));
};
static inline int