Skip to content

Commit d29f749

Browse files
Dave Jonesdavem330
authored andcommitted
net: Fix build failure with 'make mandocs'.
The function header comments have to go with the functions they are documenting, or things go horribly wrong when we try to process them with the docbook tools. Warning(include/linux/netdevice.h:1006): No description found for parameter 'dev_queue' Warning(include/linux/netdevice.h:1033): No description found for parameter 'dev_queue' Warning(include/linux/netdevice.h:1067): No description found for parameter 'dev_queue' Warning(include/linux/netdevice.h:1093): No description found for parameter 'dev_queue' Warning(include/linux/netdevice.h:1474): No description found for parameter 'txq' Error(net/core/dev.c:1674): cannot understand prototype: 'u32 simple_tx_hashrnd; ' Signed-off-by: Dave Jones <davej@redhat.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent b32d131 commit d29f749

2 files changed

Lines changed: 54 additions & 55 deletions

File tree

‎include/linux/netdevice.h‎

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -996,17 +996,17 @@ static inline void netif_tx_schedule_all(struct net_device *dev)
996996
netif_schedule_queue(netdev_get_tx_queue(dev, i));
997997
}
998998

999+
static inline void netif_tx_start_queue(struct netdev_queue *dev_queue)
1000+
{
1001+
clear_bit(__QUEUE_STATE_XOFF, &dev_queue->state);
1002+
}
1003+
9991004
/**
10001005
* netif_start_queue - allow transmit
10011006
* @dev: network device
10021007
*
10031008
* Allow upper layers to call the device hard_start_xmit routine.
10041009
*/
1005-
static inline void netif_tx_start_queue(struct netdev_queue *dev_queue)
1006-
{
1007-
clear_bit(__QUEUE_STATE_XOFF, &dev_queue->state);
1008-
}
1009-
10101010
static inline void netif_start_queue(struct net_device *dev)
10111011
{
10121012
netif_tx_start_queue(netdev_get_tx_queue(dev, 0));
@@ -1022,13 +1022,6 @@ static inline void netif_tx_start_all_queues(struct net_device *dev)
10221022
}
10231023
}
10241024

1025-
/**
1026-
* netif_wake_queue - restart transmit
1027-
* @dev: network device
1028-
*
1029-
* Allow upper layers to call the device hard_start_xmit routine.
1030-
* Used for flow control when transmit resources are available.
1031-
*/
10321025
static inline void netif_tx_wake_queue(struct netdev_queue *dev_queue)
10331026
{
10341027
#ifdef CONFIG_NETPOLL_TRAP
@@ -1041,6 +1034,13 @@ static inline void netif_tx_wake_queue(struct netdev_queue *dev_queue)
10411034
__netif_schedule(dev_queue->qdisc);
10421035
}
10431036

1037+
/**
1038+
* netif_wake_queue - restart transmit
1039+
* @dev: network device
1040+
*
1041+
* Allow upper layers to call the device hard_start_xmit routine.
1042+
* Used for flow control when transmit resources are available.
1043+
*/
10441044
static inline void netif_wake_queue(struct net_device *dev)
10451045
{
10461046
netif_tx_wake_queue(netdev_get_tx_queue(dev, 0));
@@ -1056,18 +1056,18 @@ static inline void netif_tx_wake_all_queues(struct net_device *dev)
10561056
}
10571057
}
10581058

1059+
static inline void netif_tx_stop_queue(struct netdev_queue *dev_queue)
1060+
{
1061+
set_bit(__QUEUE_STATE_XOFF, &dev_queue->state);
1062+
}
1063+
10591064
/**
10601065
* netif_stop_queue - stop transmitted packets
10611066
* @dev: network device
10621067
*
10631068
* Stop upper layers calling the device hard_start_xmit routine.
10641069
* Used for flow control when transmit resources are unavailable.
10651070
*/
1066-
static inline void netif_tx_stop_queue(struct netdev_queue *dev_queue)
1067-
{
1068-
set_bit(__QUEUE_STATE_XOFF, &dev_queue->state);
1069-
}
1070-
10711071
static inline void netif_stop_queue(struct net_device *dev)
10721072
{
10731073
netif_tx_stop_queue(netdev_get_tx_queue(dev, 0));
@@ -1083,17 +1083,17 @@ static inline void netif_tx_stop_all_queues(struct net_device *dev)
10831083
}
10841084
}
10851085

1086+
static inline int netif_tx_queue_stopped(const struct netdev_queue *dev_queue)
1087+
{
1088+
return test_bit(__QUEUE_STATE_XOFF, &dev_queue->state);
1089+
}
1090+
10861091
/**
10871092
* netif_queue_stopped - test if transmit queue is flowblocked
10881093
* @dev: network device
10891094
*
10901095
* Test if transmit queue on device is currently unable to send.
10911096
*/
1092-
static inline int netif_tx_queue_stopped(const struct netdev_queue *dev_queue)
1093-
{
1094-
return test_bit(__QUEUE_STATE_XOFF, &dev_queue->state);
1095-
}
1096-
10971097
static inline int netif_queue_stopped(const struct net_device *dev)
10981098
{
10991099
return netif_tx_queue_stopped(netdev_get_tx_queue(dev, 0));
@@ -1463,13 +1463,6 @@ static inline void netif_rx_complete(struct net_device *dev,
14631463
local_irq_restore(flags);
14641464
}
14651465

1466-
/**
1467-
* netif_tx_lock - grab network device transmit lock
1468-
* @dev: network device
1469-
* @cpu: cpu number of lock owner
1470-
*
1471-
* Get network device transmit lock
1472-
*/
14731466
static inline void __netif_tx_lock(struct netdev_queue *txq, int cpu)
14741467
{
14751468
spin_lock(&txq->_xmit_lock);
@@ -1482,6 +1475,13 @@ static inline void __netif_tx_lock_bh(struct netdev_queue *txq)
14821475
txq->xmit_lock_owner = smp_processor_id();
14831476
}
14841477

1478+
/**
1479+
* netif_tx_lock - grab network device transmit lock
1480+
* @dev: network device
1481+
* @cpu: cpu number of lock owner
1482+
*
1483+
* Get network device transmit lock
1484+
*/
14851485
static inline void netif_tx_lock(struct net_device *dev)
14861486
{
14871487
int cpu = smp_processor_id();

‎net/core/dev.c‎

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1645,32 +1645,6 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
16451645
return 0;
16461646
}
16471647

1648-
/**
1649-
* dev_queue_xmit - transmit a buffer
1650-
* @skb: buffer to transmit
1651-
*
1652-
* Queue a buffer for transmission to a network device. The caller must
1653-
* have set the device and priority and built the buffer before calling
1654-
* this function. The function can be called from an interrupt.
1655-
*
1656-
* A negative errno code is returned on a failure. A success does not
1657-
* guarantee the frame will be transmitted as it may be dropped due
1658-
* to congestion or traffic shaping.
1659-
*
1660-
* -----------------------------------------------------------------------------------
1661-
* I notice this method can also return errors from the queue disciplines,
1662-
* including NET_XMIT_DROP, which is a positive value. So, errors can also
1663-
* be positive.
1664-
*
1665-
* Regardless of the return value, the skb is consumed, so it is currently
1666-
* difficult to retry a send to this method. (You can bump the ref count
1667-
* before sending to hold a reference for retry if you are careful.)
1668-
*
1669-
* When calling this method, interrupts MUST be enabled. This is because
1670-
* the BH enable code must have IRQs enabled so that it will not deadlock.
1671-
* --BLG
1672-
*/
1673-
16741648
static u32 simple_tx_hashrnd;
16751649
static int simple_tx_hashrnd_initialized = 0;
16761650

@@ -1738,6 +1712,31 @@ static struct netdev_queue *dev_pick_tx(struct net_device *dev,
17381712
return netdev_get_tx_queue(dev, queue_index);
17391713
}
17401714

1715+
/**
1716+
* dev_queue_xmit - transmit a buffer
1717+
* @skb: buffer to transmit
1718+
*
1719+
* Queue a buffer for transmission to a network device. The caller must
1720+
* have set the device and priority and built the buffer before calling
1721+
* this function. The function can be called from an interrupt.
1722+
*
1723+
* A negative errno code is returned on a failure. A success does not
1724+
* guarantee the frame will be transmitted as it may be dropped due
1725+
* to congestion or traffic shaping.
1726+
*
1727+
* -----------------------------------------------------------------------------------
1728+
* I notice this method can also return errors from the queue disciplines,
1729+
* including NET_XMIT_DROP, which is a positive value. So, errors can also
1730+
* be positive.
1731+
*
1732+
* Regardless of the return value, the skb is consumed, so it is currently
1733+
* difficult to retry a send to this method. (You can bump the ref count
1734+
* before sending to hold a reference for retry if you are careful.)
1735+
*
1736+
* When calling this method, interrupts MUST be enabled. This is because
1737+
* the BH enable code must have IRQs enabled so that it will not deadlock.
1738+
* --BLG
1739+
*/
17411740
int dev_queue_xmit(struct sk_buff *skb)
17421741
{
17431742
struct net_device *dev = skb->dev;

0 commit comments

Comments
 (0)