- Matthew's changes to get inlines out, plus a few of my own

to deal with the VRF inline function -> becomes a macro now.
Submitted by:	Matthew Jacobs
This commit is contained in:
Randall Stewart 2007-06-16 00:33:47 +00:00
parent dde4978ffe
commit 72fb6fdb41
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=170806
6 changed files with 20 additions and 23 deletions

View file

@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$");
#endif /* SCTP_DEBUG */
inline void
void
sctp_clear_chunklist(sctp_auth_chklist_t * chklist)
{
bzero(chklist, sizeof(*chklist));
@ -146,7 +146,7 @@ sctp_auth_delete_chunk(uint8_t chunk, sctp_auth_chklist_t * list)
return (0);
}
inline size_t
size_t
sctp_auth_get_chklist_size(const sctp_auth_chklist_t * list)
{
if (list == NULL)
@ -314,7 +314,7 @@ sctp_show_key(sctp_key_t * key, const char *str)
}
}
static inline uint32_t
static uint32_t
sctp_get_keylen(sctp_key_t * key)
{
if (key != NULL)
@ -804,7 +804,7 @@ sctp_free_authinfo(sctp_authinfo_t * authinfo)
}
inline uint32_t
uint32_t
sctp_get_auth_chunk_len(uint16_t hmac_algo)
{
int size;

View file

@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$");
* the list.
*/
__inline void
void
sctp_set_rwnd(struct sctp_tcb *stcb, struct sctp_association *asoc)
{
uint32_t calc, calc_w_oh;
@ -116,7 +116,7 @@ sctp_set_rwnd(struct sctp_tcb *stcb, struct sctp_association *asoc)
/* Calculate what the rwnd would be */
__inline uint32_t
uint32_t
sctp_calc_rwnd(struct sctp_tcb *stcb, struct sctp_association *asoc)
{
uint32_t calc = 0, calc_w_oh;
@ -3846,7 +3846,7 @@ sctp_hs_cwnd_decrease(struct sctp_tcb *stcb, struct sctp_nets *net)
#endif
static __inline void
static void
sctp_cwnd_update(struct sctp_tcb *stcb,
struct sctp_association *asoc,
int accum_moved, int reneged_all, int will_exit)

View file

@ -4387,7 +4387,7 @@ __attribute__((noinline))
* Process the ECN bits we have something set so we must look to see if it is
* ECN(0) or ECN(1) or CE
*/
static __inline void
static void
sctp_process_ecn_marked_a(struct sctp_tcb *stcb, struct sctp_nets *net,
uint8_t ecn_bits)
{
@ -4426,7 +4426,7 @@ sctp_process_ecn_marked_a(struct sctp_tcb *stcb, struct sctp_nets *net,
}
}
static __inline void
static void
sctp_process_ecn_marked_b(struct sctp_tcb *stcb, struct sctp_nets *net,
uint32_t high_tsn, uint8_t ecn_bits)
{

View file

@ -323,12 +323,9 @@ typedef struct callout sctp_os_timer_t;
#define SCTP_RELEASE_HEADER(m)
#define SCTP_RELEASE_PKT(m) sctp_m_freem(m)
static inline int
SCTP_GET_PKT_VRFID(void *m, uint32_t vrf_id)
{
vrf_id = SCTP_DEFAULT_VRFID;
return (0);
}
#define SCTP_GET_PKT_VRFID(m, vrf_id) ((vrf_id = SCTP_DEFAULT_VRFID) != SCTP_DEFAULT_VRFID)
/* Attach the chain of data into the sendable packet. */
#define SCTP_ATTACH_CHAIN(pak, m, packet_length) do { \

View file

@ -3166,7 +3166,7 @@ sctp_add_cookie(struct sctp_inpcb *inp, struct mbuf *init, int init_offset,
}
static __inline uint8_t
static uint8_t
sctp_get_ect(struct sctp_tcb *stcb,
struct sctp_tmit_chunk *chk)
{
@ -5215,7 +5215,7 @@ sctp_prune_prsctp(struct sctp_tcb *stcb,
} /* if enabled in asoc */
}
__inline int
int
sctp_get_frag_point(struct sctp_tcb *stcb,
struct sctp_association *asoc)
{
@ -5920,7 +5920,7 @@ sctp_toss_old_asconf(struct sctp_tcb *stcb)
}
static __inline void
static void
sctp_clean_up_datalist(struct sctp_tcb *stcb,
struct sctp_association *asoc,
@ -6009,7 +6009,7 @@ sctp_clean_up_datalist(struct sctp_tcb *stcb,
}
}
static __inline void
static void
sctp_clean_up_ctl(struct sctp_tcb *stcb, struct sctp_association *asoc)
{
struct sctp_tmit_chunk *chk, *nchk;
@ -6047,7 +6047,7 @@ sctp_clean_up_ctl(struct sctp_tcb *stcb, struct sctp_association *asoc)
}
static __inline int
static int
sctp_can_we_split_this(struct sctp_tcb *stcb,
struct sctp_stream_queue_pending *sp,
uint32_t goal_mtu, uint32_t frag_point, int eeor_on)
@ -6673,7 +6673,7 @@ sctp_fill_outqueue(struct sctp_tcb *stcb,
}
}
__inline void
void
sctp_fix_ecn_echo(struct sctp_association *asoc)
{
struct sctp_tmit_chunk *chk;

View file

@ -2590,7 +2590,7 @@ sctp_calculate_rto(struct sctp_tcb *stcb,
* one mbuf, a copy is made at 'ptr'. caller must ensure that the buffer size
* is >= 'len' returns NULL if there there isn't 'len' bytes in the chain.
*/
__inline caddr_t
caddr_t
sctp_m_getptr(struct mbuf *m, int off, int len, uint8_t * in_ptr)
{
uint32_t count;
@ -3805,7 +3805,7 @@ sctp_recover_scope(struct sockaddr_in6 *addr, struct sockaddr_in6 *store)
* are the two addresses the same? currently a "scopeless" check returns: 1
* if same, 0 if not
*/
__inline int
int
sctp_cmpaddr(struct sockaddr *sa1, struct sockaddr *sa2)
{