[P4-dev] Bmv2 with physical interfaces
vladimir.gurevich at barefootnetworks.com
Mon Jul 3 07:22:00 EDT 2017
Regardless of the interface type that you use with BMv2 (be it veth or
physical), it is very important to disable all kinds of offload on those
interfaces, because they modify packets in some way (or, in the case of TCP
offload, it can take several packets and convert them into one, often much
bigger than an MTU).
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 &>
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 18.104.22.168" to /etc/resolv.conf on h1.
> 3. open web browser on h1
> (I have check that "ping 22.214.171.124" 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,
> On Fri, Jun 30, 2017 at 1:07 AM, Antonin Bas <antonin at barefootnetworks.com
> > wrote:
>> 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.
>> On Thu, Jun 29, 2017 at 12:21 AM, yunchen chang <y2924uki at gmail.com>
>>> 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,
>>> P4-dev mailing list
>>> P4-dev at lists.p4.org
> P4-dev mailing list
> P4-dev at lists.p4.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the P4-dev