Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752899AbbHUAlV (ORCPT ); Thu, 20 Aug 2015 20:41:21 -0400 Received: from mail-yk0-f172.google.com ([209.85.160.172]:34504 "EHLO mail-yk0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752129AbbHUAlU (ORCPT ); Thu, 20 Aug 2015 20:41:20 -0400 MIME-Version: 1.0 In-Reply-To: References: <1439941188-19293-1-git-send-email-joestringer@nicira.com> <1439941188-19293-7-git-send-email-joestringer@nicira.com> From: Joe Stringer Date: Thu, 20 Aug 2015 17:41:00 -0700 Message-ID: Subject: Re: [PATCHv4 net-next 06/10] openvswitch: Allow matching on conntrack mark To: Pravin Shelar Cc: netdev , LKML , pablo , Florian Westphal , Hannes Sowa , Thomas Graf , Justin Pettit , Jesse Gross Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3123 Lines: 66 On 19 August 2015 at 13:47, Pravin Shelar wrote: > On Tue, Aug 18, 2015 at 4:39 PM, Joe Stringer wrote: >> Allow matching and setting the conntrack mark field. As with conntrack >> state and zone, these are populated when the CT action is executed, >> and are made available for matching via RECIRC. To write to this field, >> a value and optional mark can be passed as part of the conntrack action. >> >> E.g.: actions:ct(zone=0),ct(zone=1,mark=1) >> >> This will perform conntrack lookup in zone 0, then lookup in zone 1, >> then modify the mark for the entry in zone 1. The conntrack entry itself >> must be committed using the "commit" flag in the conntrack action flags >> for this change to persist. >> >> Signed-off-by: Justin Pettit >> Signed-off-by: Joe Stringer >> --- >> v1-v3: No change. >> v4: Only allow setting conntrack mark via ct action. >> Documentation tweaks. >> --- >> include/uapi/linux/openvswitch.h | 5 ++++ >> net/openvswitch/actions.c | 1 + >> net/openvswitch/conntrack.c | 61 ++++++++++++++++++++++++++++++++++++++-- >> net/openvswitch/conntrack.h | 1 + >> net/openvswitch/flow.h | 1 + >> net/openvswitch/flow_netlink.c | 15 +++++++++- >> 6 files changed, 80 insertions(+), 4 deletions(-) >> >> diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h >> index 55f5997..7a185b5 100644 >> --- a/include/uapi/linux/openvswitch.h >> +++ b/include/uapi/linux/openvswitch.h >> @@ -325,6 +325,7 @@ enum ovs_key_attr { >> * the accepted length of the array. */ >> OVS_KEY_ATTR_CT_STATE, /* u8 bitmask of OVS_CS_F_* */ >> OVS_KEY_ATTR_CT_ZONE, /* u16 connection tracking zone. */ >> + OVS_KEY_ATTR_CT_MARK, /* u32 connection tracking mark */ >> >> #ifdef __KERNEL__ >> OVS_KEY_ATTR_TUNNEL_INFO, /* struct ip_tunnel_info */ >> @@ -613,11 +614,15 @@ struct ovs_action_hash { >> * enum ovs_ct_attr - Attributes for %OVS_ACTION_ATTR_CT action. >> * @OVS_CT_ATTR_FLAGS: u32 connection tracking flags. >> * @OVS_CT_ATTR_ZONE: u16 connection tracking zone. >> + * @OVS_CT_ATTR_MARK: u32 value followed by u32 mask. For each bit set in the >> + * mask, the corresponding bit in the value is copied to the connection >> + * tracking mark field in the connection. >> */ >> enum ovs_ct_attr { >> OVS_CT_ATTR_UNSPEC, >> OVS_CT_ATTR_FLAGS, /* u8 bitmask of OVS_CT_F_*. */ >> OVS_CT_ATTR_ZONE, /* u16 zone id. */ >> + OVS_CT_ATTR_MARK, /* mark to associate with this connection. */ >> __OVS_CT_ATTR_MAX >> }; >> > ovs_ct_action_to_attr() is not updated to return complete datapath > action back to userpsace. same issue exist in set label patch. Fixed, thanks for the review. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/