static void rxi_SendDebugPacket(struct rx_packet *apacket, osi_socket asocket,
afs_uint32 ahost, short aport,
afs_int32 istack);
+static struct rx_packet *rxi_AllocPacketNoLock(int class);
+
+#ifndef KERNEL
+static void rxi_MorePacketsNoLock(int apackets);
+#endif
#ifdef RX_ENABLE_TSFPQ
-static int
-rxi_FreeDataBufsTSFPQ(struct rx_packet *p, afs_uint32 first, int flush_global);
+static int rxi_FreeDataBufsTSFPQ(struct rx_packet *p, afs_uint32 first,
+ int flush_global);
+static void rxi_AdjustLocalPacketsTSFPQ(int num_keep_local,
+ int allow_overcommit);
#else
-static int rxi_FreeDataBufsToQueue(struct rx_packet *p,
- afs_uint32 first,
+static void rxi_FreePacketNoLock(struct rx_packet *p);
+static int rxi_FreeDataBufsNoLock(struct rx_packet *p, afs_uint32 first);
+static int rxi_FreeDataBufsToQueue(struct rx_packet *p, afs_uint32 first,
struct rx_queue * q);
#endif
#ifndef KERNEL
/* Add more packet buffers */
-void
+static void
rxi_MorePacketsNoLock(int apackets)
{
#ifdef RX_ENABLE_TSFPQ
}
#ifdef RX_ENABLE_TSFPQ
-void
+static void
rxi_AdjustLocalPacketsTSFPQ(int num_keep_local, int allow_overcommit)
{
struct rx_ts_info_t * rx_ts_info;
*/
/* Actually free the packet p. */
-#ifdef RX_ENABLE_TSFPQ
-void
-rxi_FreePacketNoLock(struct rx_packet *p)
-{
- struct rx_ts_info_t * rx_ts_info;
- dpf(("Free %"AFS_PTR_FMT"\n", p));
-
- RX_TS_INFO_GET(rx_ts_info);
- RX_TS_FPQ_CHECKIN(rx_ts_info,p);
- if (rx_ts_info->_FPQ.len > rx_TSFPQLocalMax) {
- RX_TS_FPQ_LTOG(rx_ts_info);
- }
-}
-#else /* RX_ENABLE_TSFPQ */
-void
+#ifndef RX_ENABLE_TSFPQ
+static void
rxi_FreePacketNoLock(struct rx_packet *p)
{
dpf(("Free %"AFS_PTR_FMT"\n", p));
#endif /* RX_ENABLE_TSFPQ */
#ifdef RX_ENABLE_TSFPQ
-void
+static void
rxi_FreePacketTSFPQ(struct rx_packet *p, int flush_global)
{
struct rx_ts_info_t * rx_ts_info;
return count;
}
-#endif
/*
* free packet continuation buffers into the global free packet pool
* returns:
* zero always
*/
-int
+static int
rxi_FreeDataBufsNoLock(struct rx_packet *p, afs_uint32 first)
{
struct iovec *iov;
return 0;
}
-#ifdef RX_ENABLE_TSFPQ
+#else
+
/*
* free packet continuation buffers into the thread-local free pool
*
* The header is absolutely necessary, besides, this is the way the
* length field is usually used */
#ifdef RX_ENABLE_TSFPQ
-struct rx_packet *
+static struct rx_packet *
rxi_AllocPacketNoLock(int class)
{
struct rx_packet *p;
return p;
}
#else /* RX_ENABLE_TSFPQ */
-struct rx_packet *
+static struct rx_packet *
rxi_AllocPacketNoLock(int class)
{
struct rx_packet *p;
#endif /* RX_ENABLE_TSFPQ */
#ifdef RX_ENABLE_TSFPQ
-struct rx_packet *
+static struct rx_packet *
rxi_AllocPacketTSFPQ(int class, int pull_global)
{
struct rx_packet *p;
extern int rxi_RoundUpPacket(struct rx_packet *p, unsigned int nb);
extern int rxi_AllocDataBuf(struct rx_packet *p, int nb, int cla_ss);
extern void rxi_MorePackets(int apackets);
-extern void rxi_MorePacketsNoLock(int apackets);
#if defined(AFS_PTHREAD_ENV)
extern void rxi_MorePacketsTSFPQ(int apackets, int flush_global, int num_keep_local); /* more flexible packet alloc function */
-extern void rxi_AdjustLocalPacketsTSFPQ(int num_keep_local, int allow_overcommit); /* adjust thread-local queue length, for places where we know how many packets we will need a priori */
extern void rxi_FlushLocalPacketsTSFPQ(void); /* flush all thread-local packets to global queue */
#endif
extern void rxi_FreeAllPackets(void);
extern void rx_CheckPackets(void);
-extern void rxi_FreePacketNoLock(struct rx_packet *p);
-extern int rxi_FreeDataBufsNoLock(struct rx_packet *p, afs_uint32 first);
extern void rxi_RestoreDataBufs(struct rx_packet *p);
extern int rxi_TrimDataBufs(struct rx_packet *p, int first);
extern void rxi_FreePacket(struct rx_packet *p);
-extern struct rx_packet *rxi_AllocPacketNoLock(int cla_ss);
extern struct rx_packet *rxi_AllocPacket(int cla_ss);
extern int rxi_AllocPackets(int cla_ss, int num_pkts, struct rx_queue *q);
extern int rxi_FreePackets(int num_pkts, struct rx_queue *q);