summaryrefslogtreecommitdiff
path: root/sys/dev/vxge
Commit message (Collapse)AuthorAgeFilesLines
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-2063-0/+126
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326022
* vxge: plug void casts from memcpy/memzero callsMateusz Guzik2017-09-061-4/+4
| | | | | | | | | | | Most of places using them did not have the cast in the first place. No functional changes. MFC after: 1 week Notes: svn path=/head/; revision=323246
* vxge(4): Yet another (minor) mismatch.Pedro F. Giffuni2017-02-231-1/+1
| | | | | | | | | | | VXGE_DEFAULT_TTI_RTIMER_VAL and VXGE_DEFAULT_RTI_RTIMER_VAL have value zero but nevertheless we should use the right value on each. Pointed by: jhb X-MFC with: r314145 Notes: svn path=/head/; revision=314158
* dev/vxe: double assignments.Pedro F. Giffuni2017-02-232-10/+1
| | | | | | | | | | Fix some suspicious code, likely caused by excessive copy-pasting. Found with: coccinelle (da.cocci) MFC after: 2 weeks Notes: svn path=/head/; revision=314145
* sys/dev: minor spelling fixes.Pedro F. Giffuni2016-05-0312-40/+40
| | | | | | | Most affect comments, very few have user-visible effects. Notes: svn path=/head/; revision=298955
* Replace 0 with NULL for pointers in misc. device drivers.Pedro F. Giffuni2016-04-122-4/+4
| | | | | | | Found with devel/coccinelle. Notes: svn path=/head/; revision=297862
* tcp/lro: Use tcp_lro_flush_all in device drivers to avoid code duplicationSepherosa Ziehau2016-04-011-7/+2
| | | | | | | | | | | | And factor out tcp_lro_rx_done, which deduplicates the same logic with netinet/tcp_lro.c Reviewed by: gallatin (1st version), hps, zbb, np, Dexuan Cui <decui microsoft com> Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5725 Notes: svn path=/head/; revision=297482
* Start process of removing the use of the deprecated "M_FLOWID" flagHans Petter Selasky2014-12-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from the FreeBSD network code. The flag is still kept around in the "sys/mbuf.h" header file, but does no longer have any users. Instead the "m_pkthdr.rsstype" field in the mbuf structure is now used to decide the meaning of the "m_pkthdr.flowid" field. To modify the "m_pkthdr.rsstype" field please use the existing "M_HASHTYPE_XXX" macros as defined in the "sys/mbuf.h" header file. This patch introduces new behaviour in the transmit direction. Previously network drivers checked if "M_FLOWID" was set in "m_flags" before using the "m_pkthdr.flowid" field. This check has now now been replaced by checking if "M_HASHTYPE_GET(m)" is different from "M_HASHTYPE_NONE". In the future more hashtypes will be added, for example hashtypes for hardware dedicated flows. "M_HASHTYPE_OPAQUE" indicates that the "m_pkthdr.flowid" value is valid and has no particular type. This change removes the need for an "if" statement in TCP transmit code checking for the presence of a valid flowid value. The "if" statement mentioned above is now a direct variable assignment which is then later checked by the respective network drivers like before. Additional notes: - The SCTP code changes will be committed as a separate patch. - Removal of the "M_FLOWID" flag will also be done separately. - The FreeBSD version has been bumped. MFC after: 1 month Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=275358
* Fix multiple incorrect SYSCTL arguments in the kernel:Hans Petter Selasky2014-10-211-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Wrong integer type was specified. - Wrong or missing "access" specifier. The "access" specifier sometimes included the SYSCTL type, which it should not, except for procedural SYSCTL nodes. - Logical OR where binary OR was expected. - Properly assert the "access" argument passed to all SYSCTL macros, using the CTASSERT macro. This applies to both static- and dynamically created SYSCTLs. - Properly assert the the data type for both static and dynamic SYSCTLs. In the case of static SYSCTLs we only assert that the data pointed to by the SYSCTL data pointer has the correct size, hence there is no easy way to assert types in the C language outside a C-function. - Rewrote some code which doesn't pass a constant "access" specifier when creating dynamic SYSCTL nodes, which is now a requirement. - Updated "EXAMPLES" section in SYSCTL manual page. MFC after: 3 days Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=273377
* Mechanically convert to if_inc_counter().Gleb Smirnoff2014-09-191-5/+5
| | | | Notes: svn path=/head/; revision=271849
* Use define from if_var.h to access a field inside struct if_data,Gleb Smirnoff2014-08-301-1/+1
| | | | | | | | | that resides in struct ifnet. Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=270856
* Don't bother clearing maps for static DMA allocations to NULL. Instead,John Baldwin2014-06-171-1/+0
| | | | | | | leave them as purely opaque values that are only set by bus_dmamem_alloc(). Notes: svn path=/head/; revision=267589
* Since 32-bit if_baudrate isn't enough to describe a baud rate of a 10 GbitGleb Smirnoff2014-03-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | interface, in the r241616 a crutch was provided. It didn't work well, and finally we decided that it is time to break ABI and simply make if_baudrate a 64-bit value. Meanwhile, the entire struct if_data was reviewed. o Remove the if_baudrate_pf crutch. o Make all fields of struct if_data fixed machine independent size. The notion of data (packet counters, etc) are by no means MD. And it is a bug that on amd64 we've got a 64-bit counters, while on i386 32-bit, which at modern speeds overflow within a second. This also removes quite a lot of COMPAT_FREEBSD32 code. o Give 16 bit for the ifi_datalen field. This field was provided to make future changes to if_data less ABI breaking. Unfortunately the 8 bit size of it had effectively limited sizeof if_data to 256 bytes. o Give 32 bits to ifi_mtu and ifi_metric. o Give 64 bits to the rest of fields, since they are counters. __FreeBSD_version bumped. Discussed with: emax Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=263102
* In sys/dev/vxge/vxgehal/vxgehal-ring.c, #if 0 an unused static function.Dimitry Andric2013-12-291-0/+2
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=260056
* Clean up -Wheader-guard warnings.Sergey Kandaurov2013-06-171-1/+1
| | | | | | | | | Submitted by: <dt71@gmx.com> MFC after: 3 days X-MFC with: r251848 Notes: svn path=/head/; revision=251862
* Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on ↵Sofian Brabez2013-01-301-1/+2
| | | | | | | | | | device_method_t arrays Reviewed by: cognet Approved by: cognet Notes: svn path=/head/; revision=246128
* Mechanically substitute flags from historic mbuf allocator withGleb Smirnoff2012-12-041-2/+2
| | | | | | | malloc(9) flags in sys/dev. Notes: svn path=/head/; revision=243857
* The drbr(9) API appeared to be so unclear, that most drivers inGleb Smirnoff2012-09-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tree used it incorrectly, which lead to inaccurate overrated if_obytes accounting. The drbr(9) used to update ifnet stats on drbr_enqueue(), which is not accurate since enqueuing doesn't imply successful processing by driver. Dequeuing neither mean that. Most drivers also called drbr_stats_update() which did accounting again, leading to doubled if_obytes statistics. And in case of severe transmitting, when a packet could be several times enqueued and dequeued it could have been accounted several times. o Thus, make drbr(9) API thinner. Now drbr(9) merely chooses between ALTQ queueing or buf_ring(9) queueing. - It doesn't touch the buf_ring stats any more. - It doesn't touch ifnet stats anymore. - drbr_stats_update() no longer exists. o buf_ring(9) handles its stats itself: - It handles br_drops itself. - br_prod_bytes stats are dropped. Rationale: no one ever reads them but update of a common counter on every packet negatively affects performance due to excessive cache invalidation. - buf_ring_enqueue_bytes() reduced to buf_ring_enqueue(), since we no longer account bytes. o Drivers handle their stats theirselves: if_obytes, if_omcasts. o mlx4(4), igb(4), em(4), vxge(4), oce(4) and ixv(4) no longer use drbr_stats_update(), and update ifnet stats theirselves. o bxe(4) was the most correct driver, it didn't call drbr_stats_update(), thus it was the only driver accurate under moderate load. Now it also maintains stats itself. o ixgbe(4) had already taken stats from hardware, so just - drop software stats updating. - take multicast packet count from hardware as well. o mxge(4) just no longer needs NO_SLOW_STATS define. o cxgb(4), cxgbe(4) need no change, since they obtain stats from hardware. Reviewed by: jfv, gnn Notes: svn path=/head/; revision=241037
* s/teh/the/gEitan Adler2012-09-141-1/+1
| | | | | | | | Approved by: cperciva MFC after: 3 days Notes: svn path=/head/; revision=240520
* Fix warning generated by clang;Eitan Adler2012-06-011-1/+1
| | | | | | | | | | | | | warning: equality comparison with extraneous parentheses [-Wparentheses-equality] Reported by: arundel Reviewed by: gnn Approved by: cperciva MFC after: 3 days Notes: svn path=/head/; revision=236377
* Remove spurious 8bit chars, turning files into plain ASCII.Ulrich Spörlein2012-01-151-11/+11
| | | | Notes: svn path=/head/; revision=230135
* ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it againKevin Lo2012-01-071-1/+0
| | | | | | | Reviewed by: yongari Notes: svn path=/head/; revision=229767
* Do not define bool/true/false if the symbols already exist.Matthew D Fleming2011-12-121-0/+2
| | | | | | | | MFC after: 2 weeks Sponsored by: Isilon Systems, LLC Notes: svn path=/head/; revision=228443
* - change "is is" to "is" or "it is"Eitan Adler2011-10-163-3/+3
| | | | | | | | | | | - change "the the" to "the" Approved by: lstewart Approved by: sahil (mentor) MFC after: 3 days Notes: svn path=/head/; revision=226436
* Add in support for multicast.George V. Neville-Neil2011-05-033-22/+4
| | | | | | | | Submitted by: Sriram Rapuru at @ Wipro for Exar Inc. MFC after: 2 weeks Notes: svn path=/head/; revision=221389
* Exar driver for X3100 10GbE Server/Storage adaptersGeorge V. Neville-Neil2011-04-2866-0/+107561
Features: Jumbo frames (up to 9600), LRO (Large Receive Offload), TSO (TCP segmentation offload), RTH (Receive Traffic Hash). Submitted by: Sriram Rapuru at Exar MFC after: 2 weeks Notes: svn path=/head/; revision=221167