Skip to content

Commit

Permalink
Remove inline qualifier from functions in .c files
Browse files Browse the repository at this point in the history
Also remove now-unused function set_priority.
  • Loading branch information
johnousterhout committed Nov 15, 2024
1 parent 2f834c7 commit c672115
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 25 deletions.
4 changes: 2 additions & 2 deletions homa_grant.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion homa_offload.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
20 changes: 0 additions & 20 deletions homa_outgoing.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion homa_pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion homa_skb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit c672115

Please sign in to comment.