From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cong Wang Subject: Re: [PATCH net-next] net:sched: add gkprio scheduler Date: Mon, 7 May 2018 22:24:51 -0700 Message-ID: References: <20180507093626.GA5794@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: Jiri Pirko , Jamal Hadi Salim , David Miller , Linux Kernel Network Developers , doucette@bu.edu, michel@digirati.com.br To: Nishanth Devarajan Return-path: Received: from mail-pg0-f47.google.com ([74.125.83.47]:33313 "EHLO mail-pg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752731AbeEHFZM (ORCPT ); Tue, 8 May 2018 01:25:12 -0400 Received: by mail-pg0-f47.google.com with SMTP id i194-v6so20657458pgd.0 for ; Mon, 07 May 2018 22:25:12 -0700 (PDT) In-Reply-To: <20180507093626.GA5794@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, May 7, 2018 at 2:36 AM, Nishanth Devarajan wrote: > net/sched: add gkprio scheduler > > Gkprio (Gatekeeper Priority Queue) is a queueing discipline that prioritizes > IPv4 and IPv6 packets accordingly to their DSCP field. Although Gkprio can be > employed in any QoS scenario in which a higher DSCP field means a higher > priority packet, Gkprio was concieved as a solution for denial-of-service > defenses that need to route packets with different priorities. Can we give it a better name? "Gatekeeper" is meaningless if we read it alone, it ties to your Gatekeeper project which is more than just this kernel module. Maybe "DS Priority Queue"? Overall it looks good to me, just one thing below: > +struct Qdisc_ops gkprio_qdisc_ops __read_mostly = { > + .id = "gkprio", > + .priv_size = sizeof(struct gkprio_sched_data), > + .enqueue = gkprio_enqueue, > + .dequeue = gkprio_dequeue, > + .peek = qdisc_peek_dequeued, > + .init = gkprio_init, > + .reset = gkprio_reset, > + .change = gkprio_change, > + .dump = gkprio_dump, > + .destroy = gkprio_destroy, > + .owner = THIS_MODULE, > +}; You probably want to add Qdisc_class_ops here so that you can dump the stats of each internal queue.