diff options
author | Ben Pfaff <blp@nicira.com> | 2011-06-01 13:39:51 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2011-06-01 13:39:51 -0700 |
commit | 80e5eed9c2128f04a1d7da134120d96e961dbe10 (patch) | |
tree | a7c0b2b2c47bec4277faa5b3b140b93945161374 /lib/dpif.h | |
parent | b85145b59fab7efa236cdabd6ef0bda87f373d19 (diff) |
datapath: Get packet metadata from userspace in odp_packet_cmd_execute().
Until now, the tun_id and in_port have been lost when a packet is sent from
the kernel to userspace and then back to the kernel. I didn't think that
this was a problem, but recent behavior made me look closer and see that
it makes a difference if sFlow is turned on or if an
ODP_ATTR_ACTION_CONTROLLER action is present. We could possibly kluge
around those, but for future-proofing it seems better to pass the packet
metadata from userspace to the kernel. That is what this commit does.
This commit introduces a user-kernel protocol break. We could avoid that,
if it is desirable, by making ODP_PACKET_ATTR_KEY optional for
ODP_PACKET_CMD_EXECUTE commands.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'lib/dpif.h')
-rw-r--r-- | lib/dpif.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -148,8 +148,10 @@ bool dpif_flow_dump_next(struct dpif_flow_dump *, const struct dpif_flow_stats **); int dpif_flow_dump_done(struct dpif_flow_dump *); -int dpif_execute(struct dpif *, const struct nlattr *actions, - size_t actions_len, const struct ofpbuf *); +int dpif_execute(struct dpif *, + const struct nlattr *key, size_t key_len, + const struct nlattr *actions, size_t actions_len, + const struct ofpbuf *); enum dpif_upcall_type { DPIF_UC_MISS, /* Miss in flow table. */ |