Hi Ilya, Pls review my code.
I want to add a new policer which is pps-based in netdev-dpdk module. The policer is divided into ingress and egress part. Both use the ovs native tocken bucket library as the counter. Compared to bandwidth-based policers, the pps-based policer is more effective at combating low-and-slow types of DDoS attacks. This new ingress policer is configured using the "policer_kpkts_rate" and "policer_kpkts_burst" configuration statement. Here is the example. ovs-vsctl set interface dpdk0 policer_kpkts_rate=2 ovs-vsctl set interface dpdk0 policer_kpkts_burst=2 This new egress policer is configured using the " egress-pkts-policer " configuration statement. Here is the example. ovs-vsctl set port vhost-user0 qos=@newqos -- \ --id=@newqos create qos type=egress-pkts-policer other-config:pkts_rate=2048 \ other-config:pkts_burst=2048` Thanks a lot. > -----Original Message----- > From: lin huang <mit...@outlook.com> > Sent: Sunday, April 2, 2023 5:30 PM > To: d...@openvswitch.org; i.maxim...@ovn.org > Cc: Lin Huang <linhu...@ruijie.com.cn> > Subject: [PATCH v1 0/2] Add netdev-dpdk support for ingress and egress pkts > policer. > > From: Lin Huang <linhu...@ruijie.com.cn> > > This series patch set adds ingress and egress pkts policer support for > netdev-dpdk > device. > > Lin Huang (2): > netdev-dpdk: add netdev-dpdk egress pkts policer. > netdev-dpdk: add netdev-dpdk ingress pkts policer. > > lib/netdev-dpdk.c | 233 > ++++++++++++++++++++++++++++++++++++++++++- > vswitchd/vswitch.xml | 32 ++++++ > 2 files changed, 261 insertions(+), 4 deletions(-) > > -- > 2.37.1.windows.1 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev