[ovs-dev] [PATCHv3 3/3] tunnel: set skb mark for IPsec tunnel packets

Jesse Gross jesse at nicira.com
Fri Feb 15 18:53:12 UTC 2013


On Fri, Feb 15, 2013 at 10:42 AM, Ansis Atteka <aatteka at nicira.com> wrote:
> The new ovs-monitor-ipsec implementation will use skb marks in
> IPsec policies. This patch will configure datapath to use these
> skb marks for IPsec tunnel packets.
>
> Issue: 14870
> Signed-off-by: Ansis Atteka <aatteka at nicira.com>
> ---
>  lib/odp-util.c         |   12 ++++++++++--
>  lib/odp-util.h         |    2 ++
>  ofproto/ofproto-dpif.c |    1 +
>  ofproto/tunnel.c       |    9 ++++++++-
>  ofproto/tunnel.h       |    1 +
>  5 files changed, 22 insertions(+), 3 deletions(-)
>
> diff --git a/lib/odp-util.c b/lib/odp-util.c
> index 7e48981..f74b031 100644
> --- a/lib/odp-util.c
> +++ b/lib/odp-util.c
> @@ -2049,6 +2049,15 @@ odp_put_tunnel_action(const struct flow_tnl *tunnel,
>      tun_key_to_attr(odp_actions, tunnel);
>      nl_msg_end_nested(odp_actions, offset);
>  }
> +
> +void
> +odp_put_skb_mark_action(const uint32_t skb_mark,
> +                        struct ofpbuf *odp_actions)
> +{
> +    size_t offset = nl_msg_start_nested(odp_actions, OVS_ACTION_ATTR_SET);
> +    nl_msg_put_u32(odp_actions, OVS_KEY_ATTR_SKB_MARK, skb_mark);
> +    nl_msg_end_nested(odp_actions, offset);

Can we use commit_set_action() here instead of open coding it?

Otherwise, looks good to me.



More information about the dev mailing list