diff options
author | rwatson <rwatson@FreeBSD.org> | 2007-10-29 14:19:32 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2007-10-29 14:19:32 +0000 |
commit | df4d50261927c949ecb4b8f20b8c0c587dc681ad (patch) | |
tree | 5c43c011eb6bbd46d06a33a2943b65d985735f67 /sys/dev/nxge/include/xge-list.h | |
parent | a4265719055fe445116eb2743b6aacf518bb1a8d (diff) | |
download | FreeBSD-src-df4d50261927c949ecb4b8f20b8c0c587dc681ad.zip FreeBSD-src-df4d50261927c949ecb4b8f20b8c0c587dc681ad.tar.gz |
Merge Neterion if_nxge driver version 2.0.9.11230 with the following
changes:
01 - Enhanced LRO:
LRO feature is extended to support multi-buffer mode. Previously,
Ethernet frames received in contiguous buffers were offloaded.
Now, frames received in multiple non-contiguous buffers can be
offloaded, as well. The driver now supports LRO for jumbo frames.
02 - Locks Optimization:
The driver code was re-organized to limit the use of locks.
Moreover, lock contention was reduced by replacing wait locks
with try locks.
03 - Code Optimization:
The driver code was re-factored to eliminate some memcpy
operations. Fast path loops were optimized.
04 - Tag Creations:
Physical Buffer Tags are now optimized based upon frame size.
For better performance, Physical Memory Maps are now re-used.
05 - Configuration:
Features such as TSO, LRO, and Interrupt Mode can be configured
either at load or at run time. Rx buffer mode (mode 1 or mode 2)
can be configured at load time through kenv.
06 - Driver Statistics:
Run time statistics are enhanced to provide better visibility
into the driver performance.
07 - Bug Fixes:
The driver contains fixes for the problems discovered and
reported since last submission.
08 - MSI support:
Added Message Signaled Interrupt feature which currently uses 1
message.
09 Removed feature:
Rx 3 buffer mode feature has been removed. Driver now supports 1,
2 and 5 buffer modes of which 2 and 5 buffer modes can be used
for header separation.
10 Compiler warning:
Fixed compiler warning when compiled for 32 bit system.
11 Copyright notice:
Source files are updated with the proper copyright notice.
MFC after: 3 days
Submitted by: Alicia Pena <Alicia dot Pena at neterion dot com>,
Muhammad Shafiq <Muhammad dot Shafiq at neterion dot com>
Diffstat (limited to 'sys/dev/nxge/include/xge-list.h')
-rw-r--r-- | sys/dev/nxge/include/xge-list.h | 44 |
1 files changed, 18 insertions, 26 deletions
diff --git a/sys/dev/nxge/include/xge-list.h b/sys/dev/nxge/include/xge-list.h index c49424d..544a623 100644 --- a/sys/dev/nxge/include/xge-list.h +++ b/sys/dev/nxge/include/xge-list.h @@ -26,14 +26,6 @@ * $FreeBSD$ */ -/* - * FileName : xge-list.h - * - * Description: Generic bi-directional linked list implementation - * - * Created: 14 May 2004 - */ - #ifndef XGE_LIST_H #define XGE_LIST_H @@ -76,9 +68,9 @@ static inline void xge_list_init (xge_list_t *header) */ static inline int xge_list_is_empty(xge_list_t *header) { - xge_assert(header != NULL); + xge_assert(header != NULL); - return header->next == header; + return header->next == header; } /** @@ -96,9 +88,9 @@ static inline xge_list_t *xge_list_first_get(xge_list_t *header) xge_assert(header->prev != NULL); if(header->next == header) - return NULL; + return NULL; else - return header->next; + return header->next; } /** @@ -131,7 +123,7 @@ static inline void xge_list_remove(xge_list_t *item) * See also: xge_list_remove(), xge_list_insert_before(), xge_list_t{}. */ static inline void xge_list_insert (xge_list_t *new_item, - xge_list_t *prev_item) + xge_list_t *prev_item) { xge_assert(new_item != NULL); xge_assert(prev_item != NULL); @@ -151,7 +143,7 @@ static inline void xge_list_insert (xge_list_t *new_item, * Insert new item (new_item) before given item (next_item). */ static inline void xge_list_insert_before (xge_list_t *new_item, - xge_list_t *next_item) + xge_list_t *next_item) { xge_assert(new_item != NULL); xge_assert(next_item != NULL); @@ -165,34 +157,34 @@ static inline void xge_list_insert_before (xge_list_t *new_item, #define xge_list_for_each(_p, _h) \ for (_p = (_h)->next, xge_os_prefetch(_p->next); _p != (_h); \ - _p = _p->next, xge_os_prefetch(_p->next)) + _p = _p->next, xge_os_prefetch(_p->next)) #define xge_list_for_each_safe(_p, _n, _h) \ - for (_p = (_h)->next, _n = _p->next; _p != (_h); \ - _p = _n, _n = _p->next) + for (_p = (_h)->next, _n = _p->next; _p != (_h); \ + _p = _n, _n = _p->next) #ifdef __GNUC__ /** * xge_container_of - Given a member, return the containing structure. - * @ptr: the pointer to the member. - * @type: the type of the container struct this is embedded in. - * @member: the name of the member within the struct. + * @ptr: the pointer to the member. + * @type: the type of the container struct this is embedded in. + * @member: the name of the member within the struct. * * Cast a member of a structure out to the containing structure. */ -#define xge_container_of(ptr, type, member) ({ \ - __typeof( ((type *)0)->member ) *__mptr = (ptr); \ - (type *)(void *)( (char *)__mptr - ((size_t) &((type *)0)->member) );}) +#define xge_container_of(ptr, type, member) ({ \ + __typeof( ((type *)0)->member ) *__mptr = (ptr); \ + (type *)(void *)( (char *)__mptr - ((size_t) &((type *)0)->member) );}) #else /* type unsafe version */ #define xge_container_of(ptr, type, member) \ - ((type*)(void*)((char*)(ptr) - ((size_t) &((type *)0)->member))) + ((type*)(void*)((char*)(ptr) - ((size_t) &((type *)0)->member))) #endif /** * xge_offsetof - Offset of the member in the containing structure. - * @t: struct name. - * @m: the name of the member within the struct. + * @t: struct name. + * @m: the name of the member within the struct. * * Return the offset of the member @m in the structure @t. */ |