git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ae0b1de
)
net/virtio: init MTU in case no control channel
author
Zhike Wang
<wangzhike@jd.com>
Fri, 5 Jan 2018 10:28:06 +0000
(
02:28
-0800)
committer
Ferruh Yigit
<ferruh.yigit@intel.com>
Tue, 16 Jan 2018 17:47:49 +0000
(18:47 +0100)
The max_mtu is kept as zero in case no CRTL channel, which leads
to failure when calling virtio_mtu_set().
Signed-off-by: Zhike Wang <wangzhike@jd.com>
Acked-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
drivers/net/virtio/virtio_ethdev.c
patch
|
blob
|
history
diff --git
a/drivers/net/virtio/virtio_ethdev.c
b/drivers/net/virtio/virtio_ethdev.c
index
ebb968c
..
954989e
100644
(file)
--- a/
drivers/net/virtio/virtio_ethdev.c
+++ b/
drivers/net/virtio/virtio_ethdev.c
@@
-1482,6
+1482,8
@@
virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
} else {
PMD_INIT_LOG(DEBUG, "config->max_virtqueue_pairs=1");
hw->max_queue_pairs = 1;
+ hw->max_mtu = VIRTIO_MAX_RX_PKTLEN - ETHER_HDR_LEN -
+ VLAN_TAG_LEN - hw->vtnet_hdr_size;
}
ret = virtio_alloc_queues(eth_dev);