aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ex
Commit message (Collapse)AuthorAgeFilesLines
* MFC r339703:Brooks Davis2018-10-251-0/+2
| | | | | | | | | | | | | | | | | | | Deprecate a number of less used 10 and 10/100 Ethernet devices. The current deprecated list is: ae, bm, cs, de, dme, ed, ep, ex, fe, pcn, sf, sn, tl, tx, txp, vx, wb, xe The list was defined as part of FCP-0101. Per the FCP, devices may be removed from the deprecation list if enough users are found or they are converted to iflib. FCP: https://github.com/freebsd/fcp/blob/master/fcp-0101.md Approved by: re (gjb) Reviewed by: rgrimes Differential Revision: https://reviews.freebsd.org/D17654 Notes: svn path=/stable/12/; revision=339735
* ifnet: Replace if_addr_lock rwlock with epoch + mutexMatt Macy2018-05-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Run on LLNW canaries and tested by pho@ gallatin: Using a 14-core, 28-HTT single socket E5-2697 v3 with a 40GbE MLX5 based ConnectX 4-LX NIC, I see an almost 12% improvement in received packet rate, and a larger improvement in bytes delivered all the way to userspace. When the host receiving 64 streams of netperf -H $DUT -t UDP_STREAM -- -m 1, I see, using nstat -I mce0 1 before the patch: InMpps OMpps InGbs OGbs err TCP Est %CPU syscalls csw irq GBfree 4.98 0.00 4.42 0.00 4235592 33 83.80 4720653 2149771 1235 247.32 4.73 0.00 4.20 0.00 4025260 33 82.99 4724900 2139833 1204 247.32 4.72 0.00 4.20 0.00 4035252 33 82.14 4719162 2132023 1264 247.32 4.71 0.00 4.21 0.00 4073206 33 83.68 4744973 2123317 1347 247.32 4.72 0.00 4.21 0.00 4061118 33 80.82 4713615 2188091 1490 247.32 4.72 0.00 4.21 0.00 4051675 33 85.29 4727399 2109011 1205 247.32 4.73 0.00 4.21 0.00 4039056 33 84.65 4724735 2102603 1053 247.32 After the patch InMpps OMpps InGbs OGbs err TCP Est %CPU syscalls csw irq GBfree 5.43 0.00 4.20 0.00 3313143 33 84.96 5434214 1900162 2656 245.51 5.43 0.00 4.20 0.00 3308527 33 85.24 5439695 1809382 2521 245.51 5.42 0.00 4.19 0.00 3316778 33 87.54 5416028 1805835 2256 245.51 5.42 0.00 4.19 0.00 3317673 33 90.44 5426044 1763056 2332 245.51 5.42 0.00 4.19 0.00 3314839 33 88.11 5435732 1792218 2499 245.52 5.44 0.00 4.19 0.00 3293228 33 91.84 5426301 1668597 2121 245.52 Similarly, netperf reports 230Mb/s before the patch, and 270Mb/s after the patch Reviewed by: gallatin Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D15366 Notes: svn path=/head/; revision=333813
* Fall back to ether_ioctl() by default.Brooks Davis2018-03-301-8/+2
| | | | | | | | | | | | | | | | | | | | 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
* Create a new ISA_PNP_INFO macro. Use this macro every where we haveWarner Losh2017-12-231-2/+3
| | | | | | | | | | ISA PNP card support (replace by hand version in if_ed). Move module declarations to the end of some files. Fix PCCARD_PNP_INFO to use nitems(). Remove some stale comments about pc98, turns out the comment was simply wrong. Notes: svn path=/head/; revision=327102
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-275-0/+10
| | | | | | | | | | | | | | | 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
* remove archaic register keyword from ixgb and exEd Maste2017-04-061-1/+1
| | | | | | | Reviewed by: sbruno Notes: svn path=/head/; revision=316583
* Create a generic PCCARD_PNP_INFO from the MODULE_PNP_INFO buildingWarner Losh2015-12-111-0/+1
| | | | | | | | | | | | block. Use it in all the PNP drivers to export either the current PNP table. For uart, create a custom table and export it using MODULE_PNP_INFO since it's the only one that matches on function number. Differential Review: https://reviews.freebsd.org/D3461 Notes: svn path=/head/; revision=292079
* In order to reduce use of M_EXT outside of the mbuf allocator andRobert Watson2015-01-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | socket-buffer implementations, introduce a return value for MCLGET() (and m_cljget() that underlies it) to allow the caller to avoid testing M_EXT itself. Update all callers to use the return value. With this change, very few network device drivers remain aware of M_EXT; the primary exceptions lie in mbuf-chain pretty printers for debugging, and in a few cases, custom mbuf and cluster allocation implementations. NB: This is a difficult-to-test change as it touches many drivers for which I don't have physical devices. Instead we've gone for intensive review, but further post-commit review would definitely be appreciated to spot errors where changes could not easily be made mechanically, but were largely mechanical in nature. Differential Revision: https://reviews.freebsd.org/D1440 Reviewed by: adrian, bz, gnn Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=276750
* Mechanically convert to if_inc_counter().Gleb Smirnoff2014-09-191-10/+10
| | | | Notes: svn path=/head/; revision=271849
* 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
* 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
* Convert files to UTF-8Ulrich Spörlein2012-01-152-2/+2
| | | | Notes: svn path=/head/; revision=230132
* 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
* 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
* Replace several instances of 'if (!a & b)' with 'if (!(a &b))' in orderEdward Tomasz Napierala2010-01-081-1/+1
| | | | | | | to silence newer GCC versions. Notes: svn path=/head/; revision=201794
* 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
* Add preliminary support for the OLICOM OC2231 and OC2232. This is theWarner Losh2008-08-271-12/+55
| | | | | | | | | first driver that does the configuration dance with CFE's. There's likely some additional configuration that's needed to get things working completely... Notes: svn path=/head/; revision=182227
* Some PC Card variants of the 82365 don't seem to like setting the IRQWarner Losh2008-08-243-10/+18
| | | | | | | | | | | | | | number in the irq register. While there are other issues with these variants, avoiding writing to it helps interrupt generation on at least one card, and doesn't hurt on the others. Flag ISA attachment as needing INT_NO_REG written, and don't update the PC Card attachment (which will have the effect of not touching it for PC Cards). Document this in a comment, and tweak one or two formatting nits while I'm here. Notes: svn path=/head/; revision=182088
* Make ex(4) MPSAFE:John Baldwin2008-06-134-90/+101
| | | | | | | | | | | | | - Add a mutex to the softc to protect the softc and device hardware. - Use a private watchdog timer. - Setup interrupt handler after ether_ifattach(). - Use bus_foo() rather than bus_space_foo() and remove bus space tag and handle from softc. Tested by: imp Notes: svn path=/head/; revision=179775
* s/destory/destroy/ (except for the code in contrib/).Pawel Jakub Dawidek2007-04-161-1/+1
| | | | Notes: svn path=/head/; revision=168776
* o break newbus api: add a new argument of type driver_filter_t toPaolo Pisati2007-02-232-2/+2
| | | | | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@ Notes: svn path=/head/; revision=166901
* Remove ifdef notyet SIOCGHWADDR vestige.Warner Losh2006-02-041-7/+0
| | | | Notes: svn path=/head/; revision=155282
* - Store pointer to the link-level address right in "struct ifnet"Ruslan Ermilov2005-11-111-2/+2
| | | | | | | | | | | | | rather than in ifindex_table[]; all (except one) accesses are through ifp anyway. IF_LLADDR() works faster, and all (except one) ifaddr_byindex() users were converted to use ifp->if_addr. - Stop storing a (pointer to) Ethernet address in "struct arpcom", and drop the IFP2ENADDR() macro; all users have been converted to use IF_LLADDR() instead. Notes: svn path=/head/; revision=152315
* Catch up with IFP2ENADDR() type change (array -> pointer).Ruslan Ermilov2005-11-111-1/+1
| | | | Notes: svn path=/head/; revision=152311
* Fix "struct ifnet" leaks when attach() fails in the middle.Ruslan Ermilov2005-09-161-1/+3
| | | | Notes: svn path=/head/; revision=150215
* MFp4:Warner Losh2005-09-131-73/+40
| | | | | | | | o Move to new pccard_cis_scan convenience function. o Remove compat layer goo. Notes: svn path=/head/; revision=150107
* Add the olicom OC2231 and OC2232 to the list of cards that we shouldWarner Losh2005-09-131-0/+2
| | | | | | | | | | attach to. These cards are combo cards (in that they have a modem inside of them), but not true MFC cards. Full support of these cards will have to wait until we can pick the config to use and for the PFC support that I have brewing. Notes: svn path=/head/; revision=150100
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andRobert Watson2005-08-091-9/+9
| | | | | | | | | | | | | | | | | IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to ifnet.if_drv_flags. Device drivers are now responsible for synchronizing access to these flags, as they are in if_drv_flags. This helps prevent races between the network stack and device driver in maintaining the interface flags field. Many __FreeBSD__ and __FreeBSD_version checks maintained and continued; some less so. Reviewed by: pjd, bz MFC after: 7 days Notes: svn path=/head/; revision=148887
* Modify device drivers supporting multicast addresses to lock if_addr_mtxRobert Watson2005-08-031-1/+5
| | | | | | | | | | | over iteration of their multicast address lists when synchronizing the hardware address filter with the network stack-maintained list. Problem reported by: Ed Maste (emaste at phaedrus dot sandvine dot ca> MFC after: 1 week Notes: svn path=/head/; revision=148654
* Add real support for obtaining the silicom MAC address from theWarner Losh2005-07-151-34/+7
| | | | | | | apporpriate place in the CIS, now that we have the CIS scanning code. Notes: svn path=/head/; revision=148020
* Eliminate unused argument in PCMCIA_CARD macro.Warner Losh2005-06-241-2/+2
| | | | | | | | | | | Provide a backwards compatible way to have the extra macro by defining PCCARD_API_LEVEL 5 before including pccarddevs for driver writers that want/need to have the same driver on 5 and 6 with pccard attachments. Approved by: re (dwhite) Notes: svn path=/head/; revision=147580
* Stop embedding struct ifnet at the top of driver softcs. Instead theBrooks Davis2005-06-104-14/+22
| | | | | | | | | | | | | | | | | | | | | | | struct ifnet or the layer 2 common structure it was embedded in have been replaced with a struct ifnet pointer to be filled by a call to the new function, if_alloc(). The layer 2 common structure is also allocated via if_alloc() based on the interface type. It is hung off the new struct ifnet member, if_l2com. This change removes the size of these structures from the kernel ABI and will allow us to better manage them as interfaces come and go. Other changes of note: - Struct arpcom is no longer referenced in normal interface code. Instead the Ethernet address is accessed via the IFP2ENADDR() macro. To enforce this ac_enaddr has been renamed to _ac_enaddr. - The second argument to ether_ifattach is now always the mac address from driver private storage rather than sometimes being ac_enaddr. Reviewed by: sobomax, sam Notes: svn path=/head/; revision=147256
* Include necessary declarationsWarner Losh2005-01-201-0/+3
| | | | Notes: svn path=/head/; revision=140527
* Only match ethernet functions. I've not seen any multifunction cardsWarner Losh2005-01-201-0/+7
| | | | | | | | | (from a PC Card sense), so this should be a nop. The pseudo-multifunction cards (eg Silicom ones) need a special driver anyway.. Notes: svn path=/head/; revision=140526
* Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh2005-01-062-2/+2
| | | | Notes: svn path=/head/; revision=139749
* Use cluster if data >= MINCLSIZE.Gleb Smirnoff2004-10-171-1/+1
| | | | | | | | | Reviewed by: mdodd Approved by: julian (mentor) MFC after: 1 month Notes: svn path=/head/; revision=136625
* Since if_ex doesn't contain locking or run with INTR_MPSAFE, markRobert Watson2004-08-131-1/+2
| | | | | | | | | | the interface as IFF_NEEDSGIANT so if_start is run holding Giant. Note: there are locking macros in if_exreg.h, but they appear to be unused. Notes: svn path=/head/; revision=133684
* another format nitWarner Losh2004-06-281-1/+2
| | | | Notes: svn path=/head/; revision=131248
* casting for printf happinessWarner Losh2004-06-281-4/+4
| | | | Notes: svn path=/head/; revision=131247
* MFp4:Warner Losh2004-06-274-257/+351
| | | | | | | | | Use bus space rather than direct inb/outb. Minor style changes while I'm here. Extremely preliminary support for siliconix ethernet cards (but more work is required). Notes: svn path=/head/; revision=131192
* Fix disordering of pccarddevs.h noticed by bde. Also remove a fewWarner Losh2004-05-271-1/+1
| | | | | | | | | redundant includes and fix some of the include disordering. Submitted by: bde Notes: svn path=/head/; revision=129764
* Move to generating pccarddevs.h on the fly, both for the kernel andWarner Losh2004-05-261-1/+1
| | | | | | | | | | the modules. Also generate usbdevs.h automatically now, but a non-kernel file is stopping that at the moment. Notes: svn path=/head/; revision=129740
* We don't need to initialize if_output, ether_ifattach() does itMaxime Henrion2004-05-231-1/+0
| | | | | | | for us. Notes: svn path=/head/; revision=129616
* Remove improper use of if_addrhead in device drivers to checkLuigi Rizzo2004-04-151-3/+0
| | | | | | | | | | | | | | | if the link-level address has been initialized already. The majority of modern drivers never does this and works fine, which makes me think that the check is totally unnecessary and a residue of cut&paste from other drivers. This change is done to simplify locking because now almost none of the drivers uses this field. The exceptions are "ct" "ctau" and "cx" where i am not sure if i can remove that part. Notes: svn path=/head/; revision=128293
* Convert callers to the new bus_alloc_resource_any(9) API.Nate Lawson2004-03-171-4/+4
| | | | | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde Notes: svn path=/head/; revision=127135
* Announce ethernet MAC addresss in ether_ifattach().Matthew N. Dodd2004-03-141-3/+0
| | | | Notes: svn path=/head/; revision=126966
* Replace the if_name and if_unit members of struct ifnet with new membersBrooks Davis2003-10-311-9/+7
| | | | | | | | | | | | | | | | if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance. This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics. Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname) Notes: svn path=/head/; revision=121816
* add newcard support to exWarner Losh2003-10-261-2/+28
| | | | Notes: svn path=/head/; revision=121565
* Use __FBSDID().David E. O'Brien2003-08-243-3/+9
| | | | | | | Also some minor style cleanups. Notes: svn path=/head/; revision=119418
* - Declare ex_devclass in if_ex.cMatthew N. Dodd2003-03-294-8/+8
| | | | | | | - Rename module datastructures in if_ex_isa.c to be more standard. Notes: svn path=/head/; revision=112801