Page MenuHomeFreeBSD

D19032.id53514.diff
No OneTemporary

D19032.id53514.diff

Index: if_lagg.c
===================================================================
--- if_lagg.c
+++ if_lagg.c
@@ -133,6 +133,7 @@
static int lagg_snd_tag_alloc(struct ifnet *,
union if_snd_tag_alloc_params *,
struct m_snd_tag **);
+static void lagg_snd_tag_free(struct m_snd_tag *);
#endif
static int lagg_setmulti(struct lagg_port *);
static int lagg_clrmulti(struct lagg_port *);
@@ -514,9 +515,11 @@
ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST;
#ifdef RATELIMIT
ifp->if_snd_tag_alloc = lagg_snd_tag_alloc;
+ ifp->if_snd_tag_free = lagg_snd_tag_free;
+ ifp->if_capenable = ifp->if_capabilities = IFCAP_HWSTATS | IFCAP_TXRTLMT;
+#else
+ ifp->if_capenable = ifp->if_capabilities = IFCAP_HWSTATS;
#endif
- ifp->if_capenable = ifp->if_capabilities = IFCAP_HWSTATS;
-
/*
* Attach as an ordinary ethernet device, children will be attached
* as special device IFT_IEEE8023ADLAG.
@@ -1568,6 +1571,13 @@
/* forward allocation request */
return (ifp->if_snd_tag_alloc(ifp, params, ppmt));
}
+
+static void
+lagg_snd_tag_free(struct m_snd_tag *tag)
+{
+ tag->ifp->if_snd_tag_free(tag);
+}
+
#endif
static int
Index: if_vlan.c
===================================================================
--- if_vlan.c
+++ if_vlan.c
@@ -267,6 +267,7 @@
#ifdef RATELIMIT
static int vlan_snd_tag_alloc(struct ifnet *,
union if_snd_tag_alloc_params *, struct m_snd_tag **);
+static void vlan_snd_tag_free(struct m_snd_tag *);
#endif
static void vlan_qflush(struct ifnet *ifp);
static int vlan_setflag(struct ifnet *ifp, int flag, int status,
@@ -1047,6 +1048,7 @@
ifp->if_ioctl = vlan_ioctl;
#ifdef RATELIMIT
ifp->if_snd_tag_alloc = vlan_snd_tag_alloc;
+ ifp->if_snd_tag_free = vlan_snd_tag_free;
#endif
ifp->if_flags = VLAN_IFFLAGS;
ether_ifattach(ifp, eaddr);
@@ -1934,4 +1936,10 @@
/* forward allocation request */
return (ifp->if_snd_tag_alloc(ifp, params, ppmt));
}
+
+static void
+vlan_snd_tag_free(struct m_snd_tag *tag)
+{
+ tag->ifp->if_snd_tag_free(tag);
+}
#endif

File Metadata

Mime Type
text/plain
Expires
Wed, Feb 11, 2:22 AM (5 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28636104
Default Alt Text
D19032.id53514.diff (1 KB)

Event Timeline