[dpdk-dev,v2,1/4] librte_ether:extend MAC filter data structures
Commit Message
Add the data definations for MAC filter enhancement in rte_eth_ctrl.h file.
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
---
lib/librte_ether/rte_eth_ctrl.h | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
@@ -51,6 +51,7 @@ extern "C" {
*/
enum rte_filter_type {
RTE_ETH_FILTER_NONE = 0,
+ RTE_ETH_FILTER_MACVLAN,
RTE_ETH_FILTER_MAX
};
@@ -71,6 +72,28 @@ enum rte_filter_op {
RTE_ETH_FILTER_OP_MAX
};
+/**
+ * MAC filter type
+ */
+enum rte_mac_filter_type {
+ RTE_MAC_PERFECT_MATCH = 1, /**< exact match of MAC addr. */
+ RTE_MACVLAN_PERFECT_MATCH,
+ /**< exact match of MAC addr and VLAN ID. */
+ RTE_MAC_HASH_MATCH, /**< hash match of MAC addr. */
+ RTE_MACVLAN_HASH_MATCH,
+ /**< hash match of MAC addr and exact match of VLAN ID. */
+};
+
+/**
+ * MAC filter info
+ */
+struct rte_eth_mac_filter {
+ uint8_t is_vf; /**< 1 for VF, 0 for port dev */
+ uint16_t dst_id; /**<VF ID, available when is_vf is 1*/
+ uint16_t filter_type; /**< MAC filter type */
+ struct ether_addr mac_addr;
+};
+
#ifdef __cplusplus
}
#endif