aboutsummaryrefslogtreecommitdiffstats
path: root/src/vat/api_format.c
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2019-05-02 13:54:59 +0200
committerDamjan Marion <dmarion@me.com>2019-05-27 11:40:38 +0000
commitbbd6b746e09cc4ae4239173081d95349e0263759 (patch)
treeb49f623111f0bb5680a25ee1560c2a9c6a1b73d5 /src/vat/api_format.c
parent423fbb1deaed9db9eb662d4b7407fb7274cb8e90 (diff)
virtio: Add gso support for native virtio driver
Change-Id: I7b735f5a540e8c278bac88245acb3f8c041c49c0 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vat/api_format.c')
-rw-r--r--src/vat/api_format.c30
1 files changed, 4 insertions, 26 deletions
diff --git a/src/vat/api_format.c b/src/vat/api_format.c
index b330a389ef8..c57f045fdd4 100644
--- a/src/vat/api_format.c
+++ b/src/vat/api_format.c
@@ -7681,9 +7681,9 @@ api_virtio_pci_create (vat_main_t * vam)
vl_api_virtio_pci_create_t *mp;
u8 mac_address[6];
u8 random_mac = 1;
+ u8 gso_enabled = 0;
u32 pci_addr = 0;
u64 features = (u64) ~ (0ULL);
- u32 rx_ring_sz = 0, tx_ring_sz = 0;
int ret;
clib_memset (mac_address, 0, sizeof (mac_address));
@@ -7699,10 +7699,8 @@ api_virtio_pci_create (vat_main_t * vam)
;
else if (unformat (i, "features 0x%llx", &features))
;
- else if (unformat (i, "rx-ring-size %u", &rx_ring_sz))
- ;
- else if (unformat (i, "tx-ring-size %u", &tx_ring_sz))
- ;
+ else if (unformat (i, "gso-enabled"))
+ gso_enabled = 1;
else
break;
}
@@ -7712,26 +7710,6 @@ api_virtio_pci_create (vat_main_t * vam)
errmsg ("pci address must be non zero. ");
return -99;
}
- if (!is_pow2 (rx_ring_sz))
- {
- errmsg ("rx ring size must be power of 2. ");
- return -99;
- }
- if (rx_ring_sz > 32768)
- {
- errmsg ("rx ring size must be 32768 or lower. ");
- return -99;
- }
- if (!is_pow2 (tx_ring_sz))
- {
- errmsg ("tx ring size must be power of 2. ");
- return -99;
- }
- if (tx_ring_sz > 32768)
- {
- errmsg ("tx ring size must be 32768 or lower. ");
- return -99;
- }
/* Construct the API message */
M (VIRTIO_PCI_CREATE, mp);
@@ -22293,7 +22271,7 @@ _(tap_delete_v2, \
"<vpp-if-name> | sw_if_index <id>") \
_(sw_interface_tap_v2_dump, "") \
_(virtio_pci_create, \
- "pci-addr <pci-address> [use_random_mac | hw-addr <mac-addr>] [tx-ring-size <num> [rx-ring-size <num>] [features <hex-value>]") \
+ "pci-addr <pci-address> [use_random_mac | hw-addr <mac-addr>] [features <hex-value>] [gso-enabled]") \
_(virtio_pci_delete, \
"<vpp-if-name> | sw_if_index <id>") \
_(sw_interface_virtio_pci_dump, "") \