Re: [net-next PATCH v2 5/9] octeontx2-af: Add packet path between representor and VF

From: Jiri Pirko
Date: Thu Apr 25 2024 - 02:59:49 EST


Thu, Apr 25, 2024 at 08:01:47AM CEST, sgoutham@xxxxxxxxxxx wrote:
>
>
>> -----Original Message-----
>> From: Jiri Pirko <jiri@xxxxxxxxxxx>
>> Sent: Tuesday, April 23, 2024 6:39 PM
>> To: Geethasowjanya Akula <gakula@xxxxxxxxxxx>
>> Cc: netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; kuba@xxxxxxxxxx;
>> davem@xxxxxxxxxxxxx; pabeni@xxxxxxxxxx; edumazet@xxxxxxxxxx; Sunil
>> Kovvuri Goutham <sgoutham@xxxxxxxxxxx>; Subbaraya Sundeep Bhatta
>> <sbhatta@xxxxxxxxxxx>; Hariprasad Kelam <hkelam@xxxxxxxxxxx>
>> Subject: [EXTERNAL] Re: [net-next PATCH v2 5/9] octeontx2-af: Add packet
>> path between representor and VF
>>
>> Mon, Apr 22, 2024 at 11:53:57AM CEST, gakula@xxxxxxxxxxx wrote:
>> >This patch installs tcam rules to stree traffic representors and VF
>> >when swicthdev mode is set. To support this a HW loopback channel is
>> >reserved. Through this channel packet are routed between representor
>> >and VFs. "ESW_CFG" mbox is defined to notify AF for installing rules.
>>
>> This sounds very wrong. In switchdev mode, there is no implicit packet
>> forwarding. User configures that, either by setting up TC filters to
>> match/forward packets, putting representors in a bridge, etc.
>> Basically the driver offloads whatever configuration on representors the user
>> does, in case it supports it.
>>
>> Please make sure you follow that.
>
>In our HW, there is no in-built switch which will forward pkts between representee and representor.
>When representor is put under a bridge and pkts needs to be sent to representee, then pkts from
>representor are sent on a HW internal loopback channel, which again will be punted to ingress
>pkt parser. Now the rules that this patch installs are the MCAM filters/rules which will match against
>these pkts and forward them to representee.
>
>To be more clear the rules that this patch installs are for basic representor <-=> representee path
>similar to Tun/TAP between VM and Host. Now for any further offloads (eg: L2 or ConnTrk)
>user will have to install explicit rules via TC filters.

Okay, makes sense.


>
>Thanks,
>Sunil.
>
>
>