From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 5B859C3B4 for ; Fri, 10 Jul 2015 17:34:46 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 10 Jul 2015 08:34:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,447,1432623600"; d="scan'208";a="522075225" Received: from pgsmsx107.gar.corp.intel.com ([10.221.44.105]) by FMSMGA003.fm.intel.com with ESMTP; 10 Jul 2015 08:34:43 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by PGSMSX107.gar.corp.intel.com (10.221.44.105) with Microsoft SMTP Server (TLS) id 14.3.224.2; Fri, 10 Jul 2015 23:34:41 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.129]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.157]) with mapi id 14.03.0224.002; Fri, 10 Jul 2015 23:34:40 +0800 From: "Zhang, Helin" To: "Xie, Huawei" , "Ouyang, Changchun" , "Liang, Cunming" Thread-Topic: [dpdk-dev] [PATCH v2 3/4] kni: fix function parameter from proto_ops pointers Thread-Index: AQHQsF2cuuT+lskrWU6UtvzwvZMQSJ3U6vCQ Date: Fri, 10 Jul 2015 15:34:40 +0000 Message-ID: References: <1435259380-26251-1-git-send-email-miguel.bernal.marin@linux.intel.com> <1435356878-10304-1-git-send-email-miguel.bernal.marin@linux.intel.com> <1435356878-10304-4-git-send-email-miguel.bernal.marin@linux.intel.com> In-Reply-To: <1435356878-10304-4-git-send-email-miguel.bernal.marin@linux.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v2 3/4] kni: fix function parameter from proto_ops pointers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 15:34:47 -0000 Could one of you guys help to review the KNI vhost part? Thanks, Helin > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Miguel Bernal Marin > Sent: Friday, June 26, 2015 3:15 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH v2 3/4] kni: fix function parameter from proto= _ops > pointers >=20 > Parameters from sendmsg and recvmsg has been changed in 4.1 kernel. > The function pointers belong to proto_ops structure were updated removing= the > struct kiocb parameter. >=20 > Fixes: 1b784140474e ("net: Remove iocb argument from sendmsg and recvmsg"= ) >=20 > Signed-off-by: Miguel Bernal Marin > --- > lib/librte_eal/linuxapp/kni/compat.h | 4 ++++ > lib/librte_eal/linuxapp/kni/kni_vhost.c | 10 ++++++++++ > 2 files changed, 14 insertions(+) >=20 > diff --git a/lib/librte_eal/linuxapp/kni/compat.h > b/lib/librte_eal/linuxapp/kni/compat.h > index 1ad22ba..cf100b6 100644 > --- a/lib/librte_eal/linuxapp/kni/compat.h > +++ b/lib/librte_eal/linuxapp/kni/compat.h > @@ -23,3 +23,7 @@ > #if LINUX_VERSION_CODE >=3D KERNEL_VERSION(3,19,0) #define > HAVE_IOV_ITER_MSGHDR #endif > + > +#if ( LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) ) #define > +HAVE_KIOCB_MSG_PARAM #endif /* < 4.1.0 */ > diff --git a/lib/librte_eal/linuxapp/kni/kni_vhost.c > b/lib/librte_eal/linuxapp/kni/kni_vhost.c > index e01420a..f21b47e 100644 > --- a/lib/librte_eal/linuxapp/kni/kni_vhost.c > +++ b/lib/librte_eal/linuxapp/kni/kni_vhost.c > @@ -353,8 +353,13 @@ except: > } >=20 > static int > +#ifdef HAVE_KIOCB_MSG_PARAM > kni_sock_sndmsg(struct kiocb *iocb, struct socket *sock, > struct msghdr *m, size_t total_len) > +#else > +kni_sock_sndmsg(struct socket *sock, > + struct msghdr *m, size_t total_len) #endif /* > HAVE_KIOCB_MSG_PARAM > +*/ > { > struct kni_vhost_queue *q =3D > container_of(sock->sk, struct kni_vhost_queue, sk); @@ -387,8 > +392,13 @@ kni_sock_sndmsg(struct kiocb *iocb, struct socket *sock, } >=20 > static int > +#ifdef HAVE_KIOCB_MSG_PARAM > kni_sock_rcvmsg(struct kiocb *iocb, struct socket *sock, > struct msghdr *m, size_t len, int flags) > +#else > +kni_sock_rcvmsg(struct socket *sock, > + struct msghdr *m, size_t len, int flags) #endif /* > +HAVE_KIOCB_MSG_PARAM */ > { > int vnet_hdr_len =3D 0; > int pkt_len =3D 0; > -- > 2.4.4