From: Jijiang Liu Date: Fri, 24 Oct 2014 07:58:42 +0000 (+0800) Subject: ethdev: mac vlan filter X-Git-Tag: spdx-start~10221 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=de8f4d57043022e2adb4014ddc49b94aed766bb1;p=dpdk.git ethdev: mac vlan filter Signed-off-by: Jijiang Liu Acked-by: Thomas Monjalon --- diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h index b4ab731787..14a739bd61 100644 --- a/lib/librte_ether/rte_eth_ctrl.h +++ b/lib/librte_ether/rte_eth_ctrl.h @@ -51,6 +51,7 @@ extern "C" { */ enum rte_filter_type { RTE_ETH_FILTER_NONE = 0, + RTE_ETH_FILTER_MACVLAN, RTE_ETH_FILTER_TUNNEL, RTE_ETH_FILTER_MAX }; @@ -72,6 +73,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; /**