* port mirror on dsa switches?
@ 2017-03-16 10:32 Maxim Uvarov
2017-03-16 16:47 ` Florian Fainelli
0 siblings, 1 reply; 4+ messages in thread
From: Maxim Uvarov @ 2017-03-16 10:32 UTC (permalink / raw)
To: netdev; +Cc: Florian Fainelli
Hello,
Some dsa switches can support port mirror in hardware. Does somebody
have any idea how to
work with it from linux side in generic way?
That might be part of 'struct dsa_switch_ops', but it's not clear
which user space app should control that.
The same question about QoS set up on dsa switch ports.
--
Best regards,
Maxim Uvarov
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: port mirror on dsa switches?
2017-03-16 10:32 port mirror on dsa switches? Maxim Uvarov
@ 2017-03-16 16:47 ` Florian Fainelli
2017-03-16 19:43 ` Maxim Uvarov
0 siblings, 1 reply; 4+ messages in thread
From: Florian Fainelli @ 2017-03-16 16:47 UTC (permalink / raw)
To: Maxim Uvarov, netdev
Hi,
On 03/16/2017 03:32 AM, Maxim Uvarov wrote:
> Hello,
>
> Some dsa switches can support port mirror in hardware. Does somebody
> have any idea how to
> work with it from linux side in generic way?
It has been implemented with commit
f50f212749e8a28803af3628acbeb85ee0458ed5 ("net: dsa: Add plumbing for
port mirroring") and you can see an implementation example with the b53
driver.
For a DSA driver you should be implementing port_mirror_add and
port_mirror_del operations which provide you with the necessary
information. Hopefully the switch you are working with (mv88e6xxx?) is
also supportable using that API, if not, please submit changes to extend it.
Thanks!
--
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: port mirror on dsa switches?
2017-03-16 16:47 ` Florian Fainelli
@ 2017-03-16 19:43 ` Maxim Uvarov
2017-03-16 19:48 ` Florian Fainelli
0 siblings, 1 reply; 4+ messages in thread
From: Maxim Uvarov @ 2017-03-16 19:43 UTC (permalink / raw)
To: Florian Fainelli; +Cc: netdev
2017-03-16 19:47 GMT+03:00 Florian Fainelli <f.fainelli@gmail.com>:
> Hi,
>
> On 03/16/2017 03:32 AM, Maxim Uvarov wrote:
>> Hello,
>>
>> Some dsa switches can support port mirror in hardware. Does somebody
>> have any idea how to
>> work with it from linux side in generic way?
>
> It has been implemented with commit
> f50f212749e8a28803af3628acbeb85ee0458ed5 ("net: dsa: Add plumbing for
> port mirroring") and you can see an implementation example with the b53
> driver.
>
thanks, see that in newer kernel. It will be good to update doc with
commands to use.
I see from cover latter you mirrored eth1 to eth2. I assume it's dsa
ports names for b53?
Do I also need updated tc?
> For a DSA driver you should be implementing port_mirror_add and
> port_mirror_del operations which provide you with the necessary
> information. Hopefully the switch you are working with (mv88e6xxx?) is
> also supportable using that API, if not, please submit changes to extend it.
>
> Thanks!
> --
> Florian
Yes, I think it will match mv88e6xxx. Will try to play with it. Thanks a lot!
--
Best regards,
Maxim Uvarov
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: port mirror on dsa switches?
2017-03-16 19:43 ` Maxim Uvarov
@ 2017-03-16 19:48 ` Florian Fainelli
0 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2017-03-16 19:48 UTC (permalink / raw)
To: Maxim Uvarov; +Cc: netdev
On 03/16/2017 12:43 PM, Maxim Uvarov wrote:
> 2017-03-16 19:47 GMT+03:00 Florian Fainelli <f.fainelli@gmail.com>:
>> Hi,
>>
>> On 03/16/2017 03:32 AM, Maxim Uvarov wrote:
>>> Hello,
>>>
>>> Some dsa switches can support port mirror in hardware. Does somebody
>>> have any idea how to
>>> work with it from linux side in generic way?
>>
>> It has been implemented with commit
>> f50f212749e8a28803af3628acbeb85ee0458ed5 ("net: dsa: Add plumbing for
>> port mirroring") and you can see an implementation example with the b53
>> driver.
>>
>
> thanks, see that in newer kernel. It will be good to update doc with
> commands to use.
> I see from cover latter you mirrored eth1 to eth2. I assume it's dsa
> ports names for b53?
Yes, DSA will refuse mirroring to network devices that are not ports of
the switch (arguable we could allow mirroring to master network device,
but that's TODO).
> Do I also need updated tc?
Yes you do need a reasonably recent iproute2, like 4.11 or something close.
>
>> For a DSA driver you should be implementing port_mirror_add and
>> port_mirror_del operations which provide you with the necessary
>> information. Hopefully the switch you are working with (mv88e6xxx?) is
>> also supportable using that API, if not, please submit changes to extend it.
>>
>> Thanks!
>> --
>> Florian
>
> Yes, I think it will match mv88e6xxx. Will try to play with it. Thanks a lot!
>
--
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-16 19:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-16 10:32 port mirror on dsa switches? Maxim Uvarov
2017-03-16 16:47 ` Florian Fainelli
2017-03-16 19:43 ` Maxim Uvarov
2017-03-16 19:48 ` Florian Fainelli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).