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>
This commit is contained in:
parent
648fda7404
commit
475ac1e409
|
@ -2438,7 +2438,7 @@ error:
|
||||||
return err;
|
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) {
|
if (pkt_dev->cflows) {
|
||||||
/* let go of the SAs if we have them */
|
/* let go of the SAs if we have them */
|
||||||
|
@ -2453,7 +2453,7 @@ static inline void free_SAs(struct pktgen_dev *pkt_dev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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)
|
struct sk_buff *skb, __be16 protocol)
|
||||||
{
|
{
|
||||||
if (pkt_dev->flags & F_IPSEC_ON) {
|
if (pkt_dev->flags & F_IPSEC_ON) {
|
||||||
|
@ -3029,7 +3029,7 @@ static struct sk_buff *fill_packet_ipv6(struct net_device *odev,
|
||||||
return skb;
|
return skb;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct sk_buff *fill_packet(struct net_device *odev,
|
static struct sk_buff *fill_packet(struct net_device *odev,
|
||||||
struct pktgen_dev *pkt_dev)
|
struct pktgen_dev *pkt_dev)
|
||||||
{
|
{
|
||||||
if (pkt_dev->flags & F_IPV6)
|
if (pkt_dev->flags & F_IPV6)
|
||||||
|
@ -3341,13 +3341,12 @@ static void pktgen_rem_thread(struct pktgen_thread *t)
|
||||||
mutex_unlock(&pktgen_thread_lock);
|
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;
|
struct net_device *odev = pkt_dev->odev;
|
||||||
int (*xmit)(struct sk_buff *, struct net_device *)
|
int (*xmit)(struct sk_buff *, struct net_device *)
|
||||||
= odev->netdev_ops->ndo_start_xmit;
|
= odev->netdev_ops->ndo_start_xmit;
|
||||||
struct netdev_queue *txq;
|
struct netdev_queue *txq;
|
||||||
__u64 idle_start = 0;
|
|
||||||
u16 queue_map;
|
u16 queue_map;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
@ -3379,7 +3378,7 @@ static __inline__ void pktgen_xmit(struct pktgen_dev *pkt_dev)
|
||||||
if (netif_tx_queue_stopped(txq) ||
|
if (netif_tx_queue_stopped(txq) ||
|
||||||
netif_tx_queue_frozen(txq) ||
|
netif_tx_queue_frozen(txq) ||
|
||||||
need_resched()) {
|
need_resched()) {
|
||||||
idle_start = getCurUs();
|
u64 idle_start = getCurUs();
|
||||||
|
|
||||||
if (!netif_running(odev)) {
|
if (!netif_running(odev)) {
|
||||||
pktgen_stop_device(pkt_dev);
|
pktgen_stop_device(pkt_dev);
|
||||||
|
@ -3475,7 +3474,7 @@ static __inline__ void pktgen_xmit(struct pktgen_dev *pkt_dev)
|
||||||
/* If pkt_dev->count is zero, then run forever */
|
/* If pkt_dev->count is zero, then run forever */
|
||||||
if ((pkt_dev->count != 0) && (pkt_dev->sofar >= pkt_dev->count)) {
|
if ((pkt_dev->count != 0) && (pkt_dev->sofar >= pkt_dev->count)) {
|
||||||
if (atomic_read(&(pkt_dev->skb->users)) != 1) {
|
if (atomic_read(&(pkt_dev->skb->users)) != 1) {
|
||||||
idle_start = getCurUs();
|
u64 idle_start = getCurUs();
|
||||||
while (atomic_read(&(pkt_dev->skb->users)) != 1) {
|
while (atomic_read(&(pkt_dev->skb->users)) != 1) {
|
||||||
if (signal_pending(current)) {
|
if (signal_pending(current)) {
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue