whitespace change: remove trailing whitespace
This commit is contained in:
parent
055be14e5c
commit
359dad8e6c
@ -1019,7 +1019,7 @@ netmap_rxsync_from_host(struct netmap_adapter *na, struct thread *td, void *pwai
|
||||
|
||||
nm_i = kring->nr_hwtail;
|
||||
stop_i = nm_prev(nm_i, lim);
|
||||
while ( nm_i != stop_i && (m = mbq_dequeue(q)) != NULL ) {
|
||||
while ( nm_i != stop_i && (m = mbq_dequeue(q)) != NULL ) {
|
||||
int len = MBUF_LEN(m);
|
||||
struct netmap_slot *slot = &ring->slot[nm_i];
|
||||
|
||||
@ -1515,7 +1515,7 @@ netmap_set_ringid(struct netmap_priv_d *priv, uint16_t ringid, uint32_t flags)
|
||||
if (nm_rx_si_user(priv))
|
||||
na->rx_si_users++;
|
||||
if (netmap_verbose) {
|
||||
D("%s: tx [%d,%d) rx [%d,%d) id %d",
|
||||
D("%s: tx [%d,%d) rx [%d,%d) id %d",
|
||||
NM_IFPNAME(na->ifp),
|
||||
priv->np_txqfirst,
|
||||
priv->np_txqlast,
|
||||
@ -2120,7 +2120,7 @@ netmap_poll(struct cdev *dev, int events, struct thread *td)
|
||||
* Transparent mode: marked bufs on rx rings between
|
||||
* kring->nr_hwcur and ring->head
|
||||
* are passed to the other endpoint.
|
||||
*
|
||||
*
|
||||
* In this mode we also scan the sw rxring, which in
|
||||
* turn passes packets up.
|
||||
*
|
||||
|
@ -678,7 +678,7 @@ static inline uint32_t
|
||||
nm_kr_rxspace(struct netmap_kring *k)
|
||||
{
|
||||
int space = k->nr_hwtail - k->nr_hwcur;
|
||||
if (space < 0)
|
||||
if (space < 0)
|
||||
space += k->nkr_num_slots;
|
||||
ND("preserving %d rx slots %d -> %d", space, k->nr_hwcur, k->nr_hwtail);
|
||||
|
||||
@ -827,7 +827,7 @@ nm_txsync_finalize(struct netmap_kring *kring)
|
||||
{
|
||||
/* update ring tail to what the kernel knows */
|
||||
kring->ring->tail = kring->rtail = kring->nr_hwtail;
|
||||
|
||||
|
||||
/* note, head/rhead/hwcur might be behind cur/rcur
|
||||
* if no carrier
|
||||
*/
|
||||
|
@ -992,7 +992,7 @@ netmap_mem_private_new(const char *name, u_int txr, u_int txd,
|
||||
if (p[NETMAP_RING_POOL].num < v)
|
||||
p[NETMAP_RING_POOL].num = v;
|
||||
/* for each pipe we only need the buffers for the 4 "real" rings.
|
||||
* On the other end, the pipe ring dimension may be different from
|
||||
* On the other end, the pipe ring dimension may be different from
|
||||
* the parent port ring dimension. As a compromise, we allocate twice the
|
||||
* space actually needed if the pipe rings were the same size as the parent rings
|
||||
*/
|
||||
|
@ -391,7 +391,7 @@ netmap_pipe_krings_create(struct netmap_adapter *na)
|
||||
/* netmap_pipe_reg.
|
||||
*
|
||||
* There are two cases on registration (onoff==1)
|
||||
*
|
||||
*
|
||||
* 1.a) state is
|
||||
*
|
||||
* usr1 --> e1 --> e2
|
||||
@ -403,7 +403,7 @@ netmap_pipe_krings_create(struct netmap_adapter *na)
|
||||
* usr1 --> e1 --> e2 <-- usr2
|
||||
*
|
||||
* and we are e2. Drop the ref e1 is holding.
|
||||
*
|
||||
*
|
||||
* There are two additional cases on unregister (onoff==0)
|
||||
*
|
||||
* 2.a) state is
|
||||
@ -462,14 +462,14 @@ netmap_pipe_reg(struct netmap_adapter *na, int onoff)
|
||||
*
|
||||
* 1) state is
|
||||
*
|
||||
* usr1 --> e1 --> e2
|
||||
* usr1 --> e1 --> e2
|
||||
*
|
||||
* and we are e1 (e2 is not registered, so krings_delete cannot be
|
||||
* and we are e1 (e2 is not registered, so krings_delete cannot be
|
||||
* called on it);
|
||||
*
|
||||
* 2) state is
|
||||
*
|
||||
* usr1 --> e1 e2 <-- usr2
|
||||
* usr1 --> e1 e2 <-- usr2
|
||||
*
|
||||
* and we are either e1 or e2.
|
||||
*
|
||||
@ -519,7 +519,7 @@ netmap_pipe_dtor(struct netmap_adapter *na)
|
||||
pna->peer_ref = 0;
|
||||
netmap_adapter_put(&pna->peer->up);
|
||||
}
|
||||
if (pna->role == NR_REG_PIPE_MASTER)
|
||||
if (pna->role == NR_REG_PIPE_MASTER)
|
||||
netmap_pipe_remove(pna->parent, pna);
|
||||
netmap_adapter_put(pna->parent);
|
||||
free(na->ifp, M_DEVBUF);
|
||||
@ -587,7 +587,7 @@ netmap_get_pipe_na(struct nmreq *nmr, struct netmap_adapter **na, int create)
|
||||
error = ENODEV;
|
||||
goto put_out;
|
||||
}
|
||||
/* we create both master and slave.
|
||||
/* we create both master and slave.
|
||||
* The endpoint we were asked for holds a reference to
|
||||
* the other one.
|
||||
*/
|
||||
|
@ -1783,7 +1783,7 @@ netmap_bwrap_intr_notify(struct netmap_adapter *na, u_int ring_nr, enum txrx tx,
|
||||
if (is_host_ring) {
|
||||
vpna = hostna;
|
||||
ring_nr = 0;
|
||||
}
|
||||
}
|
||||
/* simulate a user wakeup on the rx ring */
|
||||
/* fetch packets that have arrived.
|
||||
* XXX maybe do this in a loop ?
|
||||
|
@ -447,7 +447,7 @@ struct netmap_if {
|
||||
*
|
||||
* nr_arg1, nr_arg2, nr_arg3 (in/out) command specific
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
@ -467,7 +467,7 @@ struct netmap_if {
|
||||
* *** INVALID 0xA000
|
||||
* one pipe ring, slave 0xC000 ring index
|
||||
* *** INVALID 0xE000
|
||||
*
|
||||
*
|
||||
*/
|
||||
struct nmreq {
|
||||
char nr_name[IFNAMSIZ];
|
||||
|
@ -293,7 +293,7 @@ typedef void (*nm_cb_t)(u_char *, const struct nm_pkthdr *, const u_char *d);
|
||||
* if passed a netmap_desc with mem != NULL,
|
||||
* use that memory instead of mmap.
|
||||
*/
|
||||
|
||||
|
||||
static struct nm_desc *nm_open(const char *ifname, const struct nmreq *req,
|
||||
uint64_t flags, const struct nm_desc *arg);
|
||||
|
||||
@ -531,7 +531,7 @@ nm_open(const char *ifname, const struct nmreq *req,
|
||||
}
|
||||
}
|
||||
#endif /* debugging */
|
||||
|
||||
|
||||
d->cur_tx_ring = d->first_tx_ring;
|
||||
d->cur_rx_ring = d->first_rx_ring;
|
||||
return d;
|
||||
|
Loading…
Reference in New Issue
Block a user