On Wed, Dec 02, 2015 at 09:57:59AM +0100, Martin Pieuchot wrote:
> Make sure if_output() and if_start() will never be called for the
> bridge(4).
> 
> Concerns?
> 

You should clarify in the comment above the actual bridge_output()
function that this function is intended to be used by bridgeport /
member interfaces only and not the bridge itself.  "Send output from
the bridge." is a bit misleading.

Otherwise OK

Reyk

> Index: net/if_bridge.c
> ===================================================================
> RCS file: /cvs/src/sys/net/if_bridge.c,v
> retrieving revision 1.273
> diff -u -p -r1.273 if_bridge.c
> --- net/if_bridge.c   2 Dec 2015 08:04:12 -0000       1.273
> +++ net/if_bridge.c   2 Dec 2015 08:07:38 -0000
> @@ -111,7 +111,6 @@
>  void bridgeattach(int);
>  int  bridge_ioctl(struct ifnet *, u_long, caddr_t);
>  int  bridge_input(struct ifnet *, struct mbuf *, void *);
> -void bridge_start(struct ifnet *);
>  void bridge_process(struct ifnet *, struct mbuf *);
>  void bridgeintr_frame(struct bridge_softc *, struct ifnet *, struct mbuf *);
>  void bridge_broadcast(struct bridge_softc *, struct ifnet *,
> @@ -189,8 +188,8 @@ bridge_clone_create(struct if_clone *ifc
>       ifp->if_softc = sc;
>       ifp->if_mtu = ETHERMTU;
>       ifp->if_ioctl = bridge_ioctl;
> -     ifp->if_output = bridge_output;
> -     ifp->if_start = bridge_start;
> +     ifp->if_output = NULL;
> +     ifp->if_start = NULL;
>       ifp->if_type = IFT_BRIDGE;
>       ifp->if_hdrlen = ETHER_HDR_LEN;
>  
> @@ -830,14 +829,6 @@ sendunicast:
>       }
>       bridge_ifenqueue(sc, dst_if, m);
>       return (0);
> -}
> -
> -/*
> - * Start output on the bridge.  This function should never be called.
> - */
> -void
> -bridge_start(struct ifnet *ifp)
> -{
>  }
>  
>  /*
> 

-- 

Reply via email to