summaryrefslogtreecommitdiff
path: root/lib/librte_kni/rte_kni.h
diff options
context:
space:
mode:
authorHemant Agrawal <hemant.agrawal@nxp.com>2018-01-18 11:42:58 +0530
committerThomas Monjalon <thomas@monjalon.net>2018-02-01 01:02:50 +0100
commit1cfe212ed17a505be53d09845554cd51607dd2a6 (patch)
tree4d493049d9fb870e0ed2513922d8fa1f54e72ce7 /lib/librte_kni/rte_kni.h
parentfc29c712dd6758877bb10166d9a7866ee1fa6875 (diff)
downloaddpdk-1cfe212ed17a505be53d09845554cd51607dd2a6.zip
dpdk-1cfe212ed17a505be53d09845554cd51607dd2a6.tar.gz
dpdk-1cfe212ed17a505be53d09845554cd51607dd2a6.tar.xz
kni: support MAC address change
This patch adds following: 1. Option to configure the mac address during create. Generate random address only if the user has not provided any valid address. 2. Inform usespace, if mac address is being changed in linux. 3. Implement default handling of mac address change in the corresponding ethernet device. Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Diffstat (limited to 'lib/librte_kni/rte_kni.h')
-rw-r--r--lib/librte_kni/rte_kni.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/librte_kni/rte_kni.h b/lib/librte_kni/rte_kni.h
index c4dcfff..370b02a 100644
--- a/lib/librte_kni/rte_kni.h
+++ b/lib/librte_kni/rte_kni.h
@@ -20,6 +20,7 @@
#include <rte_pci.h>
#include <rte_memory.h>
#include <rte_mempool.h>
+#include <rte_ether.h>
#include <exec-env/rte_kni_common.h>
@@ -41,6 +42,9 @@ struct rte_kni_ops {
/* Pointer to function of configuring network interface */
int (*config_network_if)(uint16_t port_id, uint8_t if_up);
+
+ /* Pointer to function of configuring mac address */
+ int (*config_mac_address)(uint16_t port_id, uint8_t mac_addr[]);
};
/**
@@ -61,6 +65,7 @@ struct rte_kni_conf {
__extension__
uint8_t force_bind : 1; /* Flag to bind kernel thread */
+ char mac_addr[ETHER_ADDR_LEN]; /* MAC address assigned to KNI */
};
/**