diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2008-09-01 07:47:12 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-09-03 09:53:45 -0400 |
commit | 4d566063a799231b99d9a21128634ea78b89ab72 (patch) | |
tree | b1d55d0c266b27f2438aec5888abd30c02749e59 /drivers/net/sfc/tx.c | |
parent | 23d9e60b1ddc67ffedd77161ecff4895708088a4 (diff) |
sfc: Removed forced inlining of long functions
gcc will automatically inline static functions with only one caller, and
may inline other functions depending on the kernel configuration and size
of the intermediate code.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/sfc/tx.c')
-rw-r--r-- | drivers/net/sfc/tx.c | 47 |
1 files changed, 23 insertions, 24 deletions
diff --git a/drivers/net/sfc/tx.c b/drivers/net/sfc/tx.c index 550856fab16..0e9889ca68f 100644 --- a/drivers/net/sfc/tx.c +++ b/drivers/net/sfc/tx.c | |||
@@ -47,7 +47,7 @@ void efx_stop_queue(struct efx_nic *efx) | |||
47 | * We want to be able to nest calls to netif_stop_queue(), since each | 47 | * We want to be able to nest calls to netif_stop_queue(), since each |
48 | * channel can have an individual stop on the queue. | 48 | * channel can have an individual stop on the queue. |
49 | */ | 49 | */ |
50 | inline void efx_wake_queue(struct efx_nic *efx) | 50 | void efx_wake_queue(struct efx_nic *efx) |
51 | { | 51 | { |
52 | local_bh_disable(); | 52 | local_bh_disable(); |
53 | if (atomic_dec_and_lock(&efx->netif_stop_count, | 53 | if (atomic_dec_and_lock(&efx->netif_stop_count, |
@@ -59,8 +59,8 @@ inline void efx_wake_queue(struct efx_nic *efx) | |||
59 | local_bh_enable(); | 59 | local_bh_enable(); |
60 | } | 60 | } |
61 | 61 | ||
62 | static inline void efx_dequeue_buffer(struct efx_tx_queue *tx_queue, | 62 | static void efx_dequeue_buffer(struct efx_tx_queue *tx_queue, |
63 | struct efx_tx_buffer *buffer) | 63 | struct efx_tx_buffer *buffer) |
64 | { | 64 | { |
65 | if (buffer->unmap_len) { | 65 | if (buffer->unmap_len) { |
66 | struct pci_dev *pci_dev = tx_queue->efx->pci_dev; | 66 | struct pci_dev *pci_dev = tx_queue->efx->pci_dev; |
@@ -110,8 +110,8 @@ static void efx_fini_tso(struct efx_tx_queue *tx_queue); | |||
110 | static void efx_tsoh_heap_free(struct efx_tx_queue *tx_queue, | 110 | static void efx_tsoh_heap_free(struct efx_tx_queue *tx_queue, |
111 | struct efx_tso_header *tsoh); | 111 | struct efx_tso_header *tsoh); |
112 | 112 | ||
113 | static inline void efx_tsoh_free(struct efx_tx_queue *tx_queue, | 113 | static void efx_tsoh_free(struct efx_tx_queue *tx_queue, |
114 | struct efx_tx_buffer *buffer) | 114 | struct efx_tx_buffer *buffer) |
115 | { | 115 | { |
116 | if (buffer->tsoh) { | 116 | if (buffer->tsoh) { |
117 | if (likely(!buffer->tsoh->unmap_len)) { | 117 | if (likely(!buffer->tsoh->unmap_len)) { |
@@ -138,8 +138,8 @@ static inline void efx_tsoh_free(struct efx_tx_queue *tx_queue, | |||
138 | * Returns NETDEV_TX_OK or NETDEV_TX_BUSY | 138 | * Returns NETDEV_TX_OK or NETDEV_TX_BUSY |
139 | * You must hold netif_tx_lock() to call this function. | 139 | * You must hold netif_tx_lock() to call this function. |
140 | */ | 140 | */ |
141 | static inline int efx_enqueue_skb(struct efx_tx_queue *tx_queue, | 141 | static int efx_enqueue_skb(struct efx_tx_queue *tx_queue, |
142 | const struct sk_buff *skb) | 142 | const struct sk_buff *skb) |
143 | { | 143 | { |
144 | struct efx_nic *efx = tx_queue->efx; | 144 | struct efx_nic *efx = tx_queue->efx; |
145 | struct pci_dev *pci_dev = efx->pci_dev; | 145 | struct pci_dev *pci_dev = efx->pci_dev; |
@@ -305,8 +305,8 @@ static inline int efx_enqueue_skb(struct efx_tx_queue *tx_queue, | |||
305 | * This removes packets from the TX queue, up to and including the | 305 | * This removes packets from the TX queue, up to and including the |
306 | * specified index. | 306 | * specified index. |
307 | */ | 307 | */ |
308 | static inline void efx_dequeue_buffers(struct efx_tx_queue *tx_queue, | 308 | static void efx_dequeue_buffers(struct efx_tx_queue *tx_queue, |
309 | unsigned int index) | 309 | unsigned int index) |
310 | { | 310 | { |
311 | struct efx_nic *efx = tx_queue->efx; | 311 | struct efx_nic *efx = tx_queue->efx; |
312 | unsigned int stop_index, read_ptr; | 312 | unsigned int stop_index, read_ptr; |
@@ -578,7 +578,7 @@ struct tso_state { | |||
578 | * Verify that our various assumptions about sk_buffs and the conditions | 578 | * Verify that our various assumptions about sk_buffs and the conditions |
579 | * under which TSO will be attempted hold true. | 579 | * under which TSO will be attempted hold true. |
580 | */ | 580 | */ |
581 | static inline void efx_tso_check_safe(const struct sk_buff *skb) | 581 | static void efx_tso_check_safe(const struct sk_buff *skb) |
582 | { | 582 | { |
583 | EFX_BUG_ON_PARANOID(skb->protocol != htons(ETH_P_IP)); | 583 | EFX_BUG_ON_PARANOID(skb->protocol != htons(ETH_P_IP)); |
584 | EFX_BUG_ON_PARANOID(((struct ethhdr *)skb->data)->h_proto != | 584 | EFX_BUG_ON_PARANOID(((struct ethhdr *)skb->data)->h_proto != |
@@ -772,8 +772,8 @@ static int efx_tx_queue_insert(struct efx_tx_queue *tx_queue, | |||
772 | * a single fragment, and we know it doesn't cross a page boundary. It | 772 | * a single fragment, and we know it doesn't cross a page boundary. It |
773 | * also allows us to not worry about end-of-packet etc. | 773 | * also allows us to not worry about end-of-packet etc. |
774 | */ | 774 | */ |
775 | static inline void efx_tso_put_header(struct efx_tx_queue *tx_queue, | 775 | static void efx_tso_put_header(struct efx_tx_queue *tx_queue, |
776 | struct efx_tso_header *tsoh, unsigned len) | 776 | struct efx_tso_header *tsoh, unsigned len) |
777 | { | 777 | { |
778 | struct efx_tx_buffer *buffer; | 778 | struct efx_tx_buffer *buffer; |
779 | 779 | ||
@@ -826,7 +826,7 @@ static void efx_enqueue_unwind(struct efx_tx_queue *tx_queue) | |||
826 | 826 | ||
827 | 827 | ||
828 | /* Parse the SKB header and initialise state. */ | 828 | /* Parse the SKB header and initialise state. */ |
829 | static inline void tso_start(struct tso_state *st, const struct sk_buff *skb) | 829 | static void tso_start(struct tso_state *st, const struct sk_buff *skb) |
830 | { | 830 | { |
831 | /* All ethernet/IP/TCP headers combined size is TCP header size | 831 | /* All ethernet/IP/TCP headers combined size is TCP header size |
832 | * plus offset of TCP header relative to start of packet. | 832 | * plus offset of TCP header relative to start of packet. |
@@ -848,8 +848,8 @@ static inline void tso_start(struct tso_state *st, const struct sk_buff *skb) | |||
848 | st->unmap_single = false; | 848 | st->unmap_single = false; |
849 | } | 849 | } |
850 | 850 | ||
851 | static inline int tso_get_fragment(struct tso_state *st, struct efx_nic *efx, | 851 | static int tso_get_fragment(struct tso_state *st, struct efx_nic *efx, |
852 | skb_frag_t *frag) | 852 | skb_frag_t *frag) |
853 | { | 853 | { |
854 | st->unmap_addr = pci_map_page(efx->pci_dev, frag->page, | 854 | st->unmap_addr = pci_map_page(efx->pci_dev, frag->page, |
855 | frag->page_offset, frag->size, | 855 | frag->page_offset, frag->size, |
@@ -864,9 +864,8 @@ static inline int tso_get_fragment(struct tso_state *st, struct efx_nic *efx, | |||
864 | return -ENOMEM; | 864 | return -ENOMEM; |
865 | } | 865 | } |
866 | 866 | ||
867 | static inline int | 867 | static int tso_get_head_fragment(struct tso_state *st, struct efx_nic *efx, |
868 | tso_get_head_fragment(struct tso_state *st, struct efx_nic *efx, | 868 | const struct sk_buff *skb) |
869 | const struct sk_buff *skb) | ||
870 | { | 869 | { |
871 | int hl = st->header_len; | 870 | int hl = st->header_len; |
872 | int len = skb_headlen(skb) - hl; | 871 | int len = skb_headlen(skb) - hl; |
@@ -894,9 +893,9 @@ tso_get_head_fragment(struct tso_state *st, struct efx_nic *efx, | |||
894 | * of fragment or end-of-packet. Return 0 on success, 1 if not enough | 893 | * of fragment or end-of-packet. Return 0 on success, 1 if not enough |
895 | * space in @tx_queue. | 894 | * space in @tx_queue. |
896 | */ | 895 | */ |
897 | static inline int tso_fill_packet_with_fragment(struct efx_tx_queue *tx_queue, | 896 | static int tso_fill_packet_with_fragment(struct efx_tx_queue *tx_queue, |
898 | const struct sk_buff *skb, | 897 | const struct sk_buff *skb, |
899 | struct tso_state *st) | 898 | struct tso_state *st) |
900 | { | 899 | { |
901 | struct efx_tx_buffer *buffer; | 900 | struct efx_tx_buffer *buffer; |
902 | int n, end_of_packet, rc; | 901 | int n, end_of_packet, rc; |
@@ -946,9 +945,9 @@ static inline int tso_fill_packet_with_fragment(struct efx_tx_queue *tx_queue, | |||
946 | * Generate a new header and prepare for the new packet. Return 0 on | 945 | * Generate a new header and prepare for the new packet. Return 0 on |
947 | * success, or -1 if failed to alloc header. | 946 | * success, or -1 if failed to alloc header. |
948 | */ | 947 | */ |
949 | static inline int tso_start_new_packet(struct efx_tx_queue *tx_queue, | 948 | static int tso_start_new_packet(struct efx_tx_queue *tx_queue, |
950 | const struct sk_buff *skb, | 949 | const struct sk_buff *skb, |
951 | struct tso_state *st) | 950 | struct tso_state *st) |
952 | { | 951 | { |
953 | struct efx_tso_header *tsoh; | 952 | struct efx_tso_header *tsoh; |
954 | struct iphdr *tsoh_iph; | 953 | struct iphdr *tsoh_iph; |