From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933591AbcAZIID (ORCPT ); Tue, 26 Jan 2016 03:08:03 -0500 Received: from p3plsmtps2ded03.prod.phx3.secureserver.net ([208.109.80.60]:40393 "EHLO p3plsmtps2ded03.prod.phx3.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932934AbcAZIH5 (ORCPT ); Tue, 26 Jan 2016 03:07:57 -0500 x-originating-ip: 72.167.245.219 From: Dexuan Cui To: gregkh@linuxfoundation.org, davem@davemloft.net, stephen@networkplumber.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, driverdev-devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com, jasowang@redhat.com, kys@microsoft.com, vkuznets@redhat.com Cc: pebolle@tiscali.nl, stefanha@redhat.com, dan.carpenter@oracle.com Subject: [PATCH V6 2/8] Drivers: hv: vmbus: define the new offer type for Hyper-V socket (hvsock) Date: Tue, 26 Jan 2016 01:44:15 -0800 Message-Id: <1453801455-3284-1-git-send-email-decui@microsoft.com> X-Mailer: git-send-email 1.7.4.1 X-CMAE-Envelope: MS4wfNbTBWJH+/ab66N3MPWsgpoadhJRYHMSGLhw2bKV+AIg6HvXtMWid3vlt70TUP8plYYezhcI4J5mVam7HSN7oqu8O7TyAw2WOVYX+qj2FxkD5tXGuSNV yVeqJ6bKbqFNklmOthPnqjCj4z2Gz5xZTVORcna+9Gaq6pu0U5bK95O0kRJ0bWZFFqFZs4WeyRb1CmP1MiRwUqreLJ6J1WiuafUqKs7yW8MWTC+MJR5y5vnq Wz962UAs2H3GBMU8mqdGkbWjOMEeWe4LZnpLOYD2hDXCjBUpbTY77llzDkQ/tq45kOVQQRr0WiSS//FbQhKEX2NLPugSu6pbSgH200U2yTKdH2OdOAjP/Ei3 uyHHtApeOEd89zOvNLPpX+0Nz4RM8EP2LP0v8xKrzFt3BeB4p5bW0RffCtCM+pXp1Dh/P8AJRu165Sb/xOMLHitRJmwhmdtnvvlAqov6LPmSsX6cvxjYu7Fg A3YIa2nTHLcc9p1C4L8hddcRgQE27oPJzvdD3ofDXR1QV6U3hP2WcRLqoYpqDBLabQDUo09weXUF3+t/BuWZ01ym0k5/ItvWMWOD2iyq2a5yN/LTCNHlPykd iGEOU6A+m9E7msJZ7BCwWSC/XXK61FglwuKTqPQX/jm9vg== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A helper function is also added. Signed-off-by: Dexuan Cui --- include/linux/hyperv.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index e4867a7..c0eddd7 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h @@ -235,6 +235,7 @@ struct vmbus_channel_offer { #define VMBUS_CHANNEL_LOOPBACK_OFFER 0x100 #define VMBUS_CHANNEL_PARENT_OFFER 0x200 #define VMBUS_CHANNEL_REQUEST_MONITORED_NOTIFICATION 0x400 +#define VMBUS_CHANNEL_TLNPI_PROVIDER_OFFER 0x2000 struct vmpacket_descriptor { u16 type; @@ -769,6 +770,12 @@ struct vmbus_channel { enum hv_signal_policy signal_policy; }; +static inline bool is_hvsock_channel(const struct vmbus_channel *c) +{ + return !!(c->offermsg.offer.chn_flags & + VMBUS_CHANNEL_TLNPI_PROVIDER_OFFER); +} + static inline void set_channel_signal_state(struct vmbus_channel *c, enum hv_signal_policy policy) { -- 2.1.0 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dexuan Cui Subject: [PATCH V6 2/8] Drivers: hv: vmbus: define the new offer type for Hyper-V socket (hvsock) Date: Tue, 26 Jan 2016 01:44:15 -0800 Message-ID: <1453801455-3284-1-git-send-email-decui@microsoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: pebolle@tiscali.nl, dan.carpenter@oracle.com, stefanha@redhat.com To: gregkh@linuxfoundation.org, davem@davemloft.net, stephen@networkplumber.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, driverdev-devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com, jasowang@redhat.com, kys@microsoft.com, vkuznets@redhat.com Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" List-Id: netdev.vger.kernel.org A helper function is also added. Signed-off-by: Dexuan Cui --- include/linux/hyperv.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index e4867a7..c0eddd7 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h @@ -235,6 +235,7 @@ struct vmbus_channel_offer { #define VMBUS_CHANNEL_LOOPBACK_OFFER 0x100 #define VMBUS_CHANNEL_PARENT_OFFER 0x200 #define VMBUS_CHANNEL_REQUEST_MONITORED_NOTIFICATION 0x400 +#define VMBUS_CHANNEL_TLNPI_PROVIDER_OFFER 0x2000 struct vmpacket_descriptor { u16 type; @@ -769,6 +770,12 @@ struct vmbus_channel { enum hv_signal_policy signal_policy; }; +static inline bool is_hvsock_channel(const struct vmbus_channel *c) +{ + return !!(c->offermsg.offer.chn_flags & + VMBUS_CHANNEL_TLNPI_PROVIDER_OFFER); +} + static inline void set_channel_signal_state(struct vmbus_channel *c, enum hv_signal_policy policy) { -- 2.1.0