2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 22:35:15 +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:
Cian Ferriter
2022-07-07 13:05:19 +00:00
committed by Ian Stokes
parent eb8ebf8c43
commit dfff8b67b2
2 changed files with 15 additions and 8 deletions

View File

@@ -639,11 +639,6 @@ static void dp_netdev_simple_match_remove(struct dp_netdev_pmd_thread *pmd,
OVS_REQUIRES(pmd->flow_mutex);
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:
*
@@ -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);
}
static uint64_t
uint64_t
dp_netdev_simple_match_mark(odp_port_t in_port, ovs_be16 dl_type,
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));
}
static struct dp_netdev_flow *
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)
@@ -3934,7 +3929,7 @@ dp_netdev_simple_match_lookup(const struct dp_netdev_pmd_thread *pmd,
return found ? flow : NULL;
}
static bool
bool
dp_netdev_simple_match_enabled(const struct dp_netdev_pmd_thread *pmd,
odp_port_t in_port)
{