Received: by 10.223.185.116 with SMTP id b49csp638408wrg; Tue, 20 Feb 2018 05:30:25 -0800 (PST) X-Google-Smtp-Source: AH8x2273+mgjhlRHEqhAsvRGPK5DgPrpTl4YnxsyFaw1QwQR17luenaspJPuSYtckqsLRXNqJEDg X-Received: by 10.99.96.200 with SMTP id u191mr15177422pgb.252.1519133424525; Tue, 20 Feb 2018 05:30:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519133424; cv=none; d=google.com; s=arc-20160816; b=lh+hYmunKRvfEaOvHTlJ9PdKHMWGYPBADyTHP+zgOlgZFLKY3MIdNKyhq45eDBuVvn 0HN4B3oXG2mu7z3NM4kBuY/KDreIqTg8Grn/OAR5BMtpoVTjPF+n7IeNvtqQdtmXtT4/ rc65vXrZUH+kFDWwNCrnx9auDf4T0RAxlAWYGbsOgR/61drA+Zkzmm9P5MQjZMajW2W0 UuJ1mlUmjq+6nqQZmb8FfrsWdpDrCEdR89EwtJytUVTfXutwRi4PgE1zqi6rrTHSrlEy llaODY6OMzRUMRMNNiD4F7B1mE5SPYeElerBAGHK0Tq/yLayU9IZrSzZMjGZZ6luAJJ/ ghUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=N8CEF3FPQoSe+fMf/4b2fFjdMfiQhn2cK9GhByiXLWg=; b=SMMa5sRfpVL4K9tT0Aw7arGjPtw6BVnCZRv5RULpvtxZKIA7+0L3LxdJU0coyuWHZo KmYJ/vr7i0KSZK93PurdkpkArTxskL3gQmRAR6BLX9G91METPqbC3JFPcktLUwtF4Iw2 QgYHNAat4W2rKxBeELLw+C+B5x9nT2pS61d5DQL8i6HdzdxpMRpfuv+EPbL/MfYqP272 F12kWS7bissB/xuOMZsJoBfSIQUA6HuqeGnJzuhHZwXWPPAFE7ZA5/z1lAtuDtuXztw5 m0l9MFcACB+Oj5l+Me5KlP8RqYKpgW4kUfagLa3jBtjlMdRIh6OmnyVeCDTIK3CgFZ3G x7Nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=o1oJjs3A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si1350288ply.476.2018.02.20.05.30.09; Tue, 20 Feb 2018 05:30:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=o1oJjs3A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751997AbeBTN2u (ORCPT + 99 others); Tue, 20 Feb 2018 08:28:50 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:39894 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751646AbeBTN2s (ORCPT ); Tue, 20 Feb 2018 08:28:48 -0500 Received: by mail-pg0-f66.google.com with SMTP id w17so7103344pgv.6; Tue, 20 Feb 2018 05:28:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=N8CEF3FPQoSe+fMf/4b2fFjdMfiQhn2cK9GhByiXLWg=; b=o1oJjs3A4FC7XOQOQ8Zip9Zags23M+wjjmyZQcPn6c8Vh7l/2A1ADLuXH3c6BUl30E E5b/KG8p0IOdqArUSR0FwNXVjOb9tmH4J0ogiRJPIOdyQJX9l4lwsVy5OL9CttEqjOzs dMqfE2gSj/CNgV1DshuCYhpwgUD9R1rHCEkU2hh35hvcCz59pTKINot+l/wbPGiBTeis zSQLBLdH5gD0oI8IkAfcoszqey1aFKKc9qGLx05Z44oL4n9dTh+v3MdwYmVveyhd8chP hKnz4SJYFAytYTcH1WEeHVV3XZVDvaQx1i9h5OrL+AVtKu2LzKWSDi741D8+wLxed1dj utbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=N8CEF3FPQoSe+fMf/4b2fFjdMfiQhn2cK9GhByiXLWg=; b=smb7cWhovAN37KqHX245M8YIDDIzTE9juc5sXcvGKTIZS9Kgq06GkMbrmYNspGUH63 Uf3EFZNbBZN/o9k6o1BNt26aFsttu+Rxsg66M3BC27y5Zpx1crggQ8vWV3xwvd7RNPk2 llYGhuxxXXi2ZrO79dqq8eqCPgSqC5JjNfBQpoHz7RTlx3c2pEubP3jHN6DA0RfIEi1m fSlQXAVW+gJweZB2+V61ZBNPMXO4DQ8qblWeHm/tyz3SFGV8cGoER1o1NxxvzMrK9THC EqVTncV3Ost/UERaZhRiuBgvxLvldCtr4C08jMQGk0xZhQIO0j6fBhcT50XblTgThwUc zKrg== X-Gm-Message-State: APf1xPCVy53DxqM6nw38boL8v/UuecDSecFKM3MrITySOyy8VUcB+kXc 5f74nL1docvp5aWsITHSIPqF39pF X-Received: by 10.98.133.140 with SMTP id m12mr18032155pfk.226.1519133328461; Tue, 20 Feb 2018 05:28:48 -0800 (PST) Received: from li1588-6.members.linode.com (li1588-6.members.linode.com. [139.162.104.6]) by smtp.gmail.com with ESMTPSA id v1sm59624341pfg.33.2018.02.20.05.28.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Feb 2018 05:28:47 -0800 (PST) From: Yafang Shao To: davem@davemloft.net Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Yafang Shao Subject: [PATCH net-next] tcp: remove the hardcode in the definition of TCPF Macro Date: Tue, 20 Feb 2018 21:28:31 +0800 Message-Id: <1519133311-22068-1-git-send-email-laoar.shao@gmail.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org TCPF_ macro depends on the definition of TCP_ macro. So it is better to define them with TCP_ marco. Signed-off-by: Yafang Shao --- include/net/tcp_states.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/include/net/tcp_states.h b/include/net/tcp_states.h index 50e78a7..2875e16 100644 --- a/include/net/tcp_states.h +++ b/include/net/tcp_states.h @@ -32,21 +32,21 @@ enum { #define TCP_STATE_MASK 0xF -#define TCP_ACTION_FIN (1 << 7) +#define TCP_ACTION_FIN (1 << TCP_CLOSE) enum { - TCPF_ESTABLISHED = (1 << 1), - TCPF_SYN_SENT = (1 << 2), - TCPF_SYN_RECV = (1 << 3), - TCPF_FIN_WAIT1 = (1 << 4), - TCPF_FIN_WAIT2 = (1 << 5), - TCPF_TIME_WAIT = (1 << 6), - TCPF_CLOSE = (1 << 7), - TCPF_CLOSE_WAIT = (1 << 8), - TCPF_LAST_ACK = (1 << 9), - TCPF_LISTEN = (1 << 10), - TCPF_CLOSING = (1 << 11), - TCPF_NEW_SYN_RECV = (1 << 12), + TCPF_ESTABLISHED = (1 << TCP_ESTABLISHED), + TCPF_SYN_SENT = (1 << TCP_SYN_SENT), + TCPF_SYN_RECV = (1 << TCP_SYN_RECV), + TCPF_FIN_WAIT1 = (1 << TCP_FIN_WAIT1), + TCPF_FIN_WAIT2 = (1 << TCP_FIN_WAIT2), + TCPF_TIME_WAIT = (1 << TCP_TIME_WAIT), + TCPF_CLOSE = (1 << TCP_CLOSE), + TCPF_CLOSE_WAIT = (1 << TCP_CLOSE_WAIT), + TCPF_LAST_ACK = (1 << TCP_LAST_ACK), + TCPF_LISTEN = (1 << TCP_LISTEN), + TCPF_CLOSING = (1 << TCP_CLOSING), + TCPF_NEW_SYN_RECV = (1 << TCP_NEW_SYN_RECV), }; #endif /* _LINUX_TCP_STATES_H */ -- 1.8.3.1