[ovs-dev] [PATCH v1 3/6] dpif-netdev: Flow dump function should populate masks.
Gurucharan Shetty
shettyg at nicira.com
Fri Nov 1 09:15:14 UTC 2013
Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
---
lib/dpif-netdev.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index ea8a6d3..ae1fecd 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -987,6 +987,7 @@ struct dp_netdev_flow_state {
uint32_t offset;
struct nlattr *actions;
struct odputil_keybuf keybuf;
+ struct odputil_keybuf maskbuf;
struct dpif_flow_stats stats;
};
@@ -1034,9 +1035,15 @@ dpif_netdev_flow_dump_next(const struct dpif *dpif, void *state_,
*key_len = buf.size;
}
- if (mask) {
- *mask = NULL;
- *mask_len = 0;
+ if (key && mask) {
+ struct ofpbuf buf;
+
+ ofpbuf_use_stack(&buf, &state->maskbuf, sizeof state->maskbuf);
+ odp_flow_key_from_mask(&buf, &netdev_flow->mask, &netdev_flow->flow,
+ UINT32_MAX);
+
+ *mask = buf.data;
+ *mask_len = buf.size;
}
if (actions) {
--
1.7.9.5
More information about the dev
mailing list