Re: [PATCH net-next 1/3] cxgb4: add mirror action to TC-MATCHALL offload

2020-06-27 Thread Rahul Lakkireddy
On Friday, June 06/26/20, 2020 at 21:18:44 -0700, Jakub Kicinski wrote: > On Thu, 25 Jun 2020 17:28:41 +0530 Rahul Lakkireddy wrote: > > + if (refcount_read(&pi->vi_mirror_refcnt) > 1) { > > + refcount_dec(&pi->vi_mirror_refcnt); > > + return; > > + } > > FWIW this looks ve

Re: [PATCH net-next 1/3] cxgb4: add mirror action to TC-MATCHALL offload

2020-06-26 Thread Jakub Kicinski
On Thu, 25 Jun 2020 17:28:41 +0530 Rahul Lakkireddy wrote: > + if (refcount_read(&pi->vi_mirror_refcnt) > 1) { > + refcount_dec(&pi->vi_mirror_refcnt); > + return; > + } FWIW this looks very dodgy. If you know nothing changes the count between the read and the dec h

[PATCH net-next 1/3] cxgb4: add mirror action to TC-MATCHALL offload

2020-06-25 Thread Rahul Lakkireddy
Add mirror Virtual Interface (VI) support to receive all ingress mirror traffic from the underlying device. The mirror VI is created dynamically, if the TC-MATCHALL rule has a corresponding mirror action. Also request MSI-X vectors needed for the mirror VI Rxqs. If no vectors are available, then di