From: Ben Pfaff <blp-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
To: Simon Horman <horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
Cc: dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 04/21] vswitchd: Add iface_parse_tunnel
Date: Thu, 24 May 2012 09:47:38 -0700 [thread overview]
Message-ID: <20120524164738.GE26173@nicira.com> (raw)
In-Reply-To: <1337850554-10339-5-git-send-email-horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
The concept seems OK to me here. I have only a few minor comments.
On Thu, May 24, 2012 at 06:08:57PM +0900, Simon Horman wrote:
> +#define TNL_F_CSUM (1 << 0) /* Checksum packets. */
> +#define TNL_F_TOS_INHERIT (1 << 1) /* Inherit ToS from inner packet. */
> +#define TNL_F_TTL_INHERIT (1 << 2) /* Inherit TTL from inner packet. */
> +#define TNL_F_DF_INHERIT (1 << 3) /* Inherit DF bit from inner packet. */
> +#define TNL_F_DF_DEFAULT (1 << 4) /* Set DF bit if inherit off or
> + * not IP. */
> +#define TNL_F_PMTUD (1 << 5) /* Enable path MTU discovery. */
> +#define TNL_F_HDR_CACHE (1 << 6) /* Enable tunnel header caching. */
> +#define TNL_F_IPSEC (1 << 7) /* Traffic is IPsec encrypted. */
> +#define TNL_F_IN_KEY (1 << 8) /* Tunnel port has input key. */
> +#define TNL_F_OUT_KEY (1 << 9) /* Tunnel port has output key. */
Some of the above definitions use all spaces, others use tabs. It's
OVS userspace code so it's better to use all spaces, I think.
> + if (is_ipsec) {
> + char *file_name = xasprintf("%s/%s", ovs_rundir(),
> + "ovs-monitor-ipsec.pid");
> + pid_t pid = read_pidfile(file_name);
> + free(file_name);
> + if (pid < 0) {
> + VLOG_ERR("%s: IPsec requires the ovs-monitor-ipsec daemon",
> + iface_cfg->name);
> + goto err;
> + }
I just noticed that we re-read this pidfile every time we parse an
IPsec tunnel. I guess that would be a big waste of time if we have a
lot of IPsec tunnels. I'll make a note to consider fixing this
separately (it's not your problem).
next prev parent reply other threads:[~2012-05-24 16:47 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-24 9:08 [RFC v4 00/21] Flow Based Tunneling for Open vSwitch Simon Horman
[not found] ` <1337850554-10339-1-git-send-email-horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
2012-05-24 9:08 ` [PATCH 01/21] datapath: tunnelling: Replace tun_id with tun_key Simon Horman
[not found] ` <1337850554-10339-2-git-send-email-horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
2012-06-03 9:01 ` Jesse Gross
2012-06-03 9:15 ` [ovs-dev] " Jesse Gross
[not found] ` <CAEP_g=9hkP-7fuFK3zSJcR=2BTK0feq7qUa8LHs3dbGQBy+suw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-06-04 22:34 ` Simon Horman
2012-06-05 3:33 ` [ovs-dev] " Jesse Gross
2012-06-05 8:12 ` Simon Horman
2012-05-24 9:08 ` [PATCH 04/21] vswitchd: Add iface_parse_tunnel Simon Horman
[not found] ` <1337850554-10339-5-git-send-email-horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
2012-05-24 16:47 ` Ben Pfaff [this message]
2012-05-24 23:59 ` [ovs-dev] " Simon Horman
2012-05-24 9:08 ` [PATCH 05/21] vswitchd: Add add_tunnel_ports() Simon Horman
[not found] ` <1337850554-10339-6-git-send-email-horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
2012-05-25 17:18 ` Ben Pfaff
2012-05-24 9:08 ` [PATCH 06/21] ofproto: Add set_tunnelling() Simon Horman
2012-05-24 9:09 ` [PATCH 07/21] vswitchd: Configure tunnel interfaces Simon Horman
2012-05-24 9:09 ` [PATCH 09/21] ofproto: Add tundev_to_realdev() Simon Horman
2012-05-24 9:09 ` [PATCH 10/21] classifier: Convert struct flow flow_metadata to use tun_key Simon Horman
2012-05-24 9:09 ` [PATCH 11/21] datapath, vport: Provide tunnel realdev and tundev classes and vports Simon Horman
2012-05-24 9:09 ` [PATCH 12/21] lib: Replace commit_set_tun_id_action() with commit_set_tunnel_action() Simon Horman
2012-05-24 9:09 ` [PATCH 13/21] global: Remove OVS_KEY_ATTR_TUN_ID Simon Horman
2012-05-24 9:09 ` [PATCH 14/21] ofproto: Set flow tun_key in compose_output_action() Simon Horman
2012-05-24 9:09 ` [PATCH 15/21] datapath: Remove mlink element from tnl_mutable_config Simon Horman
2012-05-24 9:09 ` [PATCH 18/21] dataptah: remove ttl and tos " Simon Horman
2012-05-24 9:08 ` [PATCH 02/21] datapath: Use tun_key on transmit Simon Horman
2012-05-24 9:08 ` [PATCH 03/21] odp-util: Add tun_key to parse_odp_key_attr() Simon Horman
[not found] ` <1337850554-10339-4-git-send-email-horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
2012-05-24 16:29 ` Ben Pfaff
[not found] ` <20120524162911.GD26173-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
2012-05-25 0:01 ` Simon Horman
2012-05-24 9:09 ` [PATCH 08/21] ofproto: Add realdev_to_txdev() Simon Horman
2012-05-24 9:09 ` [PATCH 16/21] datapath: remove tunnel cache Simon Horman
2012-05-24 9:09 ` [PATCH 17/21] datapath: Always use tun_key addresses for route lookup Simon Horman
2012-05-24 9:09 ` [PATCH 19/21] datapath: Simplify vport lookup Simon Horman
2012-05-24 9:09 ` [PATCH 20/21] datapath: Use tun_key flags for id and csum settings on transmit Simon Horman
2012-05-24 9:09 ` [PATCH 21/21] datapath: Always use tun_key flags Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120524164738.GE26173@nicira.com \
--to=blp-l0m0p4e3n4lqt0dzr+alfa@public.gmane.org \
--cc=dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org \
--cc=horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.