From c672115f5d069ed32d5c5eef55de01abfcba97a3 Mon Sep 17 00:00:00 2001 From: John Ousterhout Date: Sat, 2 Nov 2024 13:44:44 -0700 Subject: [PATCH] Remove inline qualifier from functions in .c files Also remove now-unused function set_priority. --- homa_grant.c | 4 ++-- homa_offload.c | 2 +- homa_outgoing.c | 20 -------------------- homa_pool.c | 2 +- homa_skb.c | 2 +- 5 files changed, 5 insertions(+), 25 deletions(-) diff --git a/homa_grant.c b/homa_grant.c index d540b16..e799579 100644 --- a/homa_grant.c +++ b/homa_grant.c @@ -17,7 +17,7 @@ * @rpc1: First RPC to consider. * @rpc2: Second RPC to consider. */ -inline int homa_grant_outranks(struct homa_rpc *rpc1, struct homa_rpc *rpc2) +int homa_grant_outranks(struct homa_rpc *rpc1, struct homa_rpc *rpc2) { /* Fewest bytes remaining is the primary criterion; if those are * equal, then favor the older RPC. @@ -41,7 +41,7 @@ inline int homa_grant_outranks(struct homa_rpc *rpc1, struct homa_rpc *rpc2) * may be possible to send out additional grants to some RPCs (doing * this is left to the caller). */ -inline int homa_grant_update_incoming(struct homa_rpc *rpc, struct homa *homa) +int homa_grant_update_incoming(struct homa_rpc *rpc, struct homa *homa) { int incoming = rpc->msgin.granted - (rpc->msgin.length - rpc->msgin.bytes_remaining); diff --git a/homa_offload.c b/homa_offload.c index f9f6b18..174d946 100644 --- a/homa_offload.c +++ b/homa_offload.c @@ -160,7 +160,7 @@ struct sk_buff *homa_tcp_gro_receive(struct list_head *held_list, * @cpu: Index of core to which the packet should be directed for * SoftIRQ processing. */ -static inline void homa_set_softirq_cpu(struct sk_buff *skb, int cpu) +static void homa_set_softirq_cpu(struct sk_buff *skb, int cpu) { struct rps_sock_flow_table *sock_flow_table; int hash; diff --git a/homa_outgoing.c b/homa_outgoing.c index bd5b272..e3410a2 100644 --- a/homa_outgoing.c +++ b/homa_outgoing.c @@ -10,26 +10,6 @@ #include "homa_skb.h" #include "homa_wire.h" -/** - * set_priority() - Arrange for an outgoing packet to have a particular - * priority level. - * @skb: The packet was priority should be set. - * @hsk: Socket on which the packet will be sent. - * @priority: Priority level for the packet; must be less than - * HOMA_MAX_PRIORITIES. - */ -static inline void set_priority(struct sk_buff *skb, struct homa_sock *hsk, - int priority) -{ - /* Note: this code initially specified the priority in the VLAN - * header, but as of 3/2020, this performed badly on the CloudLab - * cluster being used for testing: 100 us of extra delay occurred - * whenever a packet's VLAN priority differed from the previous - * packet. So, now we use the DSCP field in the IP header instead. - */ - hsk->inet.tos = hsk->homa->priority_map[priority]<<5; -} - /** * homa_message_out_init() - Initialize rpc->msgout. * @rpc: RPC whose output message should be initialized. diff --git a/homa_pool.c b/homa_pool.c index fe809b8..89d313d 100644 --- a/homa_pool.c +++ b/homa_pool.c @@ -31,7 +31,7 @@ * The caller must own the lock for @pool->hsk. * @pool: Pool to update. */ -static inline void set_bpages_needed(struct homa_pool *pool) +static void set_bpages_needed(struct homa_pool *pool) { struct homa_rpc *rpc = list_first_entry(&pool->hsk->waiting_for_bufs, struct homa_rpc, buf_links); diff --git a/homa_skb.c b/homa_skb.c index d06262b..dede213 100644 --- a/homa_skb.c +++ b/homa_skb.c @@ -17,7 +17,7 @@ extern int mock_max_skb_frags; #define HOMA_MAX_SKB_FRAGS MAX_SKB_FRAGS #endif -static inline void frag_page_set(skb_frag_t *frag, struct page *page) +static void frag_page_set(skb_frag_t *frag, struct page *page) { frag->netmem = page_to_netmem(page); }