diff mbox series

[API-NEXT,v1,1/6] api: pktio: add max frame length

Message ID 1510844412-21931-2-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>


Added functions to request maximum packet input and output
frame lengths.

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
 **/
 include/odp/api/spec/packet_io.h | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
diff mbox series

Patch

diff --git a/include/odp/api/spec/packet_io.h b/include/odp/api/spec/packet_io.h
index 6e4f88100..b09c9cfcb 100644
--- a/include/odp/api/spec/packet_io.h
+++ b/include/odp/api/spec/packet_io.h
@@ -970,6 +970,36 @@  int odp_pktio_promisc_mode_set(odp_pktio_t pktio, odp_bool_t enable);
 int odp_pktio_promisc_mode(odp_pktio_t pktio);
 
 /**
+ * Maximum frame length at packet input
+ *
+ * Maximum frame length in bytes that the packet IO interface can receive.
+ * For Ethernet, the frame length bytes start with MAC addresses and continue
+ * to the end of the payload. So, Ethernet checksum, interpacket gap
+ * and preamble bytes are excluded from the length.
+ *
+ * @param pktio  Packet IO handle.
+ *
+ * @return Maximum frame length at packet input
+ * @retval 0 on failure
+ */
+uint32_t odp_pktin_maxlen(odp_pktio_t pktio);
+
+/**
+ * Maximum frame length at packet output
+ *
+ * Maximum frame length in bytes that the packet IO interface can transmit.
+ * For Ethernet, the frame length bytes start with MAC addresses and continue
+ * to the end of the payload. So, Ethernet checksum, interpacket gap
+ * and preamble bytes are excluded from the length.
+ *
+ * @param pktio  Packet IO handle.
+ *
+ * @return Maximum frame length at packet output
+ * @retval 0 on failure
+ */
+uint32_t odp_pktout_maxlen(odp_pktio_t pktio);
+
+/**
  * Get the default MAC address of a packet IO interface.
  *
  * @param	pktio     Packet IO handle