From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 58F3DDE3 for ; Fri, 7 Feb 2014 14:03:39 +0100 (CET) Received: by mail-wg0-f50.google.com with SMTP id l18so2265537wgh.29 for ; Fri, 07 Feb 2014 05:05:01 -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:in-reply-to :references; bh=LpAaO+QHVZ8d23kmznkBqQlWQhx8TfYdPRuXP1gSeiU=; b=bKNRKL/P6qIwRASr5FWJ5TgQl3qyc4Qs/WePRuFnYp7wM/VDKTuorrfrvTG+qKgJEV 0tM52fHk5i5lVWYAmYG0n+0Fi36SozgHTF6CK6A8NH1IaMbkh3bfpt3Q6U5gWgek+X5q w0doY/aIncbFWLe90xQRFn2GFYAJ2ROXtd3Vz+iSStjxeegAZO4j1NwjIiIkcCEkV1Td AX4mIGc+SI9AV5q2YNx+WJUkt1T9Is2vOhbzdp/eXetmZ63Ausuu0lfdlHwVALSqCWEr gwqROPZkneiJ9/4ct2vqSXlzb2QS2VLMZ5ndROa2EG5nXJUWbiFPlTcYmZX3gPnL3B7X E0GQ== X-Gm-Message-State: ALoCoQnM0LA+GszPTXsAeUArk4n9CJxcaDIy8kiPPqcbaYngu00TFmI8obf6tihNa86QCOTP6AV8 X-Received: by 10.194.92.164 with SMTP id cn4mr921704wjb.74.1391778300362; Fri, 07 Feb 2014 05:05:00 -0800 (PST) Received: from glumotte.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id dd3sm10578005wjb.9.2014.02.07.05.04.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Feb 2014 05:04:59 -0800 (PST) From: Olivier Matz To: dev@dpdk.org Date: Fri, 7 Feb 2014 14:04:42 +0100 Message-Id: <1391778282-14558-1-git-send-email-olivier.matz@6wind.com> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <7F861DC0615E0C47A872E6F3C5FCDDBD0102D166@BPXM14GP.gisp.nec.co.jp> References: <7F861DC0615E0C47A872E6F3C5FCDDBD0102D166@BPXM14GP.gisp.nec.co.jp> Subject: [dpdk-dev] [memnic PATCH v2] 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, 07 Feb 2014 13:03:39 -0000 Remove unused dev_ops functions. The API of some functions (memnic_vlan_rx_add_vid, memnic_vlan_rx_kill_vid) changed starting from 3.3 kernel. Instead of using a #ifdef to handle the compilation on any kernel, we can just remove these functions as they are not needed. Signed-off-by: Olivier Matz --- linux/memnic_net.c | 33 --------------------------------- 1 file changed, 33 deletions(-) Hi Shimamoto-san, Here is a new version of the patch, I think we don't need the following functions so we can just remove them instead of keeping several dummy functions for different kernel versions. Let me know if you have any comment. Regards, Olivier diff --git a/linux/memnic_net.c b/linux/memnic_net.c index 747ae51..9019258 100644 --- a/linux/memnic_net.c +++ b/linux/memnic_net.c @@ -235,16 +235,6 @@ drop: return NETDEV_TX_OK; } -static u16 memnic_select_queue(struct net_device *netdev, - struct sk_buff *skb) -{ - return 0; -} - -static void memnic_set_rx_mode(struct net_device *netdev) -{ -} - static int memnic_set_mac(struct net_device *netdev, void *p) { return 0; @@ -255,23 +245,6 @@ static int memnic_change_mtu(struct net_device *netdev, int new_mtu) return 0; } -static void memnic_tx_timeout(struct net_device *netdev) -{ -} - -static void memnic_vlan_rx_add_vid(struct net_device *netdev, unsigned short vid) -{ -} - -static void memnic_vlan_rx_kill_vid(struct net_device *netdev, unsigned short vid) -{ -} - -static int memnic_ioctl(struct net_device *netdev, struct ifreq *req, int cmd) -{ - return 0; -} - static struct net_device_stats *memnic_get_stats(struct net_device *netdev) { struct memnic_net *memnic = netdev_priv(netdev); @@ -283,15 +256,9 @@ static const struct net_device_ops memnic_netdev_ops = { .ndo_open = memnic_open, .ndo_stop = memnic_close, .ndo_start_xmit = memnic_start_xmit, - .ndo_select_queue = memnic_select_queue, - .ndo_set_rx_mode = memnic_set_rx_mode, .ndo_validate_addr = eth_validate_addr, .ndo_set_mac_address = memnic_set_mac, .ndo_change_mtu = memnic_change_mtu, - .ndo_tx_timeout = memnic_tx_timeout, - .ndo_vlan_rx_add_vid = memnic_vlan_rx_add_vid, - .ndo_vlan_rx_kill_vid = memnic_vlan_rx_kill_vid, - .ndo_do_ioctl = memnic_ioctl, .ndo_get_stats = memnic_get_stats, }; -- 1.8.5.3