netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>,
	Robert Olsson <robert.olsson@its.uu.se>
Cc: netdev@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>
Subject: [PATCH 02/14] pktgen: change inlining
Date: Thu, 27 Aug 2009 16:55:08 -0700	[thread overview]
Message-ID: <20090827235705.258246781@vyatta.com> (raw)
In-Reply-To: 20090827235506.624381734@vyatta.com

[-- Attachment #1: pktgen-deinline.patch --]
[-- Type: text/plain, Size: 2372 bytes --]

Don't force inlining where not needed. Gcc does better job
of deciding to inline local functions.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>


---
 net/core/pktgen.c |   15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

--- a/net/core/pktgen.c	2009-08-27 11:30:10.108520235 -0700
+++ b/net/core/pktgen.c	2009-08-27 11:57:13.510686707 -0700
@@ -2438,7 +2438,7 @@ error:
 	return err;
 }
 
-static inline void free_SAs(struct pktgen_dev *pkt_dev)
+static void free_SAs(struct pktgen_dev *pkt_dev)
 {
 	if (pkt_dev->cflows) {
 		/* let go of the SAs if we have them */
@@ -2453,7 +2453,7 @@ static inline void free_SAs(struct pktge
 	}
 }
 
-static inline int process_ipsec(struct pktgen_dev *pkt_dev,
+static int process_ipsec(struct pktgen_dev *pkt_dev,
 			      struct sk_buff *skb, __be16 protocol)
 {
 	if (pkt_dev->flags & F_IPSEC_ON) {
@@ -3029,8 +3029,8 @@ static struct sk_buff *fill_packet_ipv6(
 	return skb;
 }
 
-static inline struct sk_buff *fill_packet(struct net_device *odev,
-					  struct pktgen_dev *pkt_dev)
+static struct sk_buff *fill_packet(struct net_device *odev,
+				   struct pktgen_dev *pkt_dev)
 {
 	if (pkt_dev->flags & F_IPV6)
 		return fill_packet_ipv6(odev, pkt_dev);
@@ -3341,13 +3341,12 @@ static void pktgen_rem_thread(struct pkt
 	mutex_unlock(&pktgen_thread_lock);
 }
 
-static __inline__ void pktgen_xmit(struct pktgen_dev *pkt_dev)
+static void pktgen_xmit(struct pktgen_dev *pkt_dev)
 {
 	struct net_device *odev = pkt_dev->odev;
 	int (*xmit)(struct sk_buff *, struct net_device *)
 		= odev->netdev_ops->ndo_start_xmit;
 	struct netdev_queue *txq;
-	__u64 idle_start = 0;
 	u16 queue_map;
 	int ret;
 
@@ -3379,7 +3378,7 @@ static __inline__ void pktgen_xmit(struc
 	if (netif_tx_queue_stopped(txq) ||
 	    netif_tx_queue_frozen(txq) ||
 	    need_resched()) {
-		idle_start = getCurUs();
+		u64 idle_start = getCurUs();
 
 		if (!netif_running(odev)) {
 			pktgen_stop_device(pkt_dev);
@@ -3475,7 +3474,7 @@ static __inline__ void pktgen_xmit(struc
 	/* If pkt_dev->count is zero, then run forever */
 	if ((pkt_dev->count != 0) && (pkt_dev->sofar >= pkt_dev->count)) {
 		if (atomic_read(&(pkt_dev->skb->users)) != 1) {
-			idle_start = getCurUs();
+			u64 idle_start = getCurUs();
 			while (atomic_read(&(pkt_dev->skb->users)) != 1) {
 				if (signal_pending(current)) {
 					break;

-- 


  parent reply	other threads:[~2009-08-27 23:59 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-27 23:55 [PATCH 00/14] pktgen update for net-next (2.6.32) Stephen Hemminger
2009-08-27 23:55 ` [PATCH 01/14] pktgen: minor cleanup Stephen Hemminger
2009-08-27 23:55 ` Stephen Hemminger [this message]
2009-08-27 23:55 ` [PATCH 03/14] pktgen: mark read-only/mostly variables Stephen Hemminger
2009-08-27 23:55 ` [PATCH 04/14] pktgen: stop_device cleanup Stephen Hemminger
2009-08-27 23:55 ` [PATCH 05/14] pktgen: xmit logic reorganization Stephen Hemminger
2009-08-27 23:55 ` [PATCH 06/14] pktgen: cleanup clone count test Stephen Hemminger
2009-08-27 23:55 ` [PATCH 07/14] pktgen: use netdev_alloc_skb Stephen Hemminger
2009-08-27 23:55 ` [PATCH 08/14] pktgen: reorganize transmit loop Stephen Hemminger
2009-08-28  3:52   ` Ben Greear
2009-08-28  5:49     ` Stephen Hemminger
2009-08-28 16:01       ` Ben Greear
2009-08-29  6:04       ` David Miller
2009-09-01 21:30         ` Stephen Hemminger
2009-09-02 13:06           ` Patrick McHardy
2009-08-27 23:55 ` [PATCH 09/14] pktgen: avoid calling gettimeofday Stephen Hemminger
2009-08-27 23:55 ` [PATCH 10/14] pktgen: convert to use ktime_t Stephen Hemminger
2009-08-27 23:55 ` [PATCH 11/14] pktgen: spin using hrtimer Stephen Hemminger
2009-08-27 23:55 ` [PATCH 12/14] pktgen: use common idle routine Stephen Hemminger
2009-08-27 23:55 ` [PATCH 13/14] pktgen: cleanup checkpatch warnings Stephen Hemminger
2009-08-27 23:55 ` [PATCH 14/14] pktgen: increase version Stephen Hemminger
2009-08-29  6:33 ` [PATCH 00/14] pktgen update for net-next (2.6.32) David Miller
2009-08-29  6:42   ` David Miller
2009-09-08 11:52 ` robert
2009-09-08 12:21   ` Jesper Dangaard Brouer
2009-09-08 15:41     ` robert
2009-09-09  7:53       ` Jesper Dangaard Brouer
2009-09-11 14:29         ` Jesper Dangaard Brouer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090827235705.258246781@vyatta.com \
    --to=shemminger@vyatta.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=robert.olsson@its.uu.se \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).