aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/patm
Commit message (Collapse)AuthorAgeFilesLines
* Remove the NATM framework including the en(4), fatm(4), hatm(4), andBrooks Davis2017-04-2411-14902/+0
| | | | | | | | | | | | | | | | | | | | | | | | patm(4) devices. Maintaining an address family and framework has real costs when we make infrastructure improvements. In the case of NATM we support no devices manufactured in the last 20 years and some will not even work in modern motherboards (some newer devices that patm(4) could be updated to support apparently exist, but we do not currently have support). With this change, support remains for some netgraph modules that don't require NATM support code. It is unclear if all these should remain, though ng_atmllc certainly stands alone. Note well: FreeBSD 11 supports NATM and will continue to do so until at least September 30, 2021. Improvements to the code in FreeBSD 11 are certainly welcome. Reviewed by: philip Approved by: harti Notes: svn path=/head/; revision=317383
* sys/dev: Replace zero with NULL for pointers.Pedro F. Giffuni2017-02-201-1/+1
| | | | | | | | | | | Makes things easier to read, plus architectures may set NULL to something different than zero. Found with: devel/coccinelle MFC after: 3 weeks Notes: svn path=/head/; revision=313982
* sys/dev: minor spelling fixes.Pedro F. Giffuni2016-05-031-1/+1
| | | | | | | Most affect comments, very few have user-visible effects. Notes: svn path=/head/; revision=298955
* sys/dev: extend use of the howmany() macro when available.Pedro F. Giffuni2016-04-261-2/+2
| | | | | | | | We have a howmany() macro in the <sys/param.h> header that is convenient to re-use as it makes things easier to read. Notes: svn path=/head/; revision=298646
* sys/dev: use our nitems() macro when it is avaliable through param.h.Pedro F. Giffuni2016-04-191-1/+1
| | | | | | | | | | No functional change, only trivial cases are done in this sweep, Drivers that can get further enhancements will be done independently. Discussed in: freebsd-current Notes: svn path=/head/; revision=298307
* Cleanup unnecessary semicolons from the kernel.Pedro F. Giffuni2016-04-101-1/+1
| | | | | | | Found with devel/coccinelle. Notes: svn path=/head/; revision=297793
* Fix LDADD/DPADD that should be LIBADD.Bryan Drewery2015-12-041-2/+1
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291738
* 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
* To ease changes to underlying mbuf structure and the mbuf allocator, reduceRobert Watson2015-01-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | the knowledge of mbuf layout, and in particular constants such as M_EXT, MLEN, MHLEN, and so on, in mbuf consumers by unifying various alignment utility functions (M_ALIGN(), MH_ALIGN(), MEXT_ALIGN() in a single M_ALIGN() macro, implemented by a now-inlined m_align() function: - Move m_align() from uipc_mbuf.c to mbuf.h; mark as __inline. - Reimplement M_ALIGN(), MH_ALIGN(), and MEXT_ALIGN() using m_align(). - Update consumers around the tree to simply use M_ALIGN(). This change eliminates a number of cases where mbuf consumers must be aware of whether or not mbufs returned by the allocator use external storage, but also assumptions about the size of the returned mbuf. This will make it easier to introduce changes in how we use external storage, as well as features such as variable-size mbufs. Differential Revision: https://reviews.freebsd.org/D1436 Reviewed by: glebius, trasz, gnn, bz Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=276692
* Follow up to r225617. In order to maximize the re-usability of kernel codeDavide Italiano2014-10-161-1/+1
| | | | | | | | | | | in userland rename in-kernel getenv()/setenv() to kern_setenv()/kern_getenv(). This fixes a namespace collision with libc symbols. Submitted by: kmacy Tested by: make universe Notes: svn path=/head/; revision=273174
* Mechanically convert to if_inc_counter().Gleb Smirnoff2014-09-192-19/+19
| | | | Notes: svn path=/head/; revision=271849
* NO_MAN= has been deprecated in favor of MAN= for some time, go aheadWarner Losh2014-04-131-1/+1
| | | | | | | | | and finish the job. ncurses is now the only Makefile in the tree that uses it since it wasn't a simple mechanical change, and will be addressed in a future commit. Notes: svn path=/head/; revision=264400
* The r48589 promised to remove implicit inclusion of if_var.h soon. PrepareGleb Smirnoff2013-10-266-0/+6
| | | | | | | | | | | 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
* Restructure the mbuf pkthdr to make it fit for upcoming capabilities andAndre Oppermann2013-08-242-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | features. The changes in particular are: o Remove rarely used "header" pointer and replace it with a 64bit protocol/ layer specific union PH_loc for local use. Protocols can flexibly overlay their own 8 to 64 bit fields to store information while the packet is worked on. o Mechanically convert IP reassembly, IGMP/MLD and ATM to use pkthdr.PH_loc instead of pkthdr.header. o Extend csum_flags to 64bits to allow for additional future offload information to be carried (e.g. iSCSI, IPsec offload, and others). o Move the RSS hash type enumerator from abusing m_flags to its own 8bit rsstype field. Adjust accessor macros. o Add cosqos field to store Class of Service / Quality of Service information with the packet. It is not yet supported in any drivers but allows us to get on par with Cisco/Juniper in routing applications (plus MPLS QoS) with a modernized ALTQ. o Add four 8 bit fields l[2-5]hlen to store the relative header offsets from the start of the packet. This is important for various offload capabilities and to relieve the drivers from having to parse the packet and protocol headers to find out location of checksums and other information. Header parsing in drivers is a lot of copy-paste and unhandled corner cases which we want to avoid. o Add another flexible 64bit union to map various additional persistent packet information, like ether_vtag, tso_segsz and csum fields. Depending on the csum_flags settings some fields may have different usage making it very flexible and adaptable to future capabilities. o Restructure the CSUM flags to better signify their outbound (down the stack) and inbound (up the stack) use. The CSUM flags used to be a bit chaotic and rather poorly documented leading to incorrect use in many places. Bring clarity into their use through better naming. Compatibility mappings are provided to preserve the API. The drivers can be corrected one by one and MFC'd without issue. o The size of pkthdr stays the same at 48/56bytes (32/64bit architectures). Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=254804
* Mechanically substitute flags from historic mbuf allocator withGleb Smirnoff2012-12-043-6/+6
| | | | | | | malloc(9) flags in sys/dev. Notes: svn path=/head/; revision=243857
* More conversions of drivers to use the PCI parent DMA tag.Scott Long2012-03-121-5/+6
| | | | Notes: svn path=/head/; revision=232874
* Fix a few more SYSCTL_PROC() that were missing a CTLFLAG type specifier.Matthew D Fleming2011-01-191-4/+4
| | | | Notes: svn path=/head/; revision=217566
* Specify a CTLTYPE_FOO so that a future sysctl(8) change does not needMatthew D Fleming2011-01-181-4/+4
| | | | | | | to rely on the format string. Notes: svn path=/head/; revision=217556
* Remove extraneous semicolons, no functional changes.Martin Blapp2010-01-071-1/+1
| | | | | | | | Submitted by: Marc Balmer <marc@msys.ch> MFC after: 1 week Notes: svn path=/head/; revision=201758
* Take a step towards removing if_watchdog/if_timer. Don't explicitly setJohn Baldwin2009-11-061-2/+0
| | | | | | | | if_watchdog/if_timer to NULL/0 when initializing an ifnet. if_alloc() sets those members to NULL/0 already. Notes: svn path=/head/; revision=198988
* Remove unused variable.Ganbold Tsagaankhuu2008-11-261-4/+4
| | | | | | | | | | Found with: Coverity Prevent(tm) CID: 3695,3696 Approved by: harti Notes: svn path=/head/; revision=185336
* Give MEXTADD() another argument to make both void pointers to thePoul-Henning Kamp2008-02-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | free function controlable, instead of passing the KVA of the buffer storage as the first argument. Fix all conventional users of the API to pass the KVA of the buffer as the first argument, to make this a no-op commit. Likely break the only non-convetional user of the API, after informing the relevant committer. Update the mbuf(9) manual page, which was already out of sync on this point. Bump __FreeBSD_version to 800016 as there is no way to tell how many arguments a CPP macro needs any other way. This paves the way for giving sendfile(9) a way to wait for the passed storage to have been accessed before returning. This does not affect the memory layout or size of mbufs. Parental oversight by: sam and rwatson. No MFC is anticipated. Notes: svn path=/head/; revision=175872
* o break newbus api: add a new argument of type driver_filter_t toPaolo Pisati2007-02-231-1/+1
| | | | | | | | | | | | | | | | 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
* Commit the results of the typo hunt by Darren Pilgrim.Yaroslav Tykhiy2006-08-041-1/+1
| | | | | | | | | | | | | This change affects documentation and comments only, no real code involved. PR: misc/101245 Submitted by: Darren Pilgrim <darren pilgrim bitfreak org> Tested by: md5(1) MFC after: 1 week Notes: svn path=/head/; revision=160964
* This driver has been MPSAFE from the beginning, so declare the interruptHartmut Brandt2006-03-211-2/+2
| | | | | | | | | as such. Reminded by: rwatson@ Notes: svn path=/head/; revision=156949
* Replace m_extadd() with macro version MEXTADD().Andre Oppermann2005-09-191-2/+2
| | | | Notes: svn path=/head/; revision=150347
* Fix "struct ifnet" leak if attach() fails in the middle.Ruslan Ermilov2005-09-161-1/+3
| | | | Notes: svn path=/head/; revision=150220
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andRobert Watson2005-08-094-12/+12
| | | | | | | | | | | | | | | | | 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
* Fix another fallout from the ifnet change that assumed that a softcHartmut Brandt2005-07-012-2/+2
| | | | | | | | | | starts with an ifatm which in turns has an ifnet. Remove also a couple of unneccessary casts that could hide such things in the future. Approved by: re Notes: svn path=/head/; revision=147721
* Stop embedding struct ifnet at the top of driver softcs. Instead theBrooks Davis2005-06-107-84/+91
| | | | | | | | | | | | | | | | | | | | | | | 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
* Use BUS_PROBE_DEFAULT for pci probe return valueWarner Losh2005-03-051-1/+1
| | | | Notes: svn path=/head/; revision=143158
* Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh2005-01-069-9/+9
| | | | Notes: svn path=/head/; revision=139749
* Start the dreaded NOFOO -> NO_FOO conversion.Ruslan Ermilov2004-12-211-1/+1
| | | | | | | OK'ed by: core Notes: svn path=/head/; revision=139103
* For variables that are only checked with defined(), don't provideRuslan Ermilov2004-10-241-1/+1
| | | | | | | any fake value. Notes: svn path=/head/; revision=136910
* 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
* Eliminate multiple __FBSDID and sys/cdefs.h.Bruce M Simpson2004-03-107-15/+0
| | | | Notes: svn path=/head/; revision=126816
* All three of these drivers abused cv_waitq_empty in the same way by spinningScott Long2004-02-291-4/+1
| | | | | | | | | | | | on it in hopes of making sure that the waitq was empty before going on. This wasn't needed and probably never would have worked as intended. Now that cv_waitq_empty() and friends are gone, the code in these drivers that spins on it can go away too. This should unbreak LINT. Discussed with: kan Notes: svn path=/head/; revision=126396
* Fix style bug in last commit,Johan Karlsson2004-02-251-5/+5
| | | | | | | | | | | add a tab after WARNS?=. While I'm here fix other style bugs. Submitted by: bde (libbdf/Makefile) Notes: svn path=/head/; revision=126228
* style.Makefile(5):Johan Karlsson2004-02-241-4/+2
| | | | | | | | | | | Use WARNS?= instead of WARNS=. While I'm here, use INTERNALPROG, instead if overriding install remove emty lines Notes: svn path=/head/; revision=126199
* Added missing DPADD.Ruslan Ermilov2004-02-051-0/+1
| | | | Notes: svn path=/head/; revision=125500
* Replace the if_name and if_unit members of struct ifnet with new membersBrooks Davis2003-10-311-2/+1
| | | | | | | | | | | | | | | | 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
* Use __FBSDID().David E. O'Brien2003-08-247-0/+21
| | | | | | | Also some minor style cleanups. Notes: svn path=/head/; revision=119418
* Prefer new location of pci include files (which have only been in theWarner Losh2003-08-221-2/+2
| | | | | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD. Notes: svn path=/head/; revision=119285
* Change instances of callout_init that specify MPSAFE behaviour toSam Leffler2003-08-191-1/+1
| | | | | | | | use CALLOUT_MPSAFE instead of "1" for the second parameter. This does not change the behaviour; it just makes the intent more clear. Notes: svn path=/head/; revision=119137
* Make open channels persist across ifconfig down and up. All channelsHartmut Brandt2003-08-073-21/+40
| | | | | | | | that are not currently closing when the interface is configured down will be brough up as soon as the interface is configured up. Notes: svn path=/head/; revision=118601
* Remove the ATMIOCENA and ATMIOCDIS ioctl. Everyting has been convertedHartmut Brandt2003-08-061-47/+2
| | | | | | | | to use the new OPENVCC and CLOSEVCC calls that allow the sepcification of traffic parameters for the connections. Notes: svn path=/head/; revision=118548
* Honor the ATMIO_FLAG_ASYNC for asynchronuous open/close of VCs.Hartmut Brandt2003-08-064-10/+11
| | | | Notes: svn path=/head/; revision=118539
* Send events for VCC state changes, ACR rate changes and interface stateHartmut Brandt2003-07-293-9/+12
| | | | | | | changes. Notes: svn path=/head/; revision=118158
* Inline a function that gcc refused to inline. This function was usedHartmut Brandt2003-07-261-7/+2
| | | | | | | only in one place and it just served as semantic sugar. Notes: svn path=/head/; revision=118061
* When padding an mbuf chain to have a length that is a multipleHartmut Brandt2003-07-221-0/+1
| | | | | | | | | of 48 bytes for AAL0, we also need to update the packet header. Spotted by: Anil Madhavapeddy <anil@recoil.org> Notes: svn path=/head/; revision=117872