[ovs-dev] [PATCH/RFC net-next] openvswitch: allow output of MPLS packets on tunnel vports

Pravin Shelar pshelar at nicira.com
Tue Jun 16 19:54:08 UTC 2015


On Mon, Jun 15, 2015 at 5:39 PM, Simon Horman
<simon.horman at netronome.com> wrote:
> Currently output of MPLS packets on tunnel vports is not allowed by the
> datapath and, moreover, flows that match on MPLS packets and output to
> tunnel vports are rejected by the datapath. The flows are rejected
> regardless of if they also output to non-tunnel vports which is allowed for
> MPLS packets and the following is logged by the kernel.
>
> openvswitch: netlink: Flow actions may not be safe on all matching packets.
>
> This patch addresses the above by allowing output of MPLS packets to tunnel
> vports.
>
> My recollection of adding MPLS support to the datapath was that a rather
> conservative approach was taken in order to minimise the chance of fallout.
> This patch proposes relaxing one restriction which was introduced at that
> time.
>
> My limited testing has not isolated any side effects of this change.
>
> Signed-off-by: Simon Horman <simon.horman at netronome.com>
> ---
>  net/openvswitch/flow_netlink.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
> index 624e41c4267f..a5d3c0ae8ac8 100644
> --- a/net/openvswitch/flow_netlink.c
> +++ b/net/openvswitch/flow_netlink.c
> @@ -1847,9 +1847,6 @@ static int validate_set(const struct nlattr *a,
>                 break;
>
>         case OVS_KEY_ATTR_TUNNEL:
> -               if (eth_p_mpls(eth_type))
> -                       return -EINVAL;
> -
One of the problem is with setting skb->inner_protocol. MPLS and
tunnel both needs to set inner protocol field. So outer encapsulation
would just overwrite earlier inner protocol field on packet transit
path.



More information about the dev mailing list