Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2691812imm; Sun, 7 Oct 2018 09:35:19 -0700 (PDT) X-Google-Smtp-Source: ACcGV63EIBEkkj10MWpnUcxgsm356dhB87v2uho/aBEC98+vpae9EfDN5ZUOFHnxtdoTwZPFVjEU X-Received: by 2002:a65:5347:: with SMTP id w7-v6mr18292624pgr.17.1538930119462; Sun, 07 Oct 2018 09:35:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538930119; cv=none; d=google.com; s=arc-20160816; b=Gj9wIGDblBr503gQWbTTTbhK6D6PoplEAj3s/zOJmeuOTh1DMsjLu5TCSbcH1DyuRC y4pOXLvGSEf1wXEVnkc+0Xq4RDtYyuDZyt8OvLH03lFjMO3Wu125JMqYwRXhR+8tZDoE 0MO7eVRzexMOlxLIQjM49GiltzR/X35ACkB1qkeNaOdaOMNJkmkmo7W5+MPIbfhb5anN UofSkEi9Ly9dzvjMCo/+legTk4Me1MC1FPphxz000SjzO+yt7gmqjTwkVwemKOdXo2Rw cRcTT6kXTrqH1EeRZk8J8uLwIH7KoAkV9/m3WQQ9hhC1bTWk8+b9CBsCRFvsCTsjAKrZ l+RA== 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=5U25T57Wfv0CpkOH71bRPwWcxI2gkHDMo09Rlz8qmCQ=; b=UPG8SLyIobq8C9TaJrnxlhzeDzwYWCgdrcS3uvADTNNp2pRh7VYZqT1+MmjvbUZ/Q4 1y6PyZeCtLPExgi1KGa8RZ6dB4AeG8apQspuv8Kk5vkKmSGxfxBrXXnm0oPaEdd2Bguf c9Uj8sbsIx6QqFqSCA0ngj/sUXaz36LZYvBOM4BenYkBezSLbkVs0D8tzlrADID2y0ju qIeyloarrGsl4V1EBdE+rwZQFCEGG7+ycC4bNTzER3nGu0BgS3aQxMCAbPqW37L1NyuS 5OswOq3Uyt8wHXJtUO1bzr+c7o0R13rqS378jyJCVvrBiUIHyn3QXfKXUJGryOsFpscH Id6g== 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 z16-v6si14873610plo.5.2018.10.07.09.34.45; Sun, 07 Oct 2018 09:35:19 -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 S1728139AbeJGXmS (ORCPT + 99 others); Sun, 7 Oct 2018 19:42:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54648 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726986AbeJGXmR (ORCPT ); Sun, 7 Oct 2018 19:42:17 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5E3A13084033; Sun, 7 Oct 2018 16:34:30 +0000 (UTC) Received: from asgard.redhat.com (ovpn-200-33.brq.redhat.com [10.40.200.33]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 413382016367; Sun, 7 Oct 2018 16:34:28 +0000 (UTC) Date: Sun, 7 Oct 2018 18:35:02 +0200 From: Eugene Syromiatnikov To: netdev@vger.kernel.org Cc: "David S. Miller" , linux-kernel@vger.kernel.org, Ursula Braun , Karsten Graul , Hans Wippel , linux-s390@vger.kernel.org Subject: [RFC PATCH net 1/3] uapi, net/smc: move protocol constant definitions to UAPI Message-ID: 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.25 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Sun, 07 Oct 2018 16:34:30 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SMCPROTO_* constants are expected to be used by userspace[1], but they were defined in a private header instead. [1] http://manpages.ubuntu.com/manpages/cosmic/man7/af_smc.7.html Fixes: ac7138746e14 ("smc: establish new socket family") Fixes: aaa4d33f6da1 ("net/smc: enable ipv6 support for smc") Signed-off-by: Eugene Syromiatnikov --- include/uapi/linux/smc.h | 7 ++++++- net/smc/smc.h | 4 +--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/uapi/linux/smc.h b/include/uapi/linux/smc.h index 0e11ca4..10561f8 100644 --- a/include/uapi/linux/smc.h +++ b/include/uapi/linux/smc.h @@ -2,7 +2,8 @@ /* * Shared Memory Communications over RDMA (SMC-R) and RoCE * - * Definitions for generic netlink based configuration of an SMC-R PNET table + * Definitions for SMC protocol and generic netlink based configuration + * of an SMC-R PNET table * * Copyright IBM Corp. 2016 * @@ -12,6 +13,10 @@ #ifndef _UAPI_LINUX_SMC_H_ #define _UAPI_LINUX_SMC_H_ +/* AF_SMC socket protocols */ +#define SMCPROTO_SMC 0 /* SMC protocol, IPv4 */ +#define SMCPROTO_SMC6 1 /* SMC protocol, IPv6 */ + /* Netlink SMC_PNETID attributes */ enum { SMC_PNETID_UNSPEC, diff --git a/net/smc/smc.h b/net/smc/smc.h index 08786ac..f5ff2ee 100644 --- a/net/smc/smc.h +++ b/net/smc/smc.h @@ -15,12 +15,10 @@ #include #include /* __aligned */ #include +#include #include "smc_ib.h" -#define SMCPROTO_SMC 0 /* SMC protocol, IPv4 */ -#define SMCPROTO_SMC6 1 /* SMC protocol, IPv6 */ - extern struct proto smc_proto; extern struct proto smc_proto6; -- 2.1.4