summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2018-10-15 22:14:52 +0300
committerDan McDonald <danmcd@joyent.com>2018-11-09 10:07:54 -0500
commit7ec6bfcf4280022b95218f03e28fb50217e4b6ff (patch)
tree05294dc8859bd218f3b63cd5b1546983b864c336
parent124619e5421ff751660c822c15c320ddf7800a5a (diff)
downloadillumos-gate-7ec6bfcf4280022b95218f03e28fb50217e4b6ff.tar.gz
9902 mac: mac_soft_ring_poll should use size_t
Reviewed by: Yuri Pankov <yuripv@yuripv.net> Reviewed by: Andy Fiddaman <andy@omniosce.org> Reviewed by: Dan McDonald <danmcd@joyent.com> Reviewed by: Ryan Zezeski <ryan.zeseski@joyent.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/uts/common/io/mac/mac_soft_ring.c16
-rw-r--r--usr/src/uts/common/sys/mac.h4
-rw-r--r--usr/src/uts/common/sys/mac_soft_ring.h16
3 files changed, 18 insertions, 18 deletions
diff --git a/usr/src/uts/common/io/mac/mac_soft_ring.c b/usr/src/uts/common/io/mac/mac_soft_ring.c
index 2e056c8a2e..dc8cfdd145 100644
--- a/usr/src/uts/common/io/mac/mac_soft_ring.c
+++ b/usr/src/uts/common/io/mac/mac_soft_ring.c
@@ -152,8 +152,8 @@ mac_soft_ring_create(int id, clock_t wait, uint16_t type,
processorid_t cpuid, mac_direct_rx_t rx_func, void *x_arg1,
mac_resource_handle_t x_arg2)
{
- mac_soft_ring_t *ringp;
- char name[S_RING_NAMELEN];
+ mac_soft_ring_t *ringp;
+ char name[S_RING_NAMELEN];
bzero(name, 64);
ringp = kmem_cache_alloc(mac_soft_ring_cache, KM_SLEEP);
@@ -354,7 +354,7 @@ mac_rx_soft_ring_drain(mac_soft_ring_t *ringp)
mblk_t *mp;
void *arg1;
mac_resource_handle_t arg2;
- timeout_id_t tid;
+ timeout_id_t tid;
mac_direct_rx_t proc;
size_t sz;
int cnt;
@@ -536,7 +536,7 @@ mac_soft_ring_intr_disable(void *arg)
* setup.
*/
mblk_t *
-mac_soft_ring_poll(mac_soft_ring_t *ringp, int bytes_to_pickup)
+mac_soft_ring_poll(mac_soft_ring_t *ringp, size_t bytes_to_pickup)
{
mblk_t *head, *tail;
mblk_t *mp;
@@ -648,10 +648,10 @@ mac_soft_ring_signal(mac_soft_ring_t *softring, uint_t sr_flag)
static void
mac_tx_soft_ring_drain(mac_soft_ring_t *ringp)
{
- mblk_t *mp;
- void *arg1;
- void *arg2;
- mblk_t *tail;
+ mblk_t *mp;
+ void *arg1;
+ void *arg2;
+ mblk_t *tail;
uint_t saved_pkt_count, saved_size;
mac_tx_stats_t stats;
mac_soft_ring_set_t *mac_srs = ringp->s_ring_set;
diff --git a/usr/src/uts/common/sys/mac.h b/usr/src/uts/common/sys/mac.h
index f3e22d660c..0907d6deff 100644
--- a/usr/src/uts/common/sys/mac.h
+++ b/usr/src/uts/common/sys/mac.h
@@ -397,7 +397,7 @@ typedef enum {
typedef void (*mac_notify_t)(void *, mac_notify_type_t);
typedef void (*mac_rx_t)(void *, mac_resource_handle_t, mblk_t *,
boolean_t);
-typedef mblk_t *(*mac_receive_t)(void *, int);
+typedef mblk_t *(*mac_receive_t)(void *, size_t);
/*
* MAC resource types
@@ -634,7 +634,7 @@ extern uint_t mac_addr_len(mac_handle_t);
extern int mac_type(mac_handle_t);
extern int mac_nativetype(mac_handle_t);
-extern void mac_unicst_update(mac_handle_t,
+extern void mac_unicst_update(mac_handle_t,
const uint8_t *);
extern void mac_capab_update(mac_handle_t);
extern int mac_pdata_update(mac_handle_t, void *,
diff --git a/usr/src/uts/common/sys/mac_soft_ring.h b/usr/src/uts/common/sys/mac_soft_ring.h
index e96c41ae91..581e18d06e 100644
--- a/usr/src/uts/common/sys/mac_soft_ring.h
+++ b/usr/src/uts/common/sys/mac_soft_ring.h
@@ -183,7 +183,7 @@ typedef struct mac_srs_rx_s {
*/
mac_direct_rx_t sr_func; /* srs_lock */
void *sr_arg1; /* srs_lock */
- mac_resource_handle_t sr_arg2; /* srs_lock */
+ mac_resource_handle_t sr_arg2; /* srs_lock */
mac_rx_func_t sr_lower_proc; /* Atomically changed */
uint32_t sr_poll_pkt_cnt;
uint32_t sr_poll_thres;
@@ -386,7 +386,7 @@ struct mac_soft_ring_set_s {
/*
* type flags - combination allowed to process and drain the queue
*/
-#define ST_RING_WORKER_ONLY 0x0001 /* Worker thread only */
+#define ST_RING_WORKER_ONLY 0x0001 /* Worker thread only */
#define ST_RING_ANY 0x0002 /* Any thread can process the queue */
#define ST_RING_TCP 0x0004
#define ST_RING_UDP 0x0008
@@ -540,7 +540,7 @@ extern struct dls_kstats dls_kstat;
}
#define MAC_COUNT_CHAIN(mac_srs, head, tail, cnt, sz) { \
- mblk_t *tmp; \
+ mblk_t *tmp; \
boolean_t bw_ctl = B_FALSE; \
\
ASSERT((head) != NULL); \
@@ -579,12 +579,12 @@ extern struct dls_kstats dls_kstat;
ASSERT(MUTEX_HELD(&(mac_srs)->srs_lock)); \
\
srs_rx->sr_poll_pkt_cnt -= cnt; \
- if ((srs_rx->sr_poll_pkt_cnt <= srs_rx->sr_poll_thres) && \
- (((mac_srs)->srs_state & \
- (SRS_POLLING|SRS_PROC|SRS_GET_PKTS)) == SRS_POLLING)) \
+ if ((srs_rx->sr_poll_pkt_cnt <= srs_rx->sr_poll_thres) && \
+ (((mac_srs)->srs_state & \
+ (SRS_POLLING|SRS_PROC|SRS_GET_PKTS)) == SRS_POLLING)) \
{ \
(mac_srs)->srs_state |= (SRS_PROC|SRS_GET_PKTS); \
- cv_signal(&(mac_srs)->srs_cv); \
+ cv_signal(&(mac_srs)->srs_cv); \
srs_rx->sr_below_hiwat++; \
} \
}
@@ -639,7 +639,7 @@ extern void mac_fanout_setup(mac_client_impl_t *, flow_entry_t *,
extern void mac_soft_ring_worker_wakeup(mac_soft_ring_t *);
extern void mac_soft_ring_blank(void *, time_t, uint_t, int);
-extern mblk_t *mac_soft_ring_poll(mac_soft_ring_t *, int);
+extern mblk_t *mac_soft_ring_poll(mac_soft_ring_t *, size_t);
extern void mac_soft_ring_destroy(mac_soft_ring_t *);
extern void mac_soft_ring_dls_bypass(void *, mac_direct_rx_t, void *);