<div dir="ltr">Hi Roi,<div>Thank you for  your reply. </div><div>Sorry for not getting back on this before. Was held up in some other stuff.</div><div>Please find my answers below.<br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 12, 2017 at 5:33 AM, Roi Dayan <span dir="ltr">&lt;<a href="mailto:roid@mellanox.com" target="_blank">roid@mellanox.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span><br>
<br>
On 11/07/2017 14:28, Sugu Deepthy wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>
Hi Roi<br>
<br>
On Tue, Jul 11, 2017 at 12:20 AM, Sugu Deepthy &lt;<a href="mailto:deepthysugesh@gmail.com" target="_blank">deepthysugesh@gmail.com</a><br></span><span>
&lt;mailto:<a href="mailto:deepthysugesh@gmail.com" target="_blank">deepthysugesh@gmail.co<wbr>m</a>&gt;&gt; wrote:<br>
<br>
    Thank you Roi for your help!<br>
<br>
    On Mon, Jul 10, 2017 at 4:57 AM, Roi Dayan &lt;<a href="mailto:roid@mellanox.com" target="_blank">roid@mellanox.com</a><br></span><div><div class="m_-2508616154131316367gmail-m_-4107143943903740953h5">
    &lt;mailto:<a href="mailto:roid@mellanox.com" target="_blank">roid@mellanox.com</a>&gt;&gt; wrote:<br>
<br>
<br>
<br>
        On 07/07/2017 17:36, Sugu Chandran wrote:<br>
<br>
            Hi,<br>
<br>
            I am trying to test hardware offloading feature in OVS using<br>
            a 2*25G<br>
            mellanox NIC.   My test setup has static OVS L2 rules to<br>
            forward packets<br>
            between these two ports. The traffic generators are<br>
            connected to these<br>
            ports to pump in traffic.<br>
            The hardware offloading is enabled in the system by using,<br>
                ovs-vsctl --no-wait set Open_vSwitch .<br>
            other_config:hw-offload=true<br>
            I didnt set any hw-policy explicit,  as I kept it default as<br>
            &#39;None&#39;<br>
<br>
            I noticed that when I am sending traffic to these ports,<br>
            there are no<br>
            rules that are getting programmed into the hardware. Also<br>
            there are no<br>
            error reported in ovs-vswitchd.log as such.<br>
            Of Course the packets are getting forwarded in software.  Is<br>
            there<br>
            anything else needs to be done to make the TC for<br>
            programming the<br>
            mellanox NICs?<br>
<br>
            Regards<br>
            _Sugu<br>
<br>
<br>
<br>
        Hi Sugo,<br>
<br>
        Since you do not have errors in the log did you check if the rules<br>
        were added to tc software?<br>
        you can dump like this:<br>
        # tc -s filter show dev ens5f0 ingress<br>
<br>
    I dont see any rules that are configured with above tc dump.<br>
<br>
</div></div></blockquote>
<br>
then nothing went to the HCA because even if the HW doesn&#39;t<br>
support it the rule should be in tc software.</blockquote><div>[Sugesh] Yes thats right. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
        You need to enable the offload feature on the HCA with ethtool.<br>
        example:<br>
        # ethtool -K ens5f0 hw-tc-offload on<br>
<br>
    This is enabled .<br>
<br>
    I am trying to forward traffic between two PFs on the same NIC?<br>
    Does it supported in the offload implementation?<br>
</blockquote>
<br></span>
offload between PF ports is currently not supported.<br>
only PF and its VFs.</blockquote><div>[Sugu]</div><div>Ok. I am trying to do the traffic forwarding between PF and VFs . But no luck so far. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
    When creating the switchdev on PFs with 2 VFs, there is no VF<br>
    netdevs are populated in my system. They are still showing as the<br>
    vfs under the PF.<br>
    Ofcourse there are no errors too.<br>
<br>
    Also the system reports the mode &#39;inline-mode transport&#39;is unsupported.<br>
    I am using ubunutu 17.04 with 4.10 kernel.<br>
    Is there anything I am missing here?<br>
    Any help is really appreciated!.<br>
<br>
[Sugu] Some more details on this. I was really getting error when trying<br>
to enable hw-offload on mlnx-4 NICs.<br>
Didnt notice in the logs before.<br>
<br>
This the error info that I got from mellanox git.<br>
<br>
BAD_SYS_STATE | 0x368B01 | query_vport_counter: vport is not enabled<br>
(INIT_HCA is required)<br>
</blockquote>
<br></span>
executing which command raised this error?</blockquote><div>[Sugu] I upgraded the system and now I dont see this error anymore. Instead I see this</div><div><br></div><div>[ 1103.216355] mlx5_3:wait_for_async_<wbr>commands:722:(pid 3097): done with all pending requests</div><div>[ 1115.954770] mlx5_core 0000:07:00.0: mlx5_cmd_check:697:(pid 3477): QUERY_VPORT_COUNTER(0x770) op_mod(0x0) failed, status bad system state(0x4), syndrome (0x368b01)</div><div>[ 1115.954902] mlx5_core 0000:07:00.0: mlx5_cmd_check:697:(pid 3477): QUERY_VPORT_COUNTER(0x770) op_mod(0x0) failed, status bad system state(0x4), syndrome (0x368b01)</div><div><br></div><div>I am getting this error back to back for every command(2 entry for each command as I have 2 VFs, may be?)</div><div>starting from unbind, devlink, ethtool and starting the VM.</div><div>And inside the VM the VFs are not bound to any driver either. Is there any wrong with the NIC?</div><div> </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
I verfied that the ports named eth1, eth2, eth3 and et4 are created for<br>
my vfs, when<br>
I ran the commands &#39;devlink dev eswitch set pci/0000:07:00.0 mode<br>
switchdev&#39; and<br>
&#39;devlink dev eswitch set pci/0000:07:00.1 mode switchdev&#39;<br>
<br>
The detailed error in dmesg are given below,<br>
[ 1245.941287] mlx5_core 0000:07:00.0: mlx5_cmd_check:697:(pid 3107):<br>
QUERY_VPORT_COUNTER(0x770) op_mod(0x0) failed, status bad system<br>
state(0x4), syndrome (0x368b01)<br>
[ 1245.941478] mlx5_core 0000:07:00.1: mlx5_cmd_check:697:(pid 3107):<br>
QUERY_VPORT_COUNTER(0x770) op_mod(0x0) failed, status bad system<br>
state(0x4), syndrome (0x368b01)<br>
<br>
Please note I couldn&#39;t run the &quot;inline-mode transport&quot; command as its<br>
not supported.<br>
<br>
</blockquote>
<br></span>
maybe you need newer iproute package. try to install latest upstream.<br></blockquote><div>[Sugu] </div><div>I am using latest Ubuntu release </div><div>&gt;&gt;&gt;</div><div><br></div><div>No LSB modules are available.</div><div>Distributor ID: Ubuntu</div><div>Description:    Ubuntu Artful Aardvark (development branch)</div><div>Release:        17.10</div><div>Codename:       artful </div><div>&gt;&gt;&gt;&gt;&gt;</div><div>and my kernel is</div><div><div>4.11.0-10-generic #15-Ubuntu SMP Thu Jun 29 15:03:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux</div></div><div><br></div><div>And still it need to install the newer iproute package additonally? Is that the requirement to use the hardware offload in OVS?</div><div>And my iproute version is </div><div><div>ip -V</div><div>ip utility, iproute2-ss161212</div></div><div>Can you share which version of iproute you use for the testing?</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>
<br>
<br>
        We still need to work on docs for this feature but for now I<br>
        documented it a little here:<br>
        <a href="https://github.com/roidayan/ovs/wiki" rel="noreferrer" target="_blank">https://github.com/roidayan/ov<wbr>s/wiki</a><br></span>
        &lt;<a href="https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Froidayan%2Fovs%2Fwiki&amp;data=02%7C01%7Croid%40mellanox.com%7C56f73b8b334b4413dd3608d4c84feee7%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636353693008610668&amp;sdata=3orv%2FK9Diwoj5pMQAuBmRHF5QRuxNlwmZgOa3f1AaTE%3D&amp;reserved=0" rel="noreferrer" target="_blank">https://emea01.safelinks.prot<wbr>ection.outlook.com/?url=https%<wbr>3A%2F%2Fgithub.com%2Froidayan%<wbr>2Fovs%2Fwiki&amp;data=02%7C01%7Cro<wbr>id%40mellanox.com%7C56f73b8b33<wbr>4b4413dd3608d4c84feee7%7Ca6529<wbr>71c7d2e4d9ba6a4d149256f461b%7C<wbr>0%7C0%7C636353693008610668&amp;sda<wbr>ta=3orv%2FK9Diwoj5pMQAuBmRHF5Q<wbr>RuxNlwmZgOa3f1AaTE%3D&amp;reserved<wbr>=0</a>&gt;<span><br>
<br>
    As suggested in the wiki,<br>
<br>
<br>
<br>
        Thanks,<br>
        Roi<br>
<br>
<br>
<br>
<br>
            ______________________________<wbr>_________________<br>
            discuss mailing list<br></span>
            <a href="mailto:discuss@openvswitch.org" target="_blank">discuss@openvswitch.org</a> &lt;mailto:<a href="mailto:discuss@openvswitch.org" target="_blank">discuss@openvswitch.or<wbr>g</a>&gt;<br>
            <a href="https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.openvswitch.org%2Fmailman%2Flistinfo%2Fovs-discuss&amp;data=02%7C01%7Croid%40mellanox.com%7Cb226a368b9814cdc87ce08d4c5530730%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636350407766292115&amp;sdata=9mMWoehygP7%2BmftGsOuyynyaHnYx%2FKQzka7gedr1%2FUE%3D&amp;reserved=0" rel="noreferrer" target="_blank">https://emea01.safelinks.prote<wbr>ction.outlook.com/?url=https%3<wbr>A%2F%2Fmail.openvswitch.org%2F<wbr>mailman%2Flistinfo%2Fovs-discu<wbr>ss&amp;data=02%7C01%7Croid%40mella<wbr>nox.com%7Cb226a368b9814cdc87ce<wbr>08d4c5530730%7Ca652971c7d2e4d9<wbr>ba6a4d149256f461b%7C0%7C0%7C63<wbr>6350407766292115&amp;sdata=9mMWoeh<wbr>ygP7%2BmftGsOuyynyaHnYx%<wbr>2FKQzka7gedr1%2FUE%3D&amp;reserved<wbr>=0</a><br>
            &lt;<a href="https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.openvswitch.org%2Fmailman%2Flistinfo%2Fovs-discuss&amp;data=02%7C01%7Croid%40mellanox.com%7Cb226a368b9814cdc87ce08d4c5530730%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636350407766292115&amp;sdata=9mMWoehygP7%2BmftGsOuyynyaHnYx%2FKQzka7gedr1%2FUE%3D&amp;reserved=0" rel="noreferrer" target="_blank">https://emea01.safelinks.prot<wbr>ection.outlook.com/?url=https%<wbr>3A%2F%2Fmail.openvswitch.org%2<wbr>Fmailman%2Flistinfo%2Fovs-disc<wbr>uss&amp;data=02%7C01%7Croid%40mell<wbr>anox.com%7Cb226a368b9814cdc87c<wbr>e08d4c5530730%7Ca652971c7d2e4d<wbr>9ba6a4d149256f461b%7C0%7C0%7C6<wbr>36350407766292115&amp;sdata=9mMWoe<wbr>hygP7%2BmftGsOuyynyaHnYx%<wbr>2FKQzka7gedr1%2FUE%3D&amp;reserved<wbr>=0</a>&gt;<br>
<br>
<br>
<br>
</blockquote>
</blockquote></div><br></div></div></div>