From owner-svn-src-projects@FreeBSD.ORG Wed Mar 25 14:23:09 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E55D723B; Wed, 25 Mar 2015 14:23:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD843BC4; Wed, 25 Mar 2015 14:23:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PEN8vW005430; Wed, 25 Mar 2015 14:23:08 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PEN8Jn005428; Wed, 25 Mar 2015 14:23:08 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201503251423.t2PEN8Jn005428@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 25 Mar 2015 14:23:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r280618 - projects/ifnet/sys/net X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 14:23:09 -0000 Author: glebius Date: Wed Mar 25 14:23:07 2015 New Revision: 280618 URL: https://svnweb.freebsd.org/changeset/base/280618 Log: Remove vlan_cookie()/vlan_setcookie(), they are unused. Note that there is a plan to provide KPI to assign arbitrary cookies on ifnet(9). Modified: projects/ifnet/sys/net/if_vlan.c projects/ifnet/sys/net/if_vlan_var.h Modified: projects/ifnet/sys/net/if_vlan.c ============================================================================== --- projects/ifnet/sys/net/if_vlan.c Wed Mar 25 14:20:57 2015 (r280617) +++ projects/ifnet/sys/net/if_vlan.c Wed Mar 25 14:23:07 2015 (r280618) @@ -106,7 +106,6 @@ struct ifvlan { struct ifnet *ifv_ifp; #define TRUNK(ifv) ((ifv)->ifv_trunk) #define PARENT(ifv) ((ifv)->ifv_trunk->parent) - void *ifv_cookie; int ifv_pflags; /* special flags we have set on parent */ struct ifv_linkmib { int ifvm_encaplen; /* encapsulation length */ @@ -644,37 +643,6 @@ vlan_tag(struct ifnet *ifp, uint16_t *vi } /* - * Return a driver specific cookie for this interface. Synchronization - * with setcookie must be provided by the driver. - */ -static void * -vlan_cookie(struct ifnet *ifp) -{ - struct ifvlan *ifv; - - if (ifp->if_type != IFT_L2VLAN) - return (NULL); - ifv = ifp->if_softc; - return (ifv->ifv_cookie); -} - -/* - * Store a cookie in our softc that drivers can use to store driver - * private per-instance data in. - */ -static int -vlan_setcookie(struct ifnet *ifp, void *cookie) -{ - struct ifvlan *ifv; - - if (ifp->if_type != IFT_L2VLAN) - return (EINVAL); - ifv = ifp->if_softc; - ifv->ifv_cookie = cookie; - return (0); -} - -/* * Return the vlan device present at the specific VID. */ static struct ifnet * @@ -727,8 +695,6 @@ vlan_modevent(module_t mod, int type, vo vlan_link_state_p = vlan_link_state; vlan_trunk_cap_p = vlan_trunk_capabilities; vlan_trunkdev_p = vlan_trunkdev; - vlan_cookie_p = vlan_cookie; - vlan_setcookie_p = vlan_setcookie; vlan_tag_p = vlan_tag; vlan_devat_p = vlan_devat; #ifndef VIMAGE @@ -756,8 +722,6 @@ vlan_modevent(module_t mod, int type, vo vlan_trunk_cap_p = NULL; vlan_trunkdev_p = NULL; vlan_tag_p = NULL; - vlan_cookie_p = NULL; - vlan_setcookie_p = NULL; vlan_devat_p = NULL; VLAN_LOCK_DESTROY(); if (bootverbose) Modified: projects/ifnet/sys/net/if_vlan_var.h ============================================================================== --- projects/ifnet/sys/net/if_vlan_var.h Wed Mar 25 14:20:57 2015 (r280617) +++ projects/ifnet/sys/net/if_vlan_var.h Wed Mar 25 14:23:07 2015 (r280618) @@ -114,11 +114,6 @@ struct vlanreq { (_ifp)->if_type == IFT_L2VLAN ? (*vlan_trunkdev_p)((_ifp)) : NULL #define VLAN_TAG(_ifp, _vid) \ (_ifp)->if_type == IFT_L2VLAN ? (*vlan_tag_p)((_ifp), (_vid)) : EINVAL -#define VLAN_COOKIE(_ifp) \ - (_ifp)->if_type == IFT_L2VLAN ? (*vlan_cookie_p)((_ifp)) : NULL -#define VLAN_SETCOOKIE(_ifp, _cookie) \ - (_ifp)->if_type == IFT_L2VLAN ? \ - (*vlan_setcookie_p)((_ifp), (_cookie)) : EINVAL #define VLAN_DEVAT(_ifp, _vid) \ (_ifp)->if_vlantrunk != NULL ? (*vlan_devat_p)((_ifp), (_vid)) : NULL @@ -126,8 +121,6 @@ extern void (*vlan_trunk_cap_p)(struct i extern struct ifnet *(*vlan_trunkdev_p)(struct ifnet *); extern struct ifnet *(*vlan_devat_p)(struct ifnet *, uint16_t); extern int (*vlan_tag_p)(struct ifnet *, uint16_t *); -extern int (*vlan_setcookie_p)(struct ifnet *, void *); -extern void *(*vlan_cookie_p)(struct ifnet *); #ifdef _SYS_EVENTHANDLER_H_ /* VLAN state change events */