2222#include <net/netdev_queues.h>
2323#include <net/page_pool/helpers.h>
2424#include <net/netlink.h>
25+ #include <net/net_shaper.h>
2526#include <net/pkt_cls.h>
2627#include <net/rtnetlink.h>
2728#include <net/udp_tunnel.h>
@@ -475,6 +476,43 @@ static int nsim_stop(struct net_device *dev)
475476 return 0 ;
476477}
477478
479+ static int nsim_shaper_set (struct net_shaper_binding * binding ,
480+ const struct net_shaper * shaper ,
481+ struct netlink_ext_ack * extack )
482+ {
483+ return 0 ;
484+ }
485+
486+ static int nsim_shaper_del (struct net_shaper_binding * binding ,
487+ const struct net_shaper_handle * handle ,
488+ struct netlink_ext_ack * extack )
489+ {
490+ return 0 ;
491+ }
492+
493+ static int nsim_shaper_group (struct net_shaper_binding * binding ,
494+ int leaves_count ,
495+ const struct net_shaper * leaves ,
496+ const struct net_shaper * root ,
497+ struct netlink_ext_ack * extack )
498+ {
499+ return 0 ;
500+ }
501+
502+ static void nsim_shaper_cap (struct net_shaper_binding * binding ,
503+ enum net_shaper_scope scope ,
504+ unsigned long * flags )
505+ {
506+ * flags = ULONG_MAX ;
507+ }
508+
509+ static const struct net_shaper_ops nsim_shaper_ops = {
510+ .set = nsim_shaper_set ,
511+ .delete = nsim_shaper_del ,
512+ .group = nsim_shaper_group ,
513+ .capabilities = nsim_shaper_cap ,
514+ };
515+
478516static const struct net_device_ops nsim_netdev_ops = {
479517 .ndo_start_xmit = nsim_start_xmit ,
480518 .ndo_set_rx_mode = nsim_set_rx_mode ,
@@ -496,6 +534,7 @@ static const struct net_device_ops nsim_netdev_ops = {
496534 .ndo_bpf = nsim_bpf ,
497535 .ndo_open = nsim_open ,
498536 .ndo_stop = nsim_stop ,
537+ .net_shaper_ops = & nsim_shaper_ops ,
499538};
500539
501540static const struct net_device_ops nsim_vf_netdev_ops = {
0 commit comments