Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp2085279ybj; Sun, 22 Sep 2019 19:28:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqyeUoiNfLqp8VEJFCgEXz7LwqBjGV9f9YXQqtobVv1QfbfgkgfBTStzirnXdG6k5xCNfzbv X-Received: by 2002:a17:906:ccd6:: with SMTP id ot22mr7940187ejb.1.1569205709263; Sun, 22 Sep 2019 19:28:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569205709; cv=none; d=google.com; s=arc-20160816; b=zROA/pRqkRvCiBLsTIW1qYAi6u2JbPu2Zx12kmjBoP2muEw0TWqHPwqL1wQFWFIjwQ PB3FVO6HtTUPWWWRYb4l4RnEMm1rgDelYOZdKVWWcjYGt6C/VjtejlxPXZxruzEf8HqD UWmFJX39zRMO9Af1tcbGcrZNDPr5Hxkzc6BK8CJnNKM8eEoIVa81zzeC8EFy8tVAN3WP 2tD60eAZ6Bi09OgZV7Z5rt3DEYBZNo5NmHruT6ynEB0G/1H1DjpLbKfcli43lue7uOif LxsuigBaCUyIq1uW8iDUhsZlOHADwR2dBxdU+MjtjGv5yqEMEkDzYcZC+X2rfhEMESEQ dJrA== 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=W2QLeq5SA3i6bmzHGlddzv+JPs++MlGVkp06UybJAbM=; b=YMVvnv4vZnjyvH1XjPQe1316cP5VN/EspzxKRvjiHY9Q10OReHvDnaY3FLiDIKByOk lAXdJeTdjY/JCpOxzt3xtWRvEvqv9xjrtWGhWDts5yDV7JA+gUpUpyXVglo0aRLyrOY5 +le9DCkuXq6lEWcxgJWVauzdFnu2gP6PfS/Df3Ng1hLp0pHg9wZL9mHdMq5ABMzx3ZjR yw6iIrEOEvB7wqthUP6O6KLW+SZ4Kou4kGDmZOyg9EzV7SYMaK/eneoyAZeDBa4REKiW qyJ/hm9cp/8QKNvcud2ocbBFokYnwpHrc9XpWQLUIrOHTliu+jGc7VlpuTqqiFWR33Eg /2Rw== 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 fj16si4578014ejb.385.2019.09.22.19.27.36; Sun, 22 Sep 2019 19:28:29 -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 S2393549AbfITPmS (ORCPT + 99 others); Fri, 20 Sep 2019 11:42:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40452 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393522AbfITPmP (ORCPT ); Fri, 20 Sep 2019 11:42:15 -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 A4978302C084; Fri, 20 Sep 2019 15:42:15 +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 235DA19C5B; Fri, 20 Sep 2019 15:42:13 +0000 (UTC) Date: Fri, 20 Sep 2019 17:41:52 +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 1/3] uapi, net/smc: move protocol constant definitions to UAPI Message-ID: <1d8607a7bdcd846a090dd8b1cd3e56c06ab418e7.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.5.16 (mx1.redhat.com [10.5.110.46]); Fri, 20 Sep 2019 15:42:15 +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 878313f..e60effc 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