[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ebb004ea-bd9e-aa42-530e-ccfdb086ec9f@linux.intel.com>
Date: Tue, 29 Aug 2023 12:42:56 +0200
From: Marcin Szycik <marcin.szycik@...ux.intel.com>
To: Subbaraya Sundeep Bhatta <sbhatta@...vell.com>,
"jesse.brandeburg@...el.com" <jesse.brandeburg@...el.com>,
"anthony.l.nguyen@...el.com" <anthony.l.nguyen@...el.com>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
Cc: Jakub Kicinski <kuba@...nel.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"pabeni@...hat.com" <pabeni@...hat.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Sunil Kovvuri Goutham <sgoutham@...vell.com>,
Naveen Mamindlapalli <naveenm@...vell.com>, Suman Ghosh
<sumang@...vell.com>, Ratheesh Kannoth <rkannoth@...vell.com>,
Hariprasad Kelam <hkelam@...vell.com>,
Geethasowjanya Akula <gakula@...vell.com>,
Wojciech Drewek <wojciech.drewek@...el.com>
Subject: Re: hardware filter for matching GTP-U TEID
On 29.08.2023 08:18, Subbaraya Sundeep Bhatta wrote:
> Hi Marcin Szycik,
>
> Below commit demonstrates that we need to create a GTP tunnel netdev and
> create a tc filter on top of it. I am unable to understand how the tc filter on top of
> tunnel netdev $GTP0 propagates to the interface $PF0 for hardware offload?
It propagates via a notification from tunnel netdev to PF, and then to driver.
> commit 97aeb877de7f14f819fc2cf8388d7a2d8090489d
> Merge: 4d17d43 9a225f8
> Author: David S. Miller <davem@...emloft.net>
> Date: Sat Mar 12 11:54:29 2022 +0000
>
> Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue
>
> Tony Nguyen says:
>
> ====================
> ice: GTP support in switchdev
>
> Marcin Szycik says:
>
> Add support for adding GTP-C and GTP-U filters in switchdev mode.
>
> To create a filter for GTP, create a GTP-type netdev with ip tool, enable
> hardware offload, add qdisc and add a filter in tc:
>
> ip link add $GTP0 type gtp role <sgsn/ggsn> hsize <hsize>
> ethtool -K $PF0 hw-tc-offload on
> tc qdisc add dev $GTP0 ingress
> tc filter add dev $GTP0 ingress prio 1 flower enc_key_id 1337 \
> action mirred egress redirect dev $VF1_PR
>
>
> I have to redirect GTP-U packets with a TEID to a VF which may be in guest using hardware tc filter on PF.
>>>From my understanding current TC and ethtool cannot specify match filters beyond L4 header fields.
> Can I add new command something like gtp-teid to tc filter?
> Please help me understand this.
You can specify TEID field with the enc_key_id option in tc (like in above
example). Meaning of that option changes depending on tunnel used, in case of
GTP it's TEID.
>
> Thanks,
> Sundeep
>
>
I hope that answers your questions,
Marcin
Powered by blists - more mailing lists