enc(4) does not use the ifqueue API at all; IPsec packets are directly
transformed in the IP input/output routines.
enc_start() is never called (by design) so I'd like to remove it for
clarity - similar to lo(4) does not have a start routine defined either.
Tested with various iked(8) tunnels on sparc64 and amd64.
Feedback? OK?
Index: if_enc.c
===================================================================
RCS file: /cvs/src/sys/net/if_enc.c,v
retrieving revision 1.77
diff -u -p -r1.77 if_enc.c
--- if_enc.c 10 Jul 2020 13:22:22 -0000 1.77
+++ if_enc.c 23 Dec 2020 01:37:31 -0000
@@ -44,7 +44,6 @@ void encattach(int);
int enc_clone_create(struct if_clone *, int);
int enc_clone_destroy(struct ifnet *);
-void enc_start(struct ifnet *);
int enc_output(struct ifnet *, struct mbuf *, struct sockaddr *,
struct rtentry *);
int enc_ioctl(struct ifnet *, u_long, caddr_t);
@@ -85,7 +84,6 @@ enc_clone_create(struct if_clone *ifc, i
ifp->if_softc = sc;
ifp->if_type = IFT_ENC;
ifp->if_xflags = IFXF_CLONED;
- ifp->if_start = enc_start;
ifp->if_output = enc_output;
ifp->if_ioctl = enc_ioctl;
ifp->if_hdrlen = ENC_HDRLEN;
@@ -157,19 +155,6 @@ enc_clone_destroy(struct ifnet *ifp)
free(sc, M_DEVBUF, sizeof(*sc));
return (0);
-}
-
-void
-enc_start(struct ifnet *ifp)
-{
- struct mbuf *m;
-
- for (;;) {
- m = ifq_dequeue(&ifp->if_snd);
- if (m == NULL)
- break;
- m_freem(m);
- }
}
int