Subject: Re: [PATCH RFC 2/3] net_sched: Add accessor function for packet length for qdiscs

From: Patrick McHardy <[email-masked]>
Date: Thu, 17 Jul 2008 12:11:30 +0200

Jussi Kivilinna wrote:
> Signed-off-by: Jussi Kivilinna <[email-masked]>
> ---
> 
>  include/net/sch_generic.h |   17 +++++++++++------
>  net/sched/sch_atm.c       |    4 ++--
>  net/sched/sch_cbq.c       |   14 ++++++--------
>  net/sched/sch_dsmark.c    |    2 +-
>  net/sched/sch_fifo.c      |    2 +-
>  net/sched/sch_gred.c      |   12 ++++++------
>  net/sched/sch_hfsc.c      |   14 ++++++--------
>  net/sched/sch_htb.c       |    9 +++++----
>  net/sched/sch_netem.c     |    6 +++---
>  net/sched/sch_prio.c      |    2 +-
>  net/sched/sch_red.c       |    2 +-
>  net/sched/sch_sfq.c       |   16 ++++++++--------
>  net/sched/sch_tbf.c       |    9 ++++++---
>  net/sched/sch_teql.c      |    6 +++---
>  14 files changed, 60 insertions(+), 55 deletions(-)
> 
> diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
> index e3b0d71..1f1de3b 100644
> --- a/include/net/sch_generic.h
> +++ b/include/net/sch_generic.h
> @@ -258,6 +258,11 @@ static inline bool qdisc_tx_is_noop(const struct net_device *dev)
>  	return (txq->qdisc == &noop_qdisc);
>  }
>  
> +static inline unsigned int qdisc_tx_len(struct sk_buff *skb)
> +{
> +	return skb->len;
> +}

Just one question - should this also be useable for ingress? If so
a different name would make sense.