Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp2138510ybj; Sun, 22 Sep 2019 20:57:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqyC1E7l0eTinz5QkN3Q91/AlF6UQk1DuUpbbxAe/Ljpug2LB75JwoYYtcP9J1dJrsBoadX/ X-Received: by 2002:a50:baab:: with SMTP id x40mr35129430ede.60.1569211043860; Sun, 22 Sep 2019 20:57:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569211043; cv=none; d=google.com; s=arc-20160816; b=FwNoK29NimiYfZ9B6ljATXlsYte9TVXt10dgaY/sBaLRifVTopJ7Nt+HMPuDDg43ot c0e6PTqgADWoPCDYrEpeUs06t3zOBbunyKn9Su26B1uCvXtjUvjMg/hhP3sP34a7yUDm 5+V3uzbTUyaw3OHTHgdAVEtlcCs80SCgSXiwoQPmxEmKPnDVBCeCbaxjCw8f+sWuXNJE GRWO+40juHfWXCotgsMfsS4MRvRtHME2+V9K1vZrPkkl1vN4hyebelxCkhACx74aXnw4 NEVxralB4oj4Z4ZZPQTsN/a5Di3hLElG/u0KHMGM7lJGquuM9x9wCinA06K5n/TfzPYK +r1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=uJC5pbW3rsbT2h88YOFuNlnlBMZRTN/sPXLlBfbiovM=; b=lSmt+HmNBpK9rwU3wmz9OXOVp7ib4ZmSUm7aJrFKubXuFYN/HiqtP1C0TeKqnK1uTY FHZJ3APCVHkIi/t6vhBUm8sfZ3DCsqOZuIVwm006VyXs+yk/1rtq1J+6rFfeiap58bx2 m/QeVgzQV2g+041sXEFNvUqxddfre9DMkTUSGAhyjcVJmNb9zCuO5nhW6kdpZ5zbveNx BKT/UD/zSIYCpVBHOBTSofkjTFVCreT6PmfxkifunkxiPeMTe3mp9l6zi6BnlhnzEwCC sTKHJdEFx5SVsbjsaFR+W7/KqiUqhBxTE8g9+83Lbgxg/21VeB0bizw4AqsyCL8dTHfG 5sOw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i5si6301203edj.107.2019.09.22.20.57.00; Sun, 22 Sep 2019 20:57:23 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404186AbfITPmZ (ORCPT + 99 others); Fri, 20 Sep 2019 11:42:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34512 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393522AbfITPmX (ORCPT ); Fri, 20 Sep 2019 11:42:23 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8A06D10DCC82; Fri, 20 Sep 2019 15:42:23 +0000 (UTC) Received: from asgard.redhat.com (ovpn-112-68.ams2.redhat.com [10.36.112.68]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 099DC19C5B; Fri, 20 Sep 2019 15:42:21 +0000 (UTC) Date: Fri, 20 Sep 2019 17:42:00 +0200 From: Eugene Syromiatnikov To: netdev@vger.kernel.org Cc: "David S. Miller" , linux-kernel@vger.kernel.org, Ursula Braun , Karsten Graul Subject: [PATCH net v2 3/3] uapi, net/smc: provide socket state constants in UAPI Message-ID: <2be8f9cfd2e031a9217326ea89227e0517248f0f.1568993930.git.esyr@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.64]); Fri, 20 Sep 2019 15:42:23 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As socket state itself is already exposed via sock_diag interface. Fixes: ac7138746e14 ("smc: establish new socket family") Fixes: b38d732477e4 ("smc: socket closing and linkgroup cleanup") Signed-off-by: Eugene Syromiatnikov --- include/uapi/linux/smc_diag.h | 17 +++++++++++++++++ net/smc/smc.h | 18 +----------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/include/uapi/linux/smc_diag.h b/include/uapi/linux/smc_diag.h index 8cb3a6f..6798ec0 100644 --- a/include/uapi/linux/smc_diag.h +++ b/include/uapi/linux/smc_diag.h @@ -31,6 +31,23 @@ struct smc_diag_msg { __aligned_u64 diag_inode; }; +enum smc_state { /* possible states of an SMC socket */ + SMC_ACTIVE = 1, + SMC_INIT = 2, + SMC_CLOSED = 7, + SMC_LISTEN = 10, + /* normal close */ + SMC_PEERCLOSEWAIT1 = 20, + SMC_PEERCLOSEWAIT2 = 21, + SMC_APPFINCLOSEWAIT = 24, + SMC_APPCLOSEWAIT1 = 22, + SMC_APPCLOSEWAIT2 = 23, + SMC_PEERFINCLOSEWAIT = 25, + /* abnormal close */ + SMC_PEERABORTWAIT = 26, + SMC_PROCESSABORT = 27, +}; + /* Mode of a connection */ enum { SMC_DIAG_MODE_SMCR, diff --git a/net/smc/smc.h b/net/smc/smc.h index e60effc..7eaef72 100644 --- a/net/smc/smc.h +++ b/net/smc/smc.h @@ -16,6 +16,7 @@ #include /* __aligned */ #include #include +#include #include "smc_ib.h" @@ -26,23 +27,6 @@ extern struct proto smc_proto6; #define KERNEL_HAS_ATOMIC64 #endif -enum smc_state { /* possible states of an SMC socket */ - SMC_ACTIVE = 1, - SMC_INIT = 2, - SMC_CLOSED = 7, - SMC_LISTEN = 10, - /* normal close */ - SMC_PEERCLOSEWAIT1 = 20, - SMC_PEERCLOSEWAIT2 = 21, - SMC_APPFINCLOSEWAIT = 24, - SMC_APPCLOSEWAIT1 = 22, - SMC_APPCLOSEWAIT2 = 23, - SMC_PEERFINCLOSEWAIT = 25, - /* abnormal close */ - SMC_PEERABORTWAIT = 26, - SMC_PROCESSABORT = 27, -}; - struct smc_link_group; struct smc_wr_rx_hdr { /* common prefix part of LLC and CDC to demultiplex */ -- 2.1.4