summaryrefslogtreecommitdiffstats
path: root/sys/dev/ixgbe/ixgbe.h
diff options
context:
space:
mode:
authorjfv <jfv@FreeBSD.org>2011-04-25 23:34:21 +0000
committerjfv <jfv@FreeBSD.org>2011-04-25 23:34:21 +0000
commitebe803c4913a501588fff3a8fb3afd3c96f618e6 (patch)
tree0eb80d777afa5bb05f7e5100673e35677c70f3b8 /sys/dev/ixgbe/ixgbe.h
parent36482d28297049b6b64e5f85cfbb230833c32a36 (diff)
downloadFreeBSD-src-ebe803c4913a501588fff3a8fb3afd3c96f618e6.zip
FreeBSD-src-ebe803c4913a501588fff3a8fb3afd3c96f618e6.tar.gz
- Add the RX refresh changes from igb to ixgbe
- Also a couple minor tweaks to the TX code from the same source. - Add the INET ioctl code which has been missing from this driver, and which caused IP aliases to reset the interface. - Last, some minor logic changes that just reflect upcoming hardware support, but have no other functional effect now. MFC after a week
Diffstat (limited to 'sys/dev/ixgbe/ixgbe.h')
-rw-r--r--sys/dev/ixgbe/ixgbe.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/dev/ixgbe/ixgbe.h b/sys/dev/ixgbe/ixgbe.h
index 9f40efe..54a2f2d 100644
--- a/sys/dev/ixgbe/ixgbe.h
+++ b/sys/dev/ixgbe/ixgbe.h
@@ -1,6 +1,6 @@
/******************************************************************************
- Copyright (c) 2001-2010, Intel Corporation
+ Copyright (c) 2001-2011, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -497,4 +497,19 @@ drbr_needs_enqueue(struct ifnet *ifp, struct buf_ring *br)
}
#endif
+/*
+** Find the number of unrefreshed RX descriptors
+*/
+static inline u16
+ixgbe_rx_unrefreshed(struct rx_ring *rxr)
+{
+ struct adapter *adapter = rxr->adapter;
+
+ if (rxr->next_to_check > rxr->next_to_refresh)
+ return (rxr->next_to_check - rxr->next_to_refresh - 1);
+ else
+ return ((adapter->num_rx_desc + rxr->next_to_check) -
+ rxr->next_to_refresh - 1);
+}
+
#endif /* _IXGBE_H_ */
OpenPOWER on IntegriCloud