diff mbox series

[API-NEXT,v1,5/6] linux-gen: dpdk: fix maximum frame length value

Message ID 1510844412-21931-6-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [API-NEXT,v1,1/6] api: pktio: add max frame length | expand

Commit Message

Github ODP bot Nov. 16, 2017, 3 p.m. UTC
From: Petri Savolainen <petri.savolainen@linaro.org>


Returns maximum ethernet frame size instead of maximum IP
packet MTU.

Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

---
/** Email created from pull request 298 (psavol:next-frame-len)
 ** https://github.com/Linaro/odp/pull/298
 ** Patch: https://github.com/Linaro/odp/pull/298.patch
 ** Base sha: d4b364849c4abb4c71e0c5260e1a793ebb8dc97d
 ** Merge commit sha: f65f2a6ea63917fca4366f41eeac436d31acec9f
 **/
 platform/linux-generic/pktio/dpdk.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/platform/linux-generic/pktio/dpdk.c b/platform/linux-generic/pktio/dpdk.c
index 99b79e32e..42040840e 100644
--- a/platform/linux-generic/pktio/dpdk.c
+++ b/platform/linux-generic/pktio/dpdk.c
@@ -832,6 +832,13 @@  static uint32_t dpdk_mtu_get(pktio_entry_t *pktio_entry)
 	return mtu;
 }
 
+static uint32_t dpdk_frame_maxlen(pktio_entry_t *pktio_entry)
+{
+	pkt_dpdk_t *pkt_dpdk = &pktio_entry->s.pkt_dpdk;
+
+	return pkt_dpdk->mtu;
+}
+
 static int dpdk_vdev_promisc_mode_get(uint8_t port_id)
 {
 	struct rte_eth_dev_info dev_info;
@@ -1631,7 +1638,7 @@  const pktio_if_ops_t dpdk_pktio_ops = {
 	.recv = dpdk_recv,
 	.send = dpdk_send,
 	.link_status = dpdk_link_status,
-	.mtu_get = dpdk_mtu_get,
+	.mtu_get = dpdk_frame_maxlen,
 	.promisc_mode_set = dpdk_promisc_mode_set,
 	.promisc_mode_get = dpdk_promisc_mode_get,
 	.mac_get = dpdk_mac_addr_get,