From patchwork Tue Oct 20 22:20:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarno Rajahalme X-Patchwork-Id: 533519 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3853A1401DE for ; Wed, 21 Oct 2015 09:21:04 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754353AbbJTWU7 (ORCPT ); Tue, 20 Oct 2015 18:20:59 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:35765 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754117AbbJTWU4 (ORCPT ); Tue, 20 Oct 2015 18:20:56 -0400 Received: by pasz6 with SMTP id z6so33379275pas.2 for ; Tue, 20 Oct 2015 15:20:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=OI08TQO38uOXYOaHw71k01Pjg66CatSZWBHZG0wGb5c=; b=WGnIVeB/zdYgFs0FS/qVy0joHrzXOytATSOQWmDvk8kr2IJSj5N41HRnZUt06THBTU Cl9nopoiDrISGOnSaSLy6tSMCJF8+Gyeo8eLJmPz4QerrTSXAQ3etH9pBp8ppftJYR2w 1iTIoHgV41ocsZLgiOHGJU76vnIBTvxcz08WOwcGoSHqPKfGqAM/TF4MkHM+HFmQdpKL vJVHQgv3IeCp9Q96MJVa0+PLYAS/9qkozdJr0Rr/Q4wi/pAQ0/aeGJMvaVF5xHfwclm2 wLO8XH5h3dIMG0REtZpEVAMp9I8jdCWYrgJEw9HoTurvrzh4OMoZ3CWShriFKzElCuO+ BPag== X-Gm-Message-State: ALoCoQlkvpAjeq6dT11XO1F1Vw/MAZGRK8hHBvTskQqYshdu7SQX2DNi511LQG4Rm/IJyaP936RG X-Received: by 10.68.202.40 with SMTP id kf8mr6393529pbc.119.1445379655294; Tue, 20 Oct 2015 15:20:55 -0700 (PDT) Received: from sc9-mailhost3.vmware.com ([208.91.1.34]) by smtp.gmail.com with ESMTPSA id nz4sm5544866pbb.47.2015.10.20.15.20.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Oct 2015 15:20:54 -0700 (PDT) From: Jarno Rajahalme To: netdev@vger.kernel.org Cc: dev@openvswitch.org, jrajahalme@nicira.com Subject: [RFC PATCH 1/5] netfilter: Remove IP_CT_NEW_REPLY definition. Date: Tue, 20 Oct 2015 15:20:25 -0700 Message-Id: <1445379629-112880-1-git-send-email-jrajahalme@nicira.com> X-Mailer: git-send-email 2.1.4 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Remove the definition of IP_CT_NEW_REPLY as it does not make sense. This allows the definition of IP_CT_NUMBER to be simplified as well. Signed-off-by: Jarno Rajahalme --- include/uapi/linux/netfilter/nf_conntrack_common.h | 7 ++++--- net/openvswitch/conntrack.c | 2 -- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/uapi/linux/netfilter/nf_conntrack_common.h b/include/uapi/linux/netfilter/nf_conntrack_common.h index 319f471..e0aebc8 100644 --- a/include/uapi/linux/netfilter/nf_conntrack_common.h +++ b/include/uapi/linux/netfilter/nf_conntrack_common.h @@ -20,9 +20,10 @@ enum ip_conntrack_info { IP_CT_ESTABLISHED_REPLY = IP_CT_ESTABLISHED + IP_CT_IS_REPLY, IP_CT_RELATED_REPLY = IP_CT_RELATED + IP_CT_IS_REPLY, - IP_CT_NEW_REPLY = IP_CT_NEW + IP_CT_IS_REPLY, - /* Number of distinct IP_CT types (no NEW in reply dirn). */ - IP_CT_NUMBER = IP_CT_IS_REPLY * 2 - 1 + /* No IP_CT_NEW_REPLY */ + + /* Number of distinct IP_CT types. */ + IP_CT_NUMBER }; #define NF_CT_STATE_INVALID_BIT (1 << 0) diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c index ad61426..097ace4 100644 --- a/net/openvswitch/conntrack.c +++ b/net/openvswitch/conntrack.c @@ -73,7 +73,6 @@ static u8 ovs_ct_get_state(enum ip_conntrack_info ctinfo) switch (ctinfo) { case IP_CT_ESTABLISHED_REPLY: case IP_CT_RELATED_REPLY: - case IP_CT_NEW_REPLY: ct_state |= OVS_CS_F_REPLY_DIR; break; default: @@ -90,7 +89,6 @@ static u8 ovs_ct_get_state(enum ip_conntrack_info ctinfo) ct_state |= OVS_CS_F_RELATED; break; case IP_CT_NEW: - case IP_CT_NEW_REPLY: ct_state |= OVS_CS_F_NEW; break; default: