fix some signed/unsigned warnings in the netmap code.
Unfortunately the original drivers still have a lot of sign conversion/comparison warnings.
This commit is contained in:
parent
705abad18c
commit
d1235033a6
@ -171,7 +171,7 @@ em_netmap_txsync(struct ifnet *ifp, u_int ring_nr, int do_lock)
|
||||
u_int j, k, l, n = 0, lim = kring->nkr_num_slots - 1;
|
||||
|
||||
/* generate an interrupt approximately every half ring */
|
||||
int report_frequency = kring->nkr_num_slots >> 1;
|
||||
u_int report_frequency = kring->nkr_num_slots >> 1;
|
||||
|
||||
k = ring->cur;
|
||||
if (k > lim)
|
||||
|
@ -125,7 +125,7 @@ igb_netmap_txsync(struct ifnet *ifp, u_int ring_nr, int do_lock)
|
||||
u_int j, k, l, n = 0, lim = kring->nkr_num_slots - 1;
|
||||
|
||||
/* generate an interrupt approximately every half ring */
|
||||
int report_frequency = kring->nkr_num_slots >> 1;
|
||||
u_int report_frequency = kring->nkr_num_slots >> 1;
|
||||
|
||||
k = ring->cur;
|
||||
if (k > lim)
|
||||
|
@ -233,7 +233,7 @@ ixgbe_netmap_txsync(struct ifnet *ifp, u_int ring_nr, int do_lock)
|
||||
* seems very expensive, so we interrupt once every half ring,
|
||||
* or when requested with NS_REPORT
|
||||
*/
|
||||
int report_frequency = kring->nkr_num_slots >> 1;
|
||||
u_int report_frequency = kring->nkr_num_slots >> 1;
|
||||
|
||||
if (k > lim)
|
||||
return netmap_ring_reinit(kring);
|
||||
|
@ -119,8 +119,8 @@ SYSCTL_INT(_dev_netmap, OID_AUTO, verbose,
|
||||
CTLFLAG_RW, &netmap_verbose, 0, "Verbose mode");
|
||||
SYSCTL_INT(_dev_netmap, OID_AUTO, no_timestamp,
|
||||
CTLFLAG_RW, &netmap_no_timestamp, 0, "no_timestamp");
|
||||
int netmap_buf_size = 2048;
|
||||
TUNABLE_INT("hw.netmap.buf_size", &netmap_buf_size);
|
||||
u_int netmap_buf_size = 2048;
|
||||
TUNABLE_INT("hw.netmap.buf_size", (u_int *)&netmap_buf_size);
|
||||
SYSCTL_INT(_dev_netmap, OID_AUTO, buf_size,
|
||||
CTLFLAG_RD, &netmap_buf_size, 0, "Size of packet buffers");
|
||||
int netmap_mitigate = 1;
|
||||
@ -1379,7 +1379,7 @@ netmap_start(struct ifnet *ifp, struct mbuf *m)
|
||||
struct netmap_adapter *na = NA(ifp);
|
||||
struct netmap_kring *kring = &na->rx_rings[na->num_rx_rings];
|
||||
u_int i, len = MBUF_LEN(m);
|
||||
int error = EBUSY, lim = kring->nkr_num_slots - 1;
|
||||
u_int error = EBUSY, lim = kring->nkr_num_slots - 1;
|
||||
struct netmap_slot *slot;
|
||||
|
||||
if (netmap_verbose & NM_VERB_HOST)
|
||||
@ -1955,7 +1955,7 @@ bdg_netmap_rxsync(struct ifnet *ifp, u_int ring_nr, int do_lock)
|
||||
struct netmap_adapter *na = NA(ifp);
|
||||
struct netmap_kring *kring = &na->rx_rings[ring_nr];
|
||||
struct netmap_ring *ring = kring->ring;
|
||||
int j, n, lim = kring->nkr_num_slots - 1;
|
||||
u_int j, n, lim = kring->nkr_num_slots - 1;
|
||||
u_int k = ring->cur, resvd = ring->reserved;
|
||||
|
||||
ND("%s ring %d lock %d avail %d",
|
||||
|
@ -241,7 +241,7 @@ struct netmap_slot *netmap_reset(struct netmap_adapter *na,
|
||||
enum txrx tx, int n, u_int new_cur);
|
||||
int netmap_ring_reinit(struct netmap_kring *);
|
||||
|
||||
extern int netmap_buf_size;
|
||||
extern u_int netmap_buf_size;
|
||||
#define NETMAP_BUF_SIZE netmap_buf_size
|
||||
extern int netmap_mitigate;
|
||||
extern int netmap_no_pendintr;
|
||||
|
Loading…
Reference in New Issue
Block a user