[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH-L+nOCURGD3d_V9FZBJcxCEGG3md7urURmm8Xjm5AAfV63FA@mail.gmail.com>
Date: Tue, 10 Dec 2024 15:45:10 +0530
From: Kalesh Anakkur Purayil <kalesh-anakkur.purayil@...adcom.com>
To: Petr Machata <petrm@...dia.com>
Cc: "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Andrew Lunn <andrew+netdev@...n.ch>,
netdev@...r.kernel.org, Ido Schimmel <idosch@...dia.com>, mlxsw@...dia.com,
Vladyslav Mykhaliuk <vmykhaliuk@...dia.com>, Amit Cohen <amcohen@...dia.com>, Jiri Pirko <jiri@...dia.com>
Subject: Re: [PATCH net-next] mlxsw: spectrum_flower: Do not allow mixing
sample and mirror actions
On Tue, Dec 10, 2024 at 3:26 PM Petr Machata <petrm@...dia.com> wrote:
>
> From: Ido Schimmel <idosch@...dia.com>
>
> The device does not support multiple mirror actions per rule and the
> driver rejects such configuration:
>
> # tc filter add dev swp1 ingress pref 1 proto ip flower skip_sw action mirred egress mirror dev swp2 action mirred egress mirror dev swp3
> Error: mlxsw_spectrum: Multiple mirror actions per rule are not supported.
> We have an error talking to the kernel
>
> Internally, the sample action is implemented by the device by mirroring
> to the CPU port. Therefore, mixing sample and mirror actions in a single
> rule does not work correctly and results in the last action effect.
>
> Solve by rejecting such misconfiguration:
>
> # tc filter add dev swp1 ingress pref 1 proto ip flower skip_sw action mirred egress mirror dev swp2 action sample rate 100 group 1
> Error: mlxsw_spectrum: Sample action after mirror action is not supported.
> We have an error talking to the kernel
>
> # tc filter add dev swp1 ingress pref 1 proto ip flower skip_sw action sample rate 100 group 1 action mirred egress mirror dev swp2
> Error: mlxsw_spectrum: Mirror action after sample action is not supported.
> We have an error talking to the kernel
>
> Reported-by: Vladyslav Mykhaliuk <vmykhaliuk@...dia.com>
> Signed-off-by: Ido Schimmel <idosch@...dia.com>
> Reviewed-by: Amit Cohen <amcohen@...dia.com>
> Reviewed-by: Jiri Pirko <jiri@...dia.com>
> Signed-off-by: Petr Machata <petrm@...dia.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@...adcom.com>
--
Regards,
Kalesh AP
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4239 bytes)
Powered by blists - more mailing lists