mirror of
https://github.com/openvswitch/ovs
synced 2025-09-04 08:15:25 +00:00
dpif-netdev: Refactor simple match lookup functions.
Make the simple match functions used during lookup non-static to allow reuse of these functions in the AVX512 DPIF. Signed-off-by: Cian Ferriter <cian.ferriter@intel.com> Tested-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Sunil Pai G <sunil.pai.g@intel.com> Signed-off-by: Ian Stokes <ian.stokes@intel.com>
This commit is contained in:
committed by
Ian Stokes
parent
eb8ebf8c43
commit
dfff8b67b2
@@ -61,6 +61,18 @@ dp_netdev_input_func dp_netdev_impl_get_default(void);
|
|||||||
/* Overrides the default DPIF with the user set DPIF. */
|
/* Overrides the default DPIF with the user set DPIF. */
|
||||||
int32_t dp_netdev_impl_set_default_by_name(const char *name);
|
int32_t dp_netdev_impl_set_default_by_name(const char *name);
|
||||||
|
|
||||||
|
bool
|
||||||
|
dp_netdev_simple_match_enabled(const struct dp_netdev_pmd_thread *pmd,
|
||||||
|
odp_port_t in_port);
|
||||||
|
|
||||||
|
uint64_t
|
||||||
|
dp_netdev_simple_match_mark(odp_port_t in_port, ovs_be16 dl_type,
|
||||||
|
uint8_t nw_frag, ovs_be16 vlan_tci);
|
||||||
|
struct dp_netdev_flow *
|
||||||
|
dp_netdev_simple_match_lookup(const struct dp_netdev_pmd_thread *pmd,
|
||||||
|
odp_port_t in_port, ovs_be16 dl_type,
|
||||||
|
uint8_t nw_frag, ovs_be16 vlan_tci);
|
||||||
|
|
||||||
/* Available DPIF implementations below. */
|
/* Available DPIF implementations below. */
|
||||||
int32_t
|
int32_t
|
||||||
dp_netdev_input(struct dp_netdev_pmd_thread *pmd,
|
dp_netdev_input(struct dp_netdev_pmd_thread *pmd,
|
||||||
|
@@ -639,11 +639,6 @@ static void dp_netdev_simple_match_remove(struct dp_netdev_pmd_thread *pmd,
|
|||||||
OVS_REQUIRES(pmd->flow_mutex);
|
OVS_REQUIRES(pmd->flow_mutex);
|
||||||
|
|
||||||
static bool dp_netdev_flow_is_simple_match(const struct match *);
|
static bool dp_netdev_flow_is_simple_match(const struct match *);
|
||||||
static bool dp_netdev_simple_match_enabled(const struct dp_netdev_pmd_thread *,
|
|
||||||
odp_port_t in_port);
|
|
||||||
static struct dp_netdev_flow *dp_netdev_simple_match_lookup(
|
|
||||||
const struct dp_netdev_pmd_thread *,
|
|
||||||
odp_port_t in_port, ovs_be16 dp_type, uint8_t nw_frag, ovs_be16 vlan_tci);
|
|
||||||
|
|
||||||
/* Updates the time in PMD threads context and should be called in three cases:
|
/* Updates the time in PMD threads context and should be called in three cases:
|
||||||
*
|
*
|
||||||
@@ -3873,7 +3868,7 @@ dp_netdev_get_mega_ufid(const struct match *match, ovs_u128 *mega_ufid)
|
|||||||
odp_flow_key_hash(&masked_flow, sizeof masked_flow, mega_ufid);
|
odp_flow_key_hash(&masked_flow, sizeof masked_flow, mega_ufid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint64_t
|
uint64_t
|
||||||
dp_netdev_simple_match_mark(odp_port_t in_port, ovs_be16 dl_type,
|
dp_netdev_simple_match_mark(odp_port_t in_port, ovs_be16 dl_type,
|
||||||
uint8_t nw_frag, ovs_be16 vlan_tci)
|
uint8_t nw_frag, ovs_be16 vlan_tci)
|
||||||
{
|
{
|
||||||
@@ -3913,7 +3908,7 @@ dp_netdev_simple_match_mark(odp_port_t in_port, ovs_be16 dl_type,
|
|||||||
| (OVS_FORCE uint16_t) (vlan_tci & htons(VLAN_VID_MASK | VLAN_CFI));
|
| (OVS_FORCE uint16_t) (vlan_tci & htons(VLAN_VID_MASK | VLAN_CFI));
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct dp_netdev_flow *
|
struct dp_netdev_flow *
|
||||||
dp_netdev_simple_match_lookup(const struct dp_netdev_pmd_thread *pmd,
|
dp_netdev_simple_match_lookup(const struct dp_netdev_pmd_thread *pmd,
|
||||||
odp_port_t in_port, ovs_be16 dl_type,
|
odp_port_t in_port, ovs_be16 dl_type,
|
||||||
uint8_t nw_frag, ovs_be16 vlan_tci)
|
uint8_t nw_frag, ovs_be16 vlan_tci)
|
||||||
@@ -3934,7 +3929,7 @@ dp_netdev_simple_match_lookup(const struct dp_netdev_pmd_thread *pmd,
|
|||||||
return found ? flow : NULL;
|
return found ? flow : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
bool
|
||||||
dp_netdev_simple_match_enabled(const struct dp_netdev_pmd_thread *pmd,
|
dp_netdev_simple_match_enabled(const struct dp_netdev_pmd_thread *pmd,
|
||||||
odp_port_t in_port)
|
odp_port_t in_port)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user