The switch(4) device has a function called switch_forward_flooder()
which doesn't seem to be used anywhere.

In switchofp.c we have the swofp_action_output() which would be the place
where it would be likely called, however it already has the code that
does it.

Since it doesn't seem to fit anywhere I think we should just removed it,
and that's what this diff does.

ok?

Index: net/if_switch.c
===================================================================
RCS file: /home/obsdcvs/src/sys/net/if_switch.c,v
retrieving revision 1.9
diff -u -p -r1.9 if_switch.c
--- net/if_switch.c     8 Oct 2016 23:36:10 -0000       1.9
+++ net/if_switch.c     14 Oct 2016 13:28:18 -0000
@@ -85,8 +85,6 @@ int    switch_stop(struct ifnet *, int);
 struct mbuf
        *switch_port_ingress(struct switch_softc *, struct ifnet *,
            struct mbuf *);
-void    switch_forward_flooder(struct switch_softc *,
-           struct switch_flow_classify *, struct mbuf *);
 void    switch_port_egress(struct switch_softc *, struct switch_fwdp_queue *,
            struct mbuf *);
 int     switch_ifenqueue(struct switch_softc *, struct ifnet *,
@@ -725,25 +720,6 @@ switch_port_ingress(struct switch_softc 
 #endif /* NPF */
 
        return (m);
-}
-
-void
-switch_forward_flooder(struct switch_softc *sc,
-    struct switch_flow_classify *swfcl, struct mbuf *m)
-{
-       struct switch_port               *swpo;
-       struct switch_fwdp_queue         fwdp_q;
-       uint32_t                         src_port_no;
-
-       src_port_no = swfcl->swfcl_in_port;
-       TAILQ_INIT(&fwdp_q);
-       TAILQ_FOREACH(swpo, &sc->sc_swpo_list, swpo_list_next) {
-               if (swpo->swpo_port_no == src_port_no)
-                       continue;
-               TAILQ_INSERT_HEAD(&fwdp_q, swpo, swpo_fwdp_next);
-       }
-
-       switch_port_egress(sc, &fwdp_q, m);
 }
 
 void

Reply via email to