All of lore.kernel.org
 help / color / mirror / Atom feed
* Enable and configure storm prevention in a network device
@ 2018-04-05 20:14 Murali Karicheri
  2018-04-05 20:20 ` David Miller
  0 siblings, 1 reply; 7+ messages in thread
From: Murali Karicheri @ 2018-04-05 20:14 UTC (permalink / raw)
  To: open list:TI NETCP ETHERNET DRIVER

Hello Netdev experts,

Is there a standard way to implement and configure storm prevention in a Linux
network device?

Our NIC firmware has the capability to enable storm prevention which is implemented
using a credit based scheme. The configuration is how many number of multicast +
broadcast packets allowed in a certain period of time. Is there a standard way
of passing this information from user space to driver? 

Thanks in advance for your input!

-- 
Murali Karicheri
Linux Kernel, Keystone

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Enable and configure storm prevention in a network device
  2018-04-05 20:14 Enable and configure storm prevention in a network device Murali Karicheri
@ 2018-04-05 20:20 ` David Miller
  2018-04-05 22:35   ` Florian Fainelli
  0 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2018-04-05 20:20 UTC (permalink / raw)
  To: m-karicheri2; +Cc: netdev

From: Murali Karicheri <m-karicheri2@ti.com>
Date: Thu, 5 Apr 2018 16:14:49 -0400

> Is there a standard way to implement and configure storm prevention
> in a Linux network device?

What kind of "storm", an interrupt storm?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Enable and configure storm prevention in a network device
  2018-04-05 20:20 ` David Miller
@ 2018-04-05 22:35   ` Florian Fainelli
  2018-04-06 14:30     ` Andrew Lunn
  2018-04-09 14:33     ` Murali Karicheri
  0 siblings, 2 replies; 7+ messages in thread
From: Florian Fainelli @ 2018-04-05 22:35 UTC (permalink / raw)
  To: David Miller, m-karicheri2; +Cc: netdev, andrew

On 04/05/2018 01:20 PM, David Miller wrote:
> From: Murali Karicheri <m-karicheri2@ti.com>
> Date: Thu, 5 Apr 2018 16:14:49 -0400
> 
>> Is there a standard way to implement and configure storm prevention
>> in a Linux network device?
> 
> What kind of "storm", an interrupt storm?
> 

I would assume Murali is referring to L2 broadcast storms which is
common in switches. There is not an API for that AFAICT and I am not
sure what a proper API would look like.
-- 
Florian

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Enable and configure storm prevention in a network device
  2018-04-05 22:35   ` Florian Fainelli
@ 2018-04-06 14:30     ` Andrew Lunn
  2018-04-09 15:13       ` Murali Karicheri
  2018-04-09 14:33     ` Murali Karicheri
  1 sibling, 1 reply; 7+ messages in thread
From: Andrew Lunn @ 2018-04-06 14:30 UTC (permalink / raw)
  To: Florian Fainelli; +Cc: David Miller, m-karicheri2, netdev

On Thu, Apr 05, 2018 at 03:35:06PM -0700, Florian Fainelli wrote:
> On 04/05/2018 01:20 PM, David Miller wrote:
> > From: Murali Karicheri <m-karicheri2@ti.com>
> > Date: Thu, 5 Apr 2018 16:14:49 -0400
> > 
> >> Is there a standard way to implement and configure storm prevention
> >> in a Linux network device?
> > 
> > What kind of "storm", an interrupt storm?
> > 
> 
> I would assume Murali is referring to L2 broadcast storms which is
> common in switches. There is not an API for that AFAICT and I am not
> sure what a proper API would look like.

tc?

The Marvell switches have leaky buckets, which can be used for
limiting broadcast and multicast packets, as well as traffic shaping
in general. Storm prevention is just a form of traffic shaping, so if
we have generic traffic shaping, it can be used for storm prevention.

   Andrew

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Enable and configure storm prevention in a network device
  2018-04-05 22:35   ` Florian Fainelli
  2018-04-06 14:30     ` Andrew Lunn
@ 2018-04-09 14:33     ` Murali Karicheri
  1 sibling, 0 replies; 7+ messages in thread
From: Murali Karicheri @ 2018-04-09 14:33 UTC (permalink / raw)
  To: Florian Fainelli, David Miller; +Cc: netdev, andrew

On 04/05/2018 06:35 PM, Florian Fainelli wrote:
> On 04/05/2018 01:20 PM, David Miller wrote:
>> From: Murali Karicheri <m-karicheri2@ti.com>
>> Date: Thu, 5 Apr 2018 16:14:49 -0400
>>
>>> Is there a standard way to implement and configure storm prevention
>>> in a Linux network device?
>>
>> What kind of "storm", an interrupt storm?
>>
> 
> I would assume Murali is referring to L2 broadcast storms which is
> common in switches. There is not an API for that AFAICT and I am not
> sure what a proper API would look like.
> 
Thanks Florian for adding more details. Yes, I am referring to
L2 broadcast or multicast storm. At this point I don't see a reason
why to exclude unicast storm as well if the hardware has the capability.


-- 
Murali Karicheri
Linux Kernel, Keystone

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Enable and configure storm prevention in a network device
  2018-04-06 14:30     ` Andrew Lunn
@ 2018-04-09 15:13       ` Murali Karicheri
  2018-04-09 15:18         ` Andrew Lunn
  0 siblings, 1 reply; 7+ messages in thread
From: Murali Karicheri @ 2018-04-09 15:13 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli; +Cc: David Miller, netdev

Andrew,

On 04/06/2018 10:30 AM, Andrew Lunn wrote:
> On Thu, Apr 05, 2018 at 03:35:06PM -0700, Florian Fainelli wrote:
>> On 04/05/2018 01:20 PM, David Miller wrote:
>>> From: Murali Karicheri <m-karicheri2@ti.com>
>>> Date: Thu, 5 Apr 2018 16:14:49 -0400
>>>
>>>> Is there a standard way to implement and configure storm prevention
>>>> in a Linux network device?
>>>
>>> What kind of "storm", an interrupt storm?
>>>
>>
>> I would assume Murali is referring to L2 broadcast storms which is
>> common in switches. There is not an API for that AFAICT and I am not
>> sure what a proper API would look like.
> 
> tc?
> 
> The Marvell switches have leaky buckets, which can be used for
> limiting broadcast and multicast packets, as well as traffic shaping
> in general. Storm prevention is just a form of traffic shaping, so if
> we have generic traffic shaping, it can be used for storm prevention.
> 
TI's CPSW hardware as well has similar capability to limit broadcast and
multicast packets at the ingress. Isn't it a traffic policing at the Ingress
rather than traffic shaping as the hardware drops the frames at the ingress
if the rate exceeds a limit?

I haven't done any work on TC, but with my limited knowledge of TC, it
seems we might be able to use TC to offload the TC policing to the hardware
through ndo_setup_tc()? Could someone shed some light on how to do this
with tc? Some tc filer command and then some hook in kernel to offload this
to hardware?

Murali

>    Andrew
> 


-- 
Murali Karicheri
Linux Kernel, Keystone

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Enable and configure storm prevention in a network device
  2018-04-09 15:13       ` Murali Karicheri
@ 2018-04-09 15:18         ` Andrew Lunn
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2018-04-09 15:18 UTC (permalink / raw)
  To: Murali Karicheri; +Cc: Florian Fainelli, David Miller, netdev

> > The Marvell switches have leaky buckets, which can be used for
> > limiting broadcast and multicast packets, as well as traffic shaping
> > in general. Storm prevention is just a form of traffic shaping, so if
> > we have generic traffic shaping, it can be used for storm prevention.
> > 
> TI's CPSW hardware as well has similar capability to limit broadcast and
> multicast packets at the ingress. Isn't it a traffic policing at the Ingress
> rather than traffic shaping as the hardware drops the frames at the ingress
> if the rate exceeds a limit?

Hi Murali

It depends on the generation of Marvell switches. Older ones have just
egress traffic shaping. Newer ones also have ingress rate limiting.

       Andrew

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-04-09 15:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-05 20:14 Enable and configure storm prevention in a network device Murali Karicheri
2018-04-05 20:20 ` David Miller
2018-04-05 22:35   ` Florian Fainelli
2018-04-06 14:30     ` Andrew Lunn
2018-04-09 15:13       ` Murali Karicheri
2018-04-09 15:18         ` Andrew Lunn
2018-04-09 14:33     ` Murali Karicheri

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.