sch_generic.h (50501936288d6a29d7ef78f25d00e33240fad45f) | sch_generic.h (e420bed025071a623d2720a92bc2245c84757ecb) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef __NET_SCHED_GENERIC_H 3#define __NET_SCHED_GENERIC_H 4 5#include <linux/netdevice.h> 6#include <linux/types.h> 7#include <linux/rcupdate.h> 8#include <linux/pkt_sched.h> --- 689 unchanged lines hidden (view full) --- 698 const struct Qdisc_ops *ops, u32 parentid, 699 struct netlink_ext_ack *extack); 700void __qdisc_calculate_pkt_len(struct sk_buff *skb, 701 const struct qdisc_size_table *stab); 702int skb_do_redirect(struct sk_buff *); 703 704static inline bool skb_at_tc_ingress(const struct sk_buff *skb) 705{ | 1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef __NET_SCHED_GENERIC_H 3#define __NET_SCHED_GENERIC_H 4 5#include <linux/netdevice.h> 6#include <linux/types.h> 7#include <linux/rcupdate.h> 8#include <linux/pkt_sched.h> --- 689 unchanged lines hidden (view full) --- 698 const struct Qdisc_ops *ops, u32 parentid, 699 struct netlink_ext_ack *extack); 700void __qdisc_calculate_pkt_len(struct sk_buff *skb, 701 const struct qdisc_size_table *stab); 702int skb_do_redirect(struct sk_buff *); 703 704static inline bool skb_at_tc_ingress(const struct sk_buff *skb) 705{ |
706#ifdef CONFIG_NET_CLS_ACT | 706#ifdef CONFIG_NET_XGRESS |
707 return skb->tc_at_ingress; 708#else 709 return false; 710#endif 711} 712 713static inline bool skb_skip_tc_classify(struct sk_buff *skb) 714{ --- 470 unchanged lines hidden (view full) --- 1185 struct sk_buff **to_free) 1186{ 1187 __qdisc_drop_all(skb, to_free); 1188 qdisc_qstats_drop(sch); 1189 1190 return NET_XMIT_DROP; 1191} 1192 | 707 return skb->tc_at_ingress; 708#else 709 return false; 710#endif 711} 712 713static inline bool skb_skip_tc_classify(struct sk_buff *skb) 714{ --- 470 unchanged lines hidden (view full) --- 1185 struct sk_buff **to_free) 1186{ 1187 __qdisc_drop_all(skb, to_free); 1188 qdisc_qstats_drop(sch); 1189 1190 return NET_XMIT_DROP; 1191} 1192 |
1193/* Length to Time (L2T) lookup in a qdisc_rate_table, to determine how 1194 long it will take to send a packet given its size. 1195 */ 1196static inline u32 qdisc_l2t(struct qdisc_rate_table* rtab, unsigned int pktlen) 1197{ 1198 int slot = pktlen + rtab->rate.cell_align + rtab->rate.overhead; 1199 if (slot < 0) 1200 slot = 0; 1201 slot >>= rtab->rate.cell_log; 1202 if (slot > 255) 1203 return rtab->data[255]*(slot >> 8) + rtab->data[slot & 0xFF]; 1204 return rtab->data[slot]; 1205} 1206 | |
1207struct psched_ratecfg { 1208 u64 rate_bytes_ps; /* bytes per second */ 1209 u32 mult; 1210 u16 overhead; 1211 u16 mpu; 1212 u8 linklayer; 1213 u8 shift; 1214}; --- 96 unchanged lines hidden --- | 1193struct psched_ratecfg { 1194 u64 rate_bytes_ps; /* bytes per second */ 1195 u32 mult; 1196 u16 overhead; 1197 u16 mpu; 1198 u8 linklayer; 1199 u8 shift; 1200}; --- 96 unchanged lines hidden --- |