On Wed, Feb 13, 2019 at 12:02:50PM -0200, Martin Pieuchot wrote:
> Now that mpw(4) is an Ethernet interface, can I get rid of the following
> hacks?

Yes, this was the goal of dlg@'s mpw change. OK claudio but lets see what
dlg@ thinks.
 
> Index: net/if_bridge.c
> ===================================================================
> RCS file: /cvs/src/sys/net/if_bridge.c,v
> retrieving revision 1.319
> diff -u -p -r1.319 if_bridge.c
> --- net/if_bridge.c   29 Jan 2019 17:47:35 -0000      1.319
> +++ net/if_bridge.c   13 Feb 2019 14:01:11 -0000
> @@ -36,7 +36,6 @@
>  #include "pf.h"
>  #include "carp.h"
>  #include "vlan.h"
> -#include "mpw.h"
>  
>  #include <sys/param.h>
>  #include <sys/systm.h>
> @@ -311,13 +310,7 @@ bridge_ioctl(struct ifnet *ifp, u_long c
>                       error = ifpromisc(ifs, 1);
>                       if (error != 0)
>                               break;
> -             }
> -#if NMPW > 0
> -             else if (ifs->if_type == IFT_MPLSTUNNEL) {
> -                     /* Nothing needed */
> -             }
> -#endif /* NMPW */
> -             else {
> +             } else {
>                       error = EINVAL;
>                       break;
>               }
> @@ -367,8 +360,7 @@ bridge_ioctl(struct ifnet *ifp, u_long c
>                       error = ENOENT;
>                       break;
>               }
> -             if (ifs->if_type != IFT_ETHER &&
> -                 ifs->if_type != IFT_MPLSTUNNEL) {
> +             if (ifs->if_type != IFT_ETHER) {
>                       error = EINVAL;
>                       break;
>               }
> @@ -813,15 +805,6 @@ bridge_output(struct ifnet *ifp, struct 
>                           (bif->bif_flags & IFBIF_STP) &&
>                           (bif->bif_state == BSTP_IFSTATE_DISCARDING))
>                               continue;
> -#if NMPW > 0
> -                     /*
> -                      * Split horizon: avoid broadcasting messages from
> -                      * wire to another wire.
> -                      */
> -                     if (ifp->if_type == IFT_MPLSTUNNEL &&
> -                         dst_if->if_type == IFT_MPLSTUNNEL)
> -                             continue;
> -#endif /* NMPW */
>                       if ((bif->bif_flags & IFBIF_DISCOVER) == 0 &&
>                           (m->m_flags & (M_BCAST | M_MCAST)) == 0)
>                               continue;
> @@ -1276,16 +1259,6 @@ bridge_broadcast(struct bridge_softc *sc
>  
>               if (bridge_localbroadcast(dst_if, eh, m))
>                       sc->sc_if.if_oerrors++;
> -
> -#if NMPW > 0
> -             /*
> -              * Split horizon: avoid broadcasting messages from wire to
> -              * another wire.
> -              */
> -             if (ifp->if_type == IFT_MPLSTUNNEL &&
> -                 dst_if->if_type == IFT_MPLSTUNNEL)
> -                     continue;
> -#endif /* NMPW */
>  
>               /* If last one, reuse the passed-in mbuf */
>               if (SLIST_NEXT(bif, bif_next) == NULL) {

-- 
:wq Claudio

Reply via email to