Date: Fri, 29 Jan 2016 14:27:02 -0800 From: Luigi Rizzo <rizzo@iet.unipi.it> To: Xiaoye Sun <Xiaoye.Sun@rice.edu> Cc: Pavel Odintsov <pavel.odintsov@gmail.com>, "freebsd-net@freebsd.org" <freebsd-net@freebsd.org> Subject: Re: swaping ring slots between NIC ring and Host ring does not always success Message-ID: <CA%2BhQ2%2Bim9nFfYnqDS2HgRbAzdf5D0iaLCmCYhfXQVVRMouUFuw@mail.gmail.com> In-Reply-To: <CAJnByziBS8o6LtmpUrUu5xtRUd008Z2hnCsp=WVFv35r2J0rHw@mail.gmail.com> References: <CAJnByzj6Dj3vouZ2NbxqvCV-2-7TVtTR4FaWKuCFaaRN2X%2ByAA@mail.gmail.com> <CALgsdbd3XuE3wMYp4ey%2B1aer%2BHSVNojLYoVqwqTBPAXXdf9i%2BQ@mail.gmail.com> <CAJnByzirLXdCe-kwHV2s_E6ytGJG0Dth=0Ms12RrEk7FK_%2B8Og@mail.gmail.com> <CA%2BhQ2%2BgMWY0eabjHGw0=PJCAkS-wO=RBrN5brSbaqWc3_AOYoQ@mail.gmail.com> <CAJnByziBS8o6LtmpUrUu5xtRUd008Z2hnCsp=WVFv35r2J0rHw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jan 29, 2016 at 2:12 PM, Xiaoye Sun <Xiaoye.Sun@rice.edu> wrote: > Hi Luigi, > > Thanks for your advice. > I forgot to mention that I use the command "ethtool -L eth1 combined 1" to > set the number of rings of the nic to 1. The host also only has one ring. > I understand the situation where the first tx ring is full so the bridge > will swap the packets to the second tx ring and then the host/nic might > drain either rings. But this is not the case in the experiment. ok good to know that. So if we have ruled out multiqueue and iommu, let's look at the internal allocator and at bridge.c 1. are you running the most recent version of netmap ? Some older version (probably 1-2 years ago) had a bug in the buffer allocator and some buffers were allocated twice. 2. can you tweak your receiver.c to report some more info on how often you get out of sequence packets, how much out of sequence they are ? Also it would be useful to report gaps on the increasing side (i.e. new_seq != old_seq +1 ) 3. can you tweak bridge.c so that it writes into the packet the netmap buffer indexes and slots on the rx and tx side, so when you detect a sequence error we can figure out where it is happening. Ideally you could also add the sequence number detection code in bridge.c so we can check whether the errors appear on the input or output sides. cheers luigi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BhQ2%2Bim9nFfYnqDS2HgRbAzdf5D0iaLCmCYhfXQVVRMouUFuw>