mirror of
https://github.com/openvswitch/ovs
synced 2025-10-25 15:07:05 +00:00
ofproto/bond: Implement bond megaflow using recirculation
Infrastructure to enable megaflow support for bond ports using recirculation. This patch adds the following features: * Generate RECIRC action when bond can benefit from recirculation. * Populate post recirculation rules in a hidden table. Currently table 254. * Uses post recirculation rules for bond rebalancing * A recirculation implementation in dpif-netdev. The goal of this patch is to be able to megaflow bond outputs and thus greatly improve performance. However, this patch does not actually improve the megaflow generation. It is left for a later commit. Signed-off-by: Andy Zhou <azhou@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
28
lib/match.c
28
lib/match.c
@@ -788,6 +788,34 @@ match_hash(const struct match *match, uint32_t basis)
|
||||
return flow_wildcards_hash(&match->wc, flow_hash(&match->flow, basis));
|
||||
}
|
||||
|
||||
static bool
|
||||
match_has_default_recirc_id(const struct match *m)
|
||||
{
|
||||
return m->flow.recirc_id == 0 && (m->wc.masks.recirc_id == UINT32_MAX ||
|
||||
m->wc.masks.recirc_id == 0);
|
||||
}
|
||||
|
||||
static bool
|
||||
match_has_default_dp_hash(const struct match *m)
|
||||
{
|
||||
return ((m->flow.dp_hash | m->wc.masks.dp_hash) == 0);
|
||||
}
|
||||
|
||||
/* Return true if the hidden fields of the match are set to the default values.
|
||||
* The default values equals to those set up by match_init_hidden_fields(). */
|
||||
bool
|
||||
match_has_default_hidden_fields(const struct match *m)
|
||||
{
|
||||
return match_has_default_recirc_id(m) && match_has_default_dp_hash(m);
|
||||
}
|
||||
|
||||
void
|
||||
match_init_hidden_fields(struct match *m)
|
||||
{
|
||||
match_set_recirc_id(m, 0);
|
||||
match_set_dp_hash_masked(m, 0, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
format_eth_masked(struct ds *s, const char *name, const uint8_t eth[6],
|
||||
const uint8_t mask[6])
|
||||
|
||||
Reference in New Issue
Block a user