aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-08-27 09:55:08 -0400
committerDavid S. Miller <davem@davemloft.net>2009-08-29 02:31:47 -0400
commit475ac1e4099a005e1307c416df19f2100b7a838d (patch)
tree433b73676a18606fb871ef385d4423691f509f11 /net/core
parent648fda7404630ba85ce462ee1279e1bc027ad915 (diff)
pktgen: change inlining
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/pktgen.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index bb4631329b03..f96e9f090796 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -2438,7 +2438,7 @@ error:
2438 return err; 2438 return err;
2439} 2439}
2440 2440
2441static inline void free_SAs(struct pktgen_dev *pkt_dev) 2441static void free_SAs(struct pktgen_dev *pkt_dev)
2442{ 2442{
2443 if (pkt_dev->cflows) { 2443 if (pkt_dev->cflows) {
2444 /* let go of the SAs if we have them */ 2444 /* let go of the SAs if we have them */
@@ -2453,7 +2453,7 @@ static inline void free_SAs(struct pktgen_dev *pkt_dev)
2453 } 2453 }
2454} 2454}
2455 2455
2456static inline int process_ipsec(struct pktgen_dev *pkt_dev, 2456static int process_ipsec(struct pktgen_dev *pkt_dev,
2457 struct sk_buff *skb, __be16 protocol) 2457 struct sk_buff *skb, __be16 protocol)
2458{ 2458{
2459 if (pkt_dev->flags & F_IPSEC_ON) { 2459 if (pkt_dev->flags & F_IPSEC_ON) {
@@ -3029,8 +3029,8 @@ static struct sk_buff *fill_packet_ipv6(struct net_device *odev,
3029 return skb; 3029 return skb;
3030} 3030}
3031 3031
3032static inline struct sk_buff *fill_packet(struct net_device *odev, 3032static struct sk_buff *fill_packet(struct net_device *odev,
3033 struct pktgen_dev *pkt_dev) 3033 struct pktgen_dev *pkt_dev)
3034{ 3034{
3035 if (pkt_dev->flags & F_IPV6) 3035 if (pkt_dev->flags & F_IPV6)
3036 return fill_packet_ipv6(odev, pkt_dev); 3036 return fill_packet_ipv6(odev, pkt_dev);
@@ -3341,13 +3341,12 @@ static void pktgen_rem_thread(struct pktgen_thread *t)
3341 mutex_unlock(&pktgen_thread_lock); 3341 mutex_unlock(&pktgen_thread_lock);
3342} 3342}
3343 3343
3344static __inline__ void pktgen_xmit(struct pktgen_dev *pkt_dev) 3344static void pktgen_xmit(struct pktgen_dev *pkt_dev)
3345{ 3345{
3346 struct net_device *odev = pkt_dev->odev; 3346 struct net_device *odev = pkt_dev->odev;
3347 int (*xmit)(struct sk_buff *, struct net_device *) 3347 int (*xmit)(struct sk_buff *, struct net_device *)
3348 = odev->netdev_ops->ndo_start_xmit; 3348 = odev->netdev_ops->ndo_start_xmit;
3349 struct netdev_queue *txq; 3349 struct netdev_queue *txq;
3350 __u64 idle_start = 0;
3351 u16 queue_map; 3350 u16 queue_map;
3352 int ret; 3351 int ret;
3353 3352
@@ -3379,7 +3378,7 @@ static __inline__ void pktgen_xmit(struct pktgen_dev *pkt_dev)
3379 if (netif_tx_queue_stopped(txq) || 3378 if (netif_tx_queue_stopped(txq) ||
3380 netif_tx_queue_frozen(txq) || 3379 netif_tx_queue_frozen(txq) ||
3381 need_resched()) { 3380 need_resched()) {
3382 idle_start = getCurUs(); 3381 u64 idle_start = getCurUs();
3383 3382
3384 if (!netif_running(odev)) { 3383 if (!netif_running(odev)) {
3385 pktgen_stop_device(pkt_dev); 3384 pktgen_stop_device(pkt_dev);
@@ -3475,7 +3474,7 @@ static __inline__ void pktgen_xmit(struct pktgen_dev *pkt_dev)
3475 /* If pkt_dev->count is zero, then run forever */ 3474 /* If pkt_dev->count is zero, then run forever */
3476 if ((pkt_dev->count != 0) && (pkt_dev->sofar >= pkt_dev->count)) { 3475 if ((pkt_dev->count != 0) && (pkt_dev->sofar >= pkt_dev->count)) {
3477 if (atomic_read(&(pkt_dev->skb->users)) != 1) { 3476 if (atomic_read(&(pkt_dev->skb->users)) != 1) {
3478 idle_start = getCurUs(); 3477 u64 idle_start = getCurUs();
3479 while (atomic_read(&(pkt_dev->skb->users)) != 1) { 3478 while (atomic_read(&(pkt_dev->skb->users)) != 1) {
3480 if (signal_pending(current)) { 3479 if (signal_pending(current)) {
3481 break; 3480 break;