From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f174.google.com (mail-we0-f174.google.com [74.125.82.174]) by dpdk.org (Postfix) with ESMTP id 4A76E68A5 for ; Fri, 24 Jan 2014 16:58:27 +0100 (CET) Received: by mail-we0-f174.google.com with SMTP id x55so2807343wes.5 for ; Fri, 24 Jan 2014 07:59:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=rLIfBXP0SKt3ZhpDWUSnoop57fPD3fPVRzQwKMu4V3E=; b=nECx5owrBpqB+W15GHs3pruTM+WeXG+deHieTyeYjdUNWrgRPJG2ZWza3H+E2w+NlF Vy38jQjoWghvR4TdVNbGc0umEX2paqNEFgs3f/cOZc1rraNoOWW1YMmC2QqsTY1bYPyr /GqJjWwWKXnN1fkwh1iysQcLmGWs1mWURIzYu9fk/pHA7V4ENskNc7+mi5lrg7jamRM0 asQkvDmnomHqxurCDKHoNG5vmXVsKmAE3QZ1CNLKtYXHI3t1rgNBk59jucvpLdHYVUCm eoDd+zdQPkcY/MP+UyT33rZmXYGIc6TmMNmlNCe8PfS4J5HGELGEoa3fW5eaIoKaVW1y a37g== X-Gm-Message-State: ALoCoQmmYIUWdWNDu0MRykjAIdtzpQKpzb5DYHJ3K5NgCKHhL/h4oJeXc3W1lVHA0a+K/5F+D1WF X-Received: by 10.180.38.11 with SMTP id c11mr3666244wik.60.1390579184476; Fri, 24 Jan 2014 07:59:44 -0800 (PST) Received: from glumotte.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id ea4sm8009928wib.7.2014.01.24.07.59.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Jan 2014 07:59:43 -0800 (PST) From: Olivier Matz To: dev@dpdk.org Date: Fri, 24 Jan 2014 16:59:35 +0100 Message-Id: <1390579175-23942-1-git-send-email-olivier.matz@6wind.com> X-Mailer: git-send-email 1.8.4.rc3 Subject: [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: Fri, 24 Jan 2014 15:58:27 -0000 Signed-off-by: Olivier Matz --- linux/memnic_net.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) 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 */ +#include #include #include @@ -259,13 +261,35 @@ static void memnic_tx_timeout(struct net_device *netdev) { } -static void memnic_vlan_rx_add_vid(struct net_device *netdev, unsigned short vid) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) +static int memnic_vlan_rx_add_vid(struct net_device *netdev, __be16 proto, u16 vid) +{ + return 0; +} + +static int memnic_vlan_rx_kill_vid(struct net_device *netdev, __be16 proto, u16 vid) +{ + return 0; +} +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) +static int memnic_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid) +{ + return 0; +} + +static int memnic_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid) +{ + return 0; +} +#else +static void memnic_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid) { } -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 static int memnic_ioctl(struct net_device *netdev, struct ifreq *req, int cmd) { -- 1.8.4.rc3