aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/netmap/if_igb_netmap.h
diff options
context:
space:
mode:
authorLuigi Rizzo <luigi@FreeBSD.org>2013-01-17 22:14:58 +0000
committerLuigi Rizzo <luigi@FreeBSD.org>2013-01-17 22:14:58 +0000
commit1dce924d2528107dd2c49bf68434bca3135b2fbf (patch)
treee7c9983311fd80a432d1eb47b75fb539c22fbc9c /sys/dev/netmap/if_igb_netmap.h
parentf876ffeae3dfa42438cd53f0abf84359c07bfd95 (diff)
downloadsrc-1dce924d2528107dd2c49bf68434bca3135b2fbf.tar.gz
src-1dce924d2528107dd2c49bf68434bca3135b2fbf.zip
add some definition and driver changes in preparation for
two upcoming features: semi-transparent mode: when a device is opened in this mode, the user program will be able to mark slots that must be forwarded to the "other" side (i.e. from NIC to host stack, or viceversa), and the forwarding will occur automatically at the next netmap syscall. This saves the need to open another file descriptor and do the forwarding manually. direct-forwarding mode: when operating with a VALE port, the user can specify in the slot the actual destination port, overriding the forwarding decision made by a lookup of the destination MAC. This can be useful to implement packet dispatchers. No API changes will be introduced. No new functionality in this patch yet.
Notes
Notes: svn path=/head/; revision=245579
Diffstat (limited to 'sys/dev/netmap/if_igb_netmap.h')
-rw-r--r--sys/dev/netmap/if_igb_netmap.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/netmap/if_igb_netmap.h b/sys/dev/netmap/if_igb_netmap.h
index bd835634884f..e817341cc9fe 100644
--- a/sys/dev/netmap/if_igb_netmap.h
+++ b/sys/dev/netmap/if_igb_netmap.h
@@ -263,6 +263,8 @@ igb_netmap_rxsync(struct ifnet *ifp, u_int ring_nr, int do_lock)
l = rxr->next_to_check;
j = netmap_idx_n2k(kring, l);
if (netmap_no_pendintr || force_update) {
+ uint16_t slot_flags = kring->nkr_slot_flags;
+
for (n = 0; ; n++) {
union e1000_adv_rx_desc *curr = &rxr->rx_base[l];
uint32_t staterr = le32toh(curr->wb.upper.status_error);
@@ -270,6 +272,7 @@ igb_netmap_rxsync(struct ifnet *ifp, u_int ring_nr, int do_lock)
if ((staterr & E1000_RXD_STAT_DD) == 0)
break;
ring->slot[j].len = le16toh(curr->wb.upper.length);
+ ring->slot[j].flags = slot_flags;
bus_dmamap_sync(rxr->ptag,
rxr->rx_buffers[l].pmap, BUS_DMASYNC_POSTREAD);
j = (j == lim) ? 0 : j + 1;