mirror of
https://github.com/openvswitch/ovs
synced 2025-08-30 22:05:19 +00:00
ovs-dpctl: Add mega flow support
Added support to allow mega flow specified and displayed. ovs-dpctl tool is mainly used as debugging tool. This patch also implements the low level user space routines to send and receive mega flow netlink messages. Those netlink suppor routines are required for forthcoming user space mega flow patches. Added a unit test to test parsing and display of mega flows. Ethan contributed the ovs-dpctl mega flow output function. Co-authored-by: Ethan Jackson <ethan@nicira.com> Signed-off-by: Ethan Jackson <ethan@nicira.com> Signed-off-by: Andy Zhou <azhou@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
@@ -879,6 +879,7 @@ dpif_netdev_flow_dump_start(const struct dpif *dpif OVS_UNUSED, void **statep)
|
||||
static int
|
||||
dpif_netdev_flow_dump_next(const struct dpif *dpif, void *state_,
|
||||
const struct nlattr **key, size_t *key_len,
|
||||
const struct nlattr **mask, size_t *mask_len,
|
||||
const struct nlattr **actions, size_t *actions_len,
|
||||
const struct dpif_flow_stats **stats)
|
||||
{
|
||||
@@ -904,6 +905,11 @@ dpif_netdev_flow_dump_next(const struct dpif *dpif, void *state_,
|
||||
*key_len = buf.size;
|
||||
}
|
||||
|
||||
if (mask) {
|
||||
*mask = NULL;
|
||||
*mask_len = 0;
|
||||
}
|
||||
|
||||
if (actions) {
|
||||
free(state->actions);
|
||||
state->actions = xmemdup(flow->actions, flow->actions_len);
|
||||
|
Reference in New Issue
Block a user