sch_generic.h (39fe5434cb9de5da40510028b17b96bc4eb312b3) | sch_generic.h (e9bef55d3d062ee7a78fde2913ec87ca9305a1e0) |
---|---|
1#ifndef __NET_SCHED_GENERIC_H 2#define __NET_SCHED_GENERIC_H 3 4#include <linux/netdevice.h> 5#include <linux/types.h> 6#include <linux/rcupdate.h> 7#include <linux/module.h> 8#include <linux/pkt_sched.h> --- 288 unchanged lines hidden (view full) --- 297 return NET_XMIT_SUCCESS; 298 299drop: 300#endif 301 kfree_skb(skb); 302 return NET_XMIT_DROP; 303} 304 | 1#ifndef __NET_SCHED_GENERIC_H 2#define __NET_SCHED_GENERIC_H 3 4#include <linux/netdevice.h> 5#include <linux/types.h> 6#include <linux/rcupdate.h> 7#include <linux/module.h> 8#include <linux/pkt_sched.h> --- 288 unchanged lines hidden (view full) --- 297 return NET_XMIT_SUCCESS; 298 299drop: 300#endif 301 kfree_skb(skb); 302 return NET_XMIT_DROP; 303} 304 |
305/* Length to Time (L2T) lookup in a qdisc_rate_table, to determine how 306 long it will take to send a packet given its size. 307 */ 308static inline u32 qdisc_l2t(struct qdisc_rate_table* rtab, unsigned int pktlen) 309{ 310 int slot = pktlen; 311 slot >>= rtab->rate.cell_log; 312 if (slot > 255) 313 return (rtab->data[255]*(slot >> 8) + rtab->data[slot & 0xFF]); 314 return rtab->data[slot]; 315} 316 |
|
305#endif | 317#endif |