Skip to content

Commit

Permalink
net: sched: Remove unused qdisc_l2t()
Browse files Browse the repository at this point in the history
This is unused since switch to psched_l2t_ns().

Signed-off-by: YueHaibing <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
YueHaibing authored and kuba-moo committed Jun 17, 2023
1 parent 9f8d0dc commit e16ad98
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions include/net/sch_generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -1190,20 +1190,6 @@ static inline int qdisc_drop_all(struct sk_buff *skb, struct Qdisc *sch,
return NET_XMIT_DROP;
}

/* Length to Time (L2T) lookup in a qdisc_rate_table, to determine how
long it will take to send a packet given its size.
*/
static inline u32 qdisc_l2t(struct qdisc_rate_table* rtab, unsigned int pktlen)
{
int slot = pktlen + rtab->rate.cell_align + rtab->rate.overhead;
if (slot < 0)
slot = 0;
slot >>= rtab->rate.cell_log;
if (slot > 255)
return rtab->data[255]*(slot >> 8) + rtab->data[slot & 0xFF];
return rtab->data[slot];
}

struct psched_ratecfg {
u64 rate_bytes_ps; /* bytes per second */
u32 mult;
Expand Down

0 comments on commit e16ad98

Please sign in to comment.