[dpdk-dev] [memnic PATCH v2] linux: fix build with kernel 3.3
Hiroshi Shimamoto
h-shimamoto at ct.jp.nec.com
Wed Mar 19 00:04:45 CET 2014
Hi,
I missed it sorry.
> Subject: [memnic PATCH v2] linux: fix build with kernel 3.3
>
> 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 <olivier.matz at 6wind.com>
Acked-by: Hiroshi Shimamoto <h-shimamoto at ct.jp.nec.com>
thanks,
Hiroshi
> ---
> 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
More information about the dev
mailing list