tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Bridge forwarding employing pktqueue



Hi rmind,

On Fri, Jun 13, 2014 at 2:58 AM, Mindaugas Rasiukevicius
<rmind%netbsd.org@localhost> wrote:
> Ryota Ozaki <ozaki-r%iij.ad.jp@localhost> wrote:
>> The summary of the changes:
>> - Add pktqueue_t *sc_fwd_pktq to bridge_softc
>> - Add net.interfaces.bridgeN.fwdq.{maxlen,len,drops}
>>   sysctl
>> - Add 3rd argument to pktq_create to pass sc
>>   to softint_establish
>> - Export sysctl_pktq_maxlen and sysctl_pktq_count
>>   to use them in if_bridge.c
>>
>> <...>
>>
>> An integrated patch is attached and available here:
>> http://www.netbsd.org/~ozaki-r/bridge-pktq.diff
>
> Why xc_broadcast()?

I just followed the code of if_detach though, we need to
wait for pktq_barrier (packet draining) completion here.
Otherwise, the packet draining (xmit) conflicts with
following bridge_stop that may also xmit.

> If you want to reuse sysctl_pktq_maxlen and
> sysctl_pktq_count helpers, then perhaps it is worth to move them to
> pktqueue.c file.  If we would have a better designed sysctl(9) API,
> such helpers and ugly macros would not exist, but.. let's at least
> keep them where they belong.

Sure. I'll do so.

>
> Otherwise, the the patch seems fine to me.

Thanks!

  ozaki-r

>
> --
> Mindaugas


Home | Main Index | Thread Index | Old Index