Re: [PATCH net-next 0/3] cxgb4: add mirror action support for TC-MATCHALL
From: Jakub Kicinski <kuba@kernel.org>
Date: 2020-06-29 22:53:23
From: Jakub Kicinski <kuba@kernel.org>
Date: 2020-06-29 22:53:23
On Sat, 27 Jun 2020 12:14:07 +0530 Rahul Lakkireddy wrote:
quoted
What's the main use case for this feature? It appears that you're allocating queues in patch 2. At the same time I don't see SWITCHDEV mode / representors in this driver. So the use case is to redirect a packet out to another port while still receiving a copy?The main use case is to sniff packets that are being switched out by hardware. The requirement is that there would be higher priority flower rules that will accept specific traffic and all the other traffic will be switched out on one of the underlying ports. Occasionally, we want to sniff the packets that are being switched out by replacing the redirect action with mirror action. The reason for allocating queues is that the VIs are isolated from each other and can't access each other's queues. So, separate queues must be allocated for mirror VI.
Sounds reasonable, please fix the use of refcount_t (perhaps just use a normal integer since structures are protected), and repost.