From patchwork Fri Sep 6 10:58:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 273151 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 101B62C008A for ; Fri, 6 Sep 2013 20:59:05 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751110Ab3IFK7A (ORCPT ); Fri, 6 Sep 2013 06:59:00 -0400 Received: from mms3.broadcom.com ([216.31.210.19]:4412 "EHLO mms3.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750847Ab3IFK67 (ORCPT ); Fri, 6 Sep 2013 06:58:59 -0400 Received: from [10.9.208.57] by mms3.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.5)); Fri, 06 Sep 2013 03:48:24 -0700 X-Server-Uuid: B86B6450-0931-4310-942E-F00ED04CA7AF Received: from IRVEXCHSMTP2.corp.ad.broadcom.com (10.9.207.52) by IRVEXCHCAS08.corp.ad.broadcom.com (10.9.208.57) with Microsoft SMTP Server (TLS) id 14.1.438.0; Fri, 6 Sep 2013 03:58:47 -0700 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP2.corp.ad.broadcom.com (10.9.207.52) with Microsoft SMTP Server id 14.1.438.0; Fri, 6 Sep 2013 03:58:47 -0700 Received: from fainelli-desktop.broadcom.com ( dhcp-lab-brsb-10.bri.broadcom.com [10.178.7.10]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id ED6AC1A46; Fri, 6 Sep 2013 03:58:46 -0700 (PDT) From: "Florian Fainelli" To: netdev@vger.kernel.org cc: eric.dumazet@gmail.com, davem@davemloft.net, "Florian Fainelli" Subject: [PATCH net-next] net: add documentation for BQL helpers Date: Fri, 6 Sep 2013 11:58:39 +0100 Message-ID: <1378465119-1894-1-git-send-email-f.fainelli@gmail.com> X-Mailer: git-send-email 1.8.1.2 MIME-Version: 1.0 X-WSS-ID: 7E376D722L881944393-01-01 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- include/linux/netdevice.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 8ed4ae9..ac36629 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -2101,6 +2101,16 @@ static inline void netdev_tx_sent_queue(struct netdev_queue *dev_queue, #endif } +/** + * netdev_sent_queue - report the number of bytes queued to hardware + * @dev: network device + * @bytes: number of bytes queued to the hardware device queue + * + * Report the number of bytes queued for sending/completion to the network + * device hardware queue. @bytes should specify the number of bytes which + * will be sent over the physical medium (without prepended/appended + * control blocks, FCS...) + */ static inline void netdev_sent_queue(struct net_device *dev, unsigned int bytes) { netdev_tx_sent_queue(netdev_get_tx_queue(dev, 0), bytes); @@ -2130,6 +2140,16 @@ static inline void netdev_tx_completed_queue(struct netdev_queue *dev_queue, #endif } +/** + * netdev_completed_queue - report bytes and packets completed by device + * @dev: network device + * @pkts: actual number of packets sent over the medium + * @bytes: actual number of bytes sent over the medium + * + * Report the number of bytes and packets transmitted by the network device + * hardware queue over the physical medium (without prepended/appended + * control blocks, FCS...) + */ static inline void netdev_completed_queue(struct net_device *dev, unsigned int pkts, unsigned int bytes) { @@ -2144,6 +2164,13 @@ static inline void netdev_tx_reset_queue(struct netdev_queue *q) #endif } +/** + * netdev_reset_queue - reset the packets and bytes count of a network device + * @dev_queue: network device + * + * Reset the bytes and packet count of a network device and clear the + * software flow control OFF bit for this network device + */ static inline void netdev_reset_queue(struct net_device *dev_queue) { netdev_tx_reset_queue(netdev_get_tx_queue(dev_queue, 0));