From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 653C01396 for ; Fri, 26 Jun 2015 16:36:43 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 26 Jun 2015 07:36:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,685,1427785200"; d="scan'208";a="751003277" Received: from mbernalm-mobl3.zpn.intel.com (HELO mbernalm-mobl3.amr.corp.intel.com) ([10.219.18.91]) by fmsmga002.fm.intel.com with ESMTP; 26 Jun 2015 07:36:41 -0700 Message-ID: <558D6379.4040401@linux.intel.com> Date: Fri, 26 Jun 2015 09:36:41 -0500 From: Miguel Bernal Marin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "De Lara Guarch, Pablo" , "dev@dpdk.org" References: <1435259380-26251-1-git-send-email-miguel.bernal.marin@linux.intel.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 0/2] kni: fix build with kernel 4.1 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, 26 Jun 2015 14:36:43 -0000 On 06/25/2015 04:56 PM, De Lara Guarch, Pablo wrote: > Hi Miguel, > >> -----Original Message----- >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Miguel Bernal >> Marin >> Sent: Thursday, June 25, 2015 8:10 PM >> To: dev@dpdk.org >> Subject: [dpdk-dev] [PATCH 0/2] kni: fix build with kernel 4.1 >> >> Due to API changes in netdevice.h in 4.1 kernel release, KNI modules >> would not build. This patch set adds the properly checks to fix >> compilation. >> >> Miguel Bernal Marin (2): >> kni: fix igb_ndo_bridge_getlink in 4.1 >> kni: fix header_ops in 4.1 >> >> lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 10 ++++++++++ >> lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 5 +++++ >> lib/librte_eal/linuxapp/kni/kni_net.c | 4 ++++ >> 3 files changed, 19 insertions(+) >> >> -- >> 2.3.3 > > I have tested your fix and it works for kernel 4.1, but I get and error if CONFIG_RTE_KNI_VHOST=y: > > CC [M] /root/dpdk-latest/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/kni_vhost.o > /root/dpdk-latest/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/kni_vhost.c:593:2: error: initialization from incompatible pointer type [-Werror] > .sendmsg = kni_sock_sndmsg, > ^ > /root/dpdk-latest/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/kni_vhost.c:593:2: error: (near initialization for 'kni_socket_ops.sendmsg') [-Werror] > /root/dpdk-latest/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/kni_vhost.c:594:2: error: initialization from incompatible pointer type [-Werror] > .recvmsg = kni_sock_rcvmsg, > ^ > /root/dpdk-latest/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/kni_vhost.c:594:2: error: (near initialization for 'kni_socket_ops.recvmsg') [-Werror] > cc1: all warnings being treated as errors > /home/kernel_test/kernels_rc/linux-4.1/scripts/Makefile.build:258: recipe for target '/root/dpdk-latest/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/kni_vhost.o' failed > make[10]: *** [/root/dpdk-latest/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/kni_vhost.o] Error 1 > /home/kernel_test/kernels_rc/linux-4.1/Makefile:1383: recipe for target '_module_/root/dpdk-latest/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni' failed > > The fix for this is to remove struct socket *sock from kni_sock_sndmsg and kni_sock_rcvmsg in kni_vhost.c. > > Could you send a v2 with this fix as well? Sure, I forgot to enable KNI_VHOST with 4.1. Doing V2 and sending > > Thanks for this, > Pablo > >