From mboxrd@z Thu Jan 1 00:00:00 1970 From: Miguel Bernal Marin Subject: Re: [PATCH 0/2] kni: fix build with kernel 4.1 Date: Fri, 26 Jun 2015 09:36:41 -0500 Message-ID: <558D6379.4040401@linux.intel.com> References: <1435259380-26251-1-git-send-email-miguel.bernal.marin@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit To: "De Lara Guarch, Pablo" , "dev@dpdk.org" 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) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > >