aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2013-09-06 11:58:00 -0400
committerDavid S. Miller <davem@davemloft.net>2013-09-06 14:43:49 -0400
commit0042d0c840c616186a5b09207a0e77fab7581db3 (patch)
tree7046db91faa3d51529ba71484d7f1594ea73be52
parent635ad31002fad736af85adfc96bb9408fb813a7b (diff)
net: add documentation for BQL helpers
Provide a kernel-doc comment documentation for the BQL helpers: - netdev_sent_queue - netdev_completed_queue - netdev_reset_queue Similarly to how it is done for the other functions, the documentation only covers the function operating on struct net_device and not struct netdev_queue. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/linux/netdevice.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 8ed4ae943053..041b42a305f6 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2101,6 +2101,15 @@ static inline void netdev_tx_sent_queue(struct netdev_queue *dev_queue,
2101#endif 2101#endif
2102} 2102}
2103 2103
2104/**
2105 * netdev_sent_queue - report the number of bytes queued to hardware
2106 * @dev: network device
2107 * @bytes: number of bytes queued to the hardware device queue
2108 *
2109 * Report the number of bytes queued for sending/completion to the network
2110 * device hardware queue. @bytes should be a good approximation and should
2111 * exactly match netdev_completed_queue() @bytes
2112 */
2104static inline void netdev_sent_queue(struct net_device *dev, unsigned int bytes) 2113static inline void netdev_sent_queue(struct net_device *dev, unsigned int bytes)
2105{ 2114{
2106 netdev_tx_sent_queue(netdev_get_tx_queue(dev, 0), bytes); 2115 netdev_tx_sent_queue(netdev_get_tx_queue(dev, 0), bytes);
@@ -2130,6 +2139,16 @@ static inline void netdev_tx_completed_queue(struct netdev_queue *dev_queue,
2130#endif 2139#endif
2131} 2140}
2132 2141
2142/**
2143 * netdev_completed_queue - report bytes and packets completed by device
2144 * @dev: network device
2145 * @pkts: actual number of packets sent over the medium
2146 * @bytes: actual number of bytes sent over the medium
2147 *
2148 * Report the number of bytes and packets transmitted by the network device
2149 * hardware queue over the physical medium, @bytes must exactly match the
2150 * @bytes amount passed to netdev_sent_queue()
2151 */
2133static inline void netdev_completed_queue(struct net_device *dev, 2152static inline void netdev_completed_queue(struct net_device *dev,
2134 unsigned int pkts, unsigned int bytes) 2153 unsigned int pkts, unsigned int bytes)
2135{ 2154{
@@ -2144,6 +2163,13 @@ static inline void netdev_tx_reset_queue(struct netdev_queue *q)
2144#endif 2163#endif
2145} 2164}
2146 2165
2166/**
2167 * netdev_reset_queue - reset the packets and bytes count of a network device
2168 * @dev_queue: network device
2169 *
2170 * Reset the bytes and packet count of a network device and clear the
2171 * software flow control OFF bit for this network device
2172 */
2147static inline void netdev_reset_queue(struct net_device *dev_queue) 2173static inline void netdev_reset_queue(struct net_device *dev_queue)
2148{ 2174{
2149 netdev_tx_reset_queue(netdev_get_tx_queue(dev_queue, 0)); 2175 netdev_tx_reset_queue(netdev_get_tx_queue(dev_queue, 0));