diff mbox series

[API-NEXT,v2,1/3] api: packet_io: add MAC address set function

Message ID 1507112121-5582-2-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [API-NEXT,v2,1/3] api: packet_io: add MAC address set function | expand

Commit Message

Github ODP bot Oct. 4, 2017, 10:15 a.m. UTC
From: Bogdan Pricope <bogdan.pricope@linaro.org>


Signed-off-by: Bogdan Pricope <bogdan.pricope@linaro.org>

---
/** Email created from pull request 203 (bogdanPricope:set_mac_pr)
 ** https://github.com/Linaro/odp/pull/203
 ** Patch: https://github.com/Linaro/odp/pull/203.patch
 ** Base sha: 75cfc6f70d5b21d6f04082e1d03a7e677a895280
 ** Merge commit sha: 1cf7eb2d5d71448e98637841d937b64dd8ed85f8
 **/
 include/odp/api/spec/packet_io.h | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
diff mbox series

Patch

diff --git a/include/odp/api/spec/packet_io.h b/include/odp/api/spec/packet_io.h
index b56a5205d..4ce108592 100644
--- a/include/odp/api/spec/packet_io.h
+++ b/include/odp/api/spec/packet_io.h
@@ -482,6 +482,8 @@  typedef union odp_pktio_set_op_t {
 	struct {
 		/** Promiscuous mode */
 		uint32_t promisc_mode : 1;
+		/** MAC address  */
+		uint32_t mac_addr : 1;
 	} op;
 	/** All bits of the bit field structure.
 	  * This field can be used to set/clear all flags, or bitwise
@@ -979,6 +981,20 @@  int odp_pktio_promisc_mode(odp_pktio_t pktio);
 int odp_pktio_mac_addr(odp_pktio_t pktio, void *mac_addr, int size);
 
 /**
+ * Set the default MAC address of a packet IO interface.
+ *
+ * @param	pktio     Packet IO handle
+ * @param[in]	mac_addr  Input buffer containing MAC address
+ * @param[in]	size      Size of the MAC address contained in
+ *			  input buffer
+ *
+ * @return 0 on success
+ * @retval <0 on failure
+ */
+int odp_pktio_mac_addr_set(odp_pktio_t pktio, const void *mac_addr,
+			   int size);
+
+/**
  * Setup per-port default class-of-service.
  *
  * @param[in]	pktio		Ingress port pktio handle.