aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/nxge
Commit message (Collapse)AuthorAgeFilesLines
* nxge(4):Sean Bruno2018-05-0840-32865/+0
| | | | | | | | | | | | | Remove nxge(4) and associated man page and tools in FreeBSD 12.0. Submitted by: kbowling Reviewed by: brooks Relnotes: yes Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D1529 Notes: svn path=/head/; revision=333388
* nxge(4) deprecation noticeSean Bruno2018-05-031-0/+1
| | | | | | | | | | Submitted by: kbowling Reviewed by: brooks Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D15277 Notes: svn path=/head/; revision=333210
* Fix the build on arches with default unsigned char. Capture the fubyte()Ian Lepore2018-04-011-3/+4
| | | | | | | | return value in an int as well as the char, and test the full int value for fubyte() failure. Notes: svn path=/head/; revision=331869
* Fall back to ether_ioctl() by default.Brooks Davis2018-03-301-7/+1
| | | | | | | | | | | | | | | | | | | | The common pratice in ethernet device drivers is to fall back to ether_ioctl() to implement generic ioctls not implemented by the driver and to fail if no handler exists. Convert these drivers to follow that practice rather than calling ether_ioctl() for specific cases. vxge(4) aready had the default case, but it was only called on failure to match. Reviewed by: imp Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14895 Notes: svn path=/head/; revision=331829
* Use an accessor function to access ifr_data.Brooks Davis2018-03-301-13/+15
| | | | | | | | | | | | | | | | This fixes 32-bit compat (no ioctl command defintions are required as struct ifreq is the same size). This is believed to be sufficent to fully support ifconfig on 32-bit systems. Reviewed by: kib Obtained from: CheriBSD MFC after: 1 week Relnotes: yes Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14900 Notes: svn path=/head/; revision=331797
* Don't access userspace directly from the kernel in nxge(4).Brooks Davis2018-03-271-5/+16
| | | | | | | | | | | | | | | Update to what the previous code seemed to be doing via the correct interfaces. Further issues exist in xge_ioctl_registers(), but this is debugging code in a driver that has few users and they don't appear to be crashes or leaks. Reviewed by: jhb (prior version) MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14848 Notes: svn path=/head/; revision=331654
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-2739-0/+78
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. 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. Notes: svn path=/head/; revision=326255
* nxge(4): Remove useless self-assignment.Pedro F. Giffuni2016-06-031-1/+0
| | | | | | | | | | Apparently the original implementation brought a self-assignment to work around some bogus lint issue that is not relevant anymore. CID: 1347070 Notes: svn path=/head/; revision=301276
* Replace 0 with NULL for pointers in misc. device drivers.Pedro F. Giffuni2016-04-121-1/+1
| | | | | | | Found with devel/coccinelle. Notes: svn path=/head/; revision=297862
* Fix what looks like a consistent copy&paste error.Bjoern A. Zeeb2015-09-272-2/+2
| | | | | | | | | | | Don't make an integer to a boolean and then compare to a value which needs an integer comparison. Spotted by: reading kernel compile time log MFC after: 2 weeks Notes: svn path=/head/; revision=288308
* Compare the correct variable to see if memory allocation succeeded.Bjoern A. Zeeb2015-09-271-1/+1
| | | | | | | | | | I don't even want to know where the symbol "version" comes from. Spotted by: reading kernel compile time log MFC after: 2 weeks Notes: svn path=/head/; revision=288307
* CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than tenJung-uk Kim2015-05-221-1/+1
| | | | | | | | | | | | | years for head. However, it is continuously misused as the mpsafe argument for callout_init(9). Deprecate the flag and clean up callout_init() calls to make them more consistent. Differential Revision: https://reviews.freebsd.org/D2613 Reviewed by: jhb MFC after: 2 weeks Notes: svn path=/head/; revision=283291
* 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
* The r48589 promised to remove implicit inclusion of if_var.h soon. PrepareGleb Smirnoff2013-10-261-0/+1
| | | | | | | | | | | to this event, adding if_var.h to files that do need it. Also, include all includes that now are included due to implicit pollution via if_var.h Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=257176
* 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-3/+3
| | | | | | | malloc(9) flags in sys/dev. Notes: svn path=/head/; revision=243857
* Fix typo; s/ouput/outputKevin Lo2012-11-071-1/+1
| | | | Notes: svn path=/head/; revision=242692
* Fix the following compilation warnings in nxge(4):Dimitry Andric2012-04-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | sys/dev/nxge/if_nxge.c:1276:11: error: case value not in enumerated type 'xge_hal_event_e' (aka 'enum xge_hal_event_e') [-Werror,-Wswitch] case XGE_LL_EVENT_TRY_XMIT_AGAIN: ^ sys/dev/nxge/if_nxge.c:1289:11: error: case value not in enumerated type 'xge_hal_event_e' (aka 'enum xge_hal_event_e') [-Werror,-Wswitch] case XGE_LL_EVENT_DEVICE_RESETTING: ^ This is because the switch uses xge_queue_item_t::event_type, which is an enum xge_hal_event_e, while the XGE_LL_EVENT_xx values are of the enum xge_event_e. Since messing around with the enum definitions is too disruptive, the simplest fix is to cast the argument of the switch to int. Reviewed by: gnn MFC after: 1 week Notes: svn path=/head/; revision=234506
* Convert files to UTF-8Ulrich Spörlein2012-01-151-1/+1
| | | | Notes: svn path=/head/; revision=230134
* Remove spurious 8bit chars, turning files into plain ASCII.Ulrich Spörlein2012-01-152-3/+3
| | | | Notes: svn path=/head/; revision=230133
* Fix typos - remove duplicate "the".Rebecca Cran2011-02-212-2/+2
| | | | | | | | | PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days Notes: svn path=/head/; revision=218909
* Add new tunable 'net.link.ifqmaxlen' to set default send interfaceMaxim Sobolev2010-05-031-1/+1
| | | | | | | | | | | | | queue length. The default value for this parameter is 50, which is quite low for many of today's uses and the only way to modify this parameter right now is to edit if_var.h file. Also add read-only sysctl with the same name, so that it's possible to retrieve the current value. MFC after: 1 month Notes: svn path=/head/; revision=207554
* Fix compile after previous "harmless" commit.John Baldwin2009-11-191-10/+8
| | | | | | | Pointy hat to: jhb Notes: svn path=/head/; revision=199554
* These drivers only set if_timer but never set if_watchdog. Just removeJohn Baldwin2009-11-191-4/+0
| | | | | | | the assignments to if_timer. Notes: svn path=/head/; revision=199537
* Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/Robert Watson2009-06-261-4/+4
| | | | | | | | | | | | | | | | IF_ADDR_UNLOCK() across network device drivers when accessing the per-interface multicast address list, if_multiaddrs. This will allow us to change the locking strategy without affecting our driver programming interface or binary interface. For two wireless drivers, remove unnecessary locking, since they don't actually access the multicast address list. Approved by: re (kib) MFC after: 6 weeks Notes: svn path=/head/; revision=195049
* - bump __FreeBSD version to reflect added buf_ring, memory barriers,Kip Macy2008-11-221-0/+4
| | | | | | | | | | | | | | | | | | | | and ifnet functions - add memory barriers to <machine/atomic.h> - update drivers to only conditionally define their own - add lockless producer / consumer ring buffer - remove ring buffer implementation from cxgb and update its callers - add if_transmit(struct ifnet *ifp, struct mbuf *m) to ifnet to allow drivers to efficiently manage multiple hardware queues (i.e. not serialize all packets through one ifq) - expose if_qflush to allow drivers to flush any driver managed queues This work was supported by Bitgravity Inc. and Chelsio Inc. Notes: svn path=/head/; revision=185162
* Merge Neterion if_nxge driver version 2.0.9.11230 with the followingRobert Watson2007-10-2941-12941/+11865
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> Notes: svn path=/head/; revision=173139
* Directly initialize nxge's ifaddrp pointer to ifnetp->if_addr ratherRobert Watson2007-07-121-1/+1
| | | | | | | | | | | | than indirecting through ifaddr_byindex, which makes things easier with respect to virtualized network stacks. Submitted by: Marko Zec <zec at icir dot org> Reviewed by: Leonid Grossman <Leonid dot Grossman at neterion dot com> Approved by: re (kensmith) Notes: svn path=/head/; revision=171395
* Fix warnings.Peter Wemm2007-07-061-2/+2
| | | | | | | | | | | | nxge: cast page size fragments down to (int). If the vm's demand paging PAGE_SIZE is ever too big for that, we've got far bigger problems. ofw: move va_start() a little earlier. gcc-4.2 doesn't like us modifying the last arg before the va_start(). Approved by: re (rwatson) Notes: svn path=/head/; revision=171265
* Neterion Xframe 10GbE Server/Storage adapter driver.Sam Leffler2007-06-2941-0/+33856
The nxge driver provides support for Neterion Xframe-I and Xframe-II adapters. The driver supports TCP Segmentation Offload (TSO/LSO), Jumbo frames (5 buffer mode), Header separation (2 and 3 Receive buffer modes), VLAN, and Promiscuous mode. Submitted by: Neterion Reviewed by: rwatson Approved by: re (kensmith) Notes: svn path=/head/; revision=171095