[P4-dev] Bmv2 with physical interfaces

yunchen chang y2924uki at gmail.com
Tue Jul 4 03:30:33 EDT 2017


Hello Vladimir:

Thanks for reply.

I will try it. Thank you!!!

Best regards,
Abbie

On Mon, Jul 3, 2017 at 1:08 PM, Vladimir Gurevich <
vgurevich at barefootnetworks.com> wrote:

> Hello Yunchen,
>
> Please, make sure all acceleration/offload is disabled on the physical
> interfaces that you want to connect to BMv2.
>
> You can find an example how to do that if you look at veth_setup.sh
> script. It should go something like this:
>
>    TOE_OPTIONS="rx tx sg tso ufo gso gro lro rxvlan txvlan rxhash"
>    for TOE_OPTION in $TOE_OPTIONS; do
>       /sbin/ethtool --offload <your_interface> "$TOE_OPTION" off &>
> /dev/null
>    done
>
> The reason for that is that your browser uses TCP packets that the offload
> engine tends to mangle them quite a bit.
>
> Happy Hacking,
> Vladimir
>
> On Sun, Jul 2, 2017 at 9:49 PM, yunchen chang <y2924uki at gmail.com> wrote:
>
>> Hello Antonin:
>>
>> Thanks for the reply.
>>
>> After I do "make clean", the log will not work.
>> But the web browser still failed after a while.
>>
>> My topology is :
>>
>> mininet> ports
>> s11  lo:0   s11-eth1:1  eth0:2
>> (s11-eth1 is virtual interface on h1)
>> (eth0 is physical interface)
>>
>> Forwarding rules :  forward the packet "destination MAC address: 1" to
>> port 1, others to port 2.
>>
>> The steps trigger it is :
>> 1. dhclient the virtual interface on h1.
>> 2. add "nameserver 8.8.8.8" to /etc/resolv.conf on h1.
>> 3. open web browser on h1
>>
>> (I have check that "ping 8.8.8.8" is work on h1.)
>>
>> I want to know:
>>
>> In addition to transmit the packet between physical interface and virtual
>> interface, are there something else should I do?
>> (ex: change some fields on the packet?)
>>
>> Thank you.
>>
>> Best regards,
>> Abbie
>>
>> On Fri, Jun 30, 2017 at 1:07 AM, Antonin Bas <
>> antonin at barefootnetworks.com> wrote:
>>
>>> Hi,
>>>
>>> Can you confirm that you re-build all the bmv2 code after running
>>> configure again? You need to do "make clean" and then "make" again,
>>> otherwise the new pre-processor flags won't be taken into account.
>>>
>>> Thanks,
>>>
>>> Antonin
>>>
>>> On Thu, Jun 29, 2017 at 12:21 AM, yunchen chang <y2924uki at gmail.com>
>>> wrote:
>>>
>>>> Hello everyone,
>>>>
>>>> I know BMv2 support any interface.
>>>> I have connected to the physical interface.
>>>> But when I use the firefox browser, it really slow to transmit the
>>>> request and response, almost failed after a while.
>>>>
>>>> I know that disable logging can improve performance by "./configure
>>>> 'CXXFLAGS=-O2' --disable-logging-macros --disable-elogger" to BMv2.
>>>> After it, I find the log still work.
>>>> What's the possible mistake I made?
>>>>
>>>> Thank you.
>>>>
>>>> Best regards,
>>>> Abbie
>>>>
>>>>
>>>> _______________________________________________
>>>> P4-dev mailing list
>>>> P4-dev at lists.p4.org
>>>> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
>>>>
>>>
>>>
>>>
>>> --
>>> Antonin
>>>
>>
>>
>> _______________________________________________
>> P4-dev mailing list
>> P4-dev at lists.p4.org
>> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20170704/517329cc/attachment-0002.html>


More information about the P4-dev mailing list