From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from tyo202.gate.nec.co.jp (TYO202.gate.nec.co.jp [202.32.8.206]) by dpdk.org (Postfix) with ESMTP id CFB7668F7 for ; Thu, 30 Jan 2014 12:45:51 +0100 (CET) Received: from mailgate3.nec.co.jp ([10.7.69.197]) by tyo202.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id s0UBl8M1022895; Thu, 30 Jan 2014 20:47:08 +0900 (JST) Received: from mailsv3.nec.co.jp (imss63.nec.co.jp [10.7.69.158]) by mailgate3.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) with ESMTP id s0UBl8m29265; Thu, 30 Jan 2014 20:47:08 +0900 (JST) Received: from mail02.kamome.nec.co.jp (mail02.kamome.nec.co.jp [10.25.43.5]) by mailsv3.nec.co.jp (8.13.8/8.13.4) with ESMTP id s0UBl7gu013404; Thu, 30 Jan 2014 20:47:07 +0900 (JST) Received: from bpxc99gp.gisp.nec.co.jp ([10.38.151.146] [10.38.151.146]) by mail01b.kamome.nec.co.jp with ESMTP id BT-MMP-667858; Thu, 30 Jan 2014 20:46:55 +0900 Received: from BPXM14GP.gisp.nec.co.jp ([169.254.1.238]) by BPXC18GP.gisp.nec.co.jp ([10.38.151.146]) with mapi id 14.02.0328.011; Thu, 30 Jan 2014 20:46:54 +0900 From: Hiroshi Shimamoto To: Olivier Matz , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [memnic PATCH] linux: fix build with kernel >= 3.3 Thread-Index: AQHPHZy0OF+vH4SXzEi+0lI6QyIR3JqdJdSw Date: Thu, 30 Jan 2014 11:46:53 +0000 Message-ID: <7F861DC0615E0C47A872E6F3C5FCDDBD0102D166@BPXM14GP.gisp.nec.co.jp> References: <1390579175-23942-1-git-send-email-olivier.matz@6wind.com> In-Reply-To: <1390579175-23942-1-git-send-email-olivier.matz@6wind.com> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.205.5.123] Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [memnic PATCH] linux: fix build with kernel >= 3.3 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: Thu, 30 Jan 2014 11:45:52 -0000 I never noticed about that and I haven't check compilation with newer kerne= l. But I think you have completed to test it. Fine to me. thanks, Hiroshi > Subject: [dpdk-dev] [memnic PATCH] linux: fix build with kernel >=3D 3.3 >=20 > Signed-off-by: Olivier Matz > --- > linux/memnic_net.c | 28 ++++++++++++++++++++++++++-- > 1 file changed, 26 insertions(+), 2 deletions(-) >=20 > diff --git a/linux/memnic_net.c b/linux/memnic_net.c > index 747ae51..b6018fb 100644 > --- a/linux/memnic_net.c > +++ b/linux/memnic_net.c > @@ -2,6 +2,7 @@ > * BSD LICENSE > * > * Copyright(c) 2013-2014 NEC All rights reserved. > + * Copyright(c) 2014 6WIND S.A. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > @@ -29,6 +30,7 @@ > */ > /* Dual BSD/GPL */ >=20 > +#include > #include > #include >=20 > @@ -259,13 +261,35 @@ static void memnic_tx_timeout(struct net_device *ne= tdev) > { > } >=20 > -static void memnic_vlan_rx_add_vid(struct net_device *netdev, unsigned s= hort vid) > +#if LINUX_VERSION_CODE >=3D KERNEL_VERSION(3,10,0) > +static int memnic_vlan_rx_add_vid(struct net_device *netdev, __be16 prot= o, u16 vid) > +{ > + return 0; > +} > + > +static int memnic_vlan_rx_kill_vid(struct net_device *netdev, __be16 pro= to, u16 vid) > +{ > + return 0; > +} > +#elif LINUX_VERSION_CODE >=3D KERNEL_VERSION(3,3,0) > +static int memnic_vlan_rx_add_vid(struct net_device *netdev, uint16_t vi= d) > +{ > + return 0; > +} > + > +static int memnic_vlan_rx_kill_vid(struct net_device *netdev, uint16_t v= id) > +{ > + return 0; > +} > +#else > +static void memnic_vlan_rx_add_vid(struct net_device *netdev, uint16_t v= id) > { > } >=20 > -static void memnic_vlan_rx_kill_vid(struct net_device *netdev, unsigned = short vid) > +static void memnic_vlan_rx_kill_vid(struct net_device *netdev, uint16_t = vid) > { > } > +#endif >=20 > static int memnic_ioctl(struct net_device *netdev, struct ifreq *req, in= t cmd) > { > -- > 1.8.4.rc3