aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/filter.h4
-rw-r--r--include/linux/netdevice.h17
-rw-r--r--include/linux/phy.h14
-rw-r--r--include/linux/tcp.h1
4 files changed, 33 insertions, 3 deletions
diff --git a/include/linux/filter.h b/include/linux/filter.h
index c050dcc322a4..56a6b7fbb3c6 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -58,10 +58,10 @@ extern void bpf_jit_free(struct sk_filter *fp);
58static inline void bpf_jit_dump(unsigned int flen, unsigned int proglen, 58static inline void bpf_jit_dump(unsigned int flen, unsigned int proglen,
59 u32 pass, void *image) 59 u32 pass, void *image)
60{ 60{
61 pr_err("flen=%u proglen=%u pass=%u image=%p\n", 61 pr_err("flen=%u proglen=%u pass=%u image=%pK\n",
62 flen, proglen, pass, image); 62 flen, proglen, pass, image);
63 if (image) 63 if (image)
64 print_hex_dump(KERN_ERR, "JIT code: ", DUMP_PREFIX_ADDRESS, 64 print_hex_dump(KERN_ERR, "JIT code: ", DUMP_PREFIX_OFFSET,
65 16, 1, image, proglen, false); 65 16, 1, image, proglen, false);
66} 66}
67#define SK_RUN_FILTER(FILTER, SKB) (*FILTER->bpf_func)(SKB, FILTER->insns) 67#define SK_RUN_FILTER(FILTER, SKB) (*FILTER->bpf_func)(SKB, FILTER->insns)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 60584b185a0c..0ebd63ae2cc8 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1778,6 +1778,19 @@ static inline int unregister_gifconf(unsigned int family)
1778 return register_gifconf(family, NULL); 1778 return register_gifconf(family, NULL);
1779} 1779}
1780 1780
1781#ifdef CONFIG_NET_FLOW_LIMIT
1782#define FLOW_LIMIT_HISTORY (1 << 8) /* must be ^2 */
1783struct sd_flow_limit {
1784 u64 count;
1785 unsigned int num_buckets;
1786 unsigned int history_head;
1787 u16 history[FLOW_LIMIT_HISTORY];
1788 u8 buckets[];
1789};
1790
1791extern int netdev_flow_limit_table_len;
1792#endif /* CONFIG_NET_FLOW_LIMIT */
1793
1781/* 1794/*
1782 * Incoming packets are placed on per-cpu queues 1795 * Incoming packets are placed on per-cpu queues
1783 */ 1796 */
@@ -1807,6 +1820,10 @@ struct softnet_data {
1807 unsigned int dropped; 1820 unsigned int dropped;
1808 struct sk_buff_head input_pkt_queue; 1821 struct sk_buff_head input_pkt_queue;
1809 struct napi_struct backlog; 1822 struct napi_struct backlog;
1823
1824#ifdef CONFIG_NET_FLOW_LIMIT
1825 struct sd_flow_limit *flow_limit;
1826#endif
1810}; 1827};
1811 1828
1812static inline void input_queue_head_incr(struct softnet_data *sd) 1829static inline void input_queue_head_incr(struct softnet_data *sd)
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 9e11039dd7a3..fdfa11542974 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -508,6 +508,18 @@ static inline int phy_write(struct phy_device *phydev, u32 regnum, u16 val)
508 return mdiobus_write(phydev->bus, phydev->addr, regnum, val); 508 return mdiobus_write(phydev->bus, phydev->addr, regnum, val);
509} 509}
510 510
511/**
512 * phy_interrupt_is_valid - Convenience function for testing a given PHY irq
513 * @phydev: the phy_device struct
514 *
515 * NOTE: must be kept in sync with addition/removal of PHY_POLL and
516 * PHY_IGNORE_INTERRUPT
517 */
518static inline bool phy_interrupt_is_valid(struct phy_device *phydev)
519{
520 return phydev->irq != PHY_POLL && phydev->irq != PHY_IGNORE_INTERRUPT;
521}
522
511struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id, 523struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id,
512 bool is_c45, struct phy_c45_device_ids *c45_ids); 524 bool is_c45, struct phy_c45_device_ids *c45_ids);
513struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45); 525struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45);
@@ -545,6 +557,8 @@ void phy_drivers_unregister(struct phy_driver *drv, int n);
545int phy_driver_register(struct phy_driver *new_driver); 557int phy_driver_register(struct phy_driver *new_driver);
546int phy_drivers_register(struct phy_driver *new_driver, int n); 558int phy_drivers_register(struct phy_driver *new_driver, int n);
547void phy_state_machine(struct work_struct *work); 559void phy_state_machine(struct work_struct *work);
560void phy_change(struct work_struct *work);
561void phy_mac_interrupt(struct phy_device *phydev, int new_link);
548void phy_start_machine(struct phy_device *phydev, 562void phy_start_machine(struct phy_device *phydev,
549 void (*handler)(struct net_device *)); 563 void (*handler)(struct net_device *));
550void phy_stop_machine(struct phy_device *phydev); 564void phy_stop_machine(struct phy_device *phydev);
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 5adbc33d1ab3..472120b4fac5 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -246,7 +246,6 @@ struct tcp_sock {
246 246
247 /* from STCP, retrans queue hinting */ 247 /* from STCP, retrans queue hinting */
248 struct sk_buff* lost_skb_hint; 248 struct sk_buff* lost_skb_hint;
249 struct sk_buff *scoreboard_skb_hint;
250 struct sk_buff *retransmit_skb_hint; 249 struct sk_buff *retransmit_skb_hint;
251 250
252 struct sk_buff_head out_of_order_queue; /* Out of order segments go here */ 251 struct sk_buff_head out_of_order_queue; /* Out of order segments go here */