Commit Graph

99 Commits

Author SHA1 Message Date
Andrew Gallatin
7687707dd4 Track device's NUMA domain in ifnet & alloc ifnet from NUMA local memory
This commit adds new if_alloc_domain() and if_alloc_dev() methods to
allocate ifnets.  When called with a domain on a NUMA machine,
ifalloc_domain() will record the NUMA domain in the ifnet, and it will
allocate the ifnet struct from memory which is local to that NUMA
node.  Similarly, if_alloc_dev() is a wrapper for if_alloc_domain
which uses a driver supplied device_t to call ifalloc_domain() with
the appropriate domain.

Note that the new if_numa_domain field fits in an alignment pad in
struct ifnet, and so does not alter the size of the structure.

Reviewed by:	glebius, kib, markj
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D19930
2019-04-22 19:24:21 +00:00
Vincenzo Maffione
4657bceacf ifnet(9): Add description of IFCAP_NETMAP
Describe IFCAP_NETMAP adding a cross reference to netmap(4).

Reviewed by:	bcr, 0mp
Approved by:	gnn (mentor)
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D17988
2018-11-16 10:20:35 +00:00
Gleb Smirnoff
17eea3202a Garbage collect IFCAP_POLLING_NOCOUNT. It wasn't used since very
beginning of polling(4).  The module always ignored return value
from driver polling handler.
2017-12-06 23:03:34 +00:00
Enji Cooper
114af3cd74 ifnet(9): fix some igor/manlint warnings
- Fix typos (queueing -> queuing) [1].
- Add missing section number for polling .Xr reference [2].

MFC after:	1 week
Reported by:	igor [1], make manlint [2]
Sponsored by:	Dell EMC Isilon
2017-03-23 06:02:23 +00:00
Kevin Lo
10e8bf63b0 Add description for ifi_oqdrops. 2016-10-08 14:58:26 +00:00
Kevin Lo
3925fe3135 - Prefer if_addrhead (FreeBSD) to if_addrlist (BSD compat) naming for the
interface address list
- Update IFF_RENAMING macro descriptions
2016-09-27 08:47:02 +00:00
Pyun YongHyeon
f2e1e9bd53 Belatedly remove CSUM_IP_FRAGS and CSUM_FRAGMENT offloading
capabilities.  It was removed in r243624 and r254804/r271006
respectively.
This file and mbuf(9) needs updates for other offloading
capabilities(i.e. CSUM_SCTP and CSUM_TSO).
2016-07-11 06:49:56 +00:00
Christian Brueffer
548afe2bec Fix mandoc warnings/errors.
MFC after:	1 week
2015-08-12 11:56:19 +00:00
Sergey Kandaurov
ccc785556c Deshallify. 2015-06-15 23:30:54 +00:00
Christian Brueffer
1e9469d188 Fix various mdoc issues and some EOL whitespace.
Found with:	mandoc -Tlint
2014-12-21 10:57:42 +00:00
Alan Somers
4f8585e021 Revisions 264905 and 266860 added a "int fib" argument to ifa_ifwithnet and
ifa_ifwithdstaddr. For the sake of backwards compatibility, the new
arguments were added to new functions named ifa_ifwithnet_fib and
ifa_ifwithdstaddr_fib, while the old functions became wrappers around the
new ones that passed RT_ALL_FIBS for the fib argument. However, the
backwards compatibility is not desired for FreeBSD 11, because there are
numerous other incompatible changes to the ifnet(9) API. We therefore
decided to remove it from head but leave it in place for stable/9 and
stable/10. In addition, this commit adds the fib argument to
ifa_ifwithbroadaddr for consistency's sake.

sys/sys/param.h
	Increment __FreeBSD_version

sys/net/if.c
sys/net/if_var.h
sys/net/route.c
	Add fibnum argument to ifa_ifwithbroadaddr, and remove the _fib
	versions of ifa_ifwithdstaddr, ifa_ifwithnet, and ifa_ifwithroute.

sys/net/route.c
sys/net/rtsock.c
sys/netinet/in_pcb.c
sys/netinet/ip_options.c
sys/netinet/ip_output.c
sys/netinet6/nd6.c
	Fixup calls of modified functions.

share/man/man9/ifnet.9
	Document changed API.

CR:		https://reviews.freebsd.org/D458
MFC after:	Never
Sponsored by:	Spectra Logic
2014-09-11 20:21:03 +00:00
Gleb Smirnoff
9753faf553 Garbage collect couple of unused fields from struct ifaddr:
- ifa_claim_addr() unused since removal of NetAtalk
- ifa_metric seems to be never utilized, always a copy of if_metric
2014-07-29 15:01:29 +00:00
Joel Dahl
df2d82e003 mdoc: remove superfluous paragraph macros. 2014-06-23 18:40:21 +00:00
Gleb Smirnoff
af50ea380f Axe IFF_SMART. Fortunately this layering violating flag was never used,
it was just declared.
2013-11-05 12:52:56 +00:00
Gleb Smirnoff
5fb009bda7 Drop support for historic ioctls and also undefine them, so that code
that checks their presence via ifdef, won't use them.

Bump __FreeBSD_version as safety measure.
2013-11-05 10:29:47 +00:00
Gleb Smirnoff
a63fedfda7 Document constantness of dst argument to if_output.
Submitted by:	pluknet
2013-04-26 13:18:07 +00:00
Glen Barber
73bbeaa529 Typo and mdoc(7) style fixes.
PR:		168117
Submitted by:	Nobuyuki Koganemaru (kogane&jp!freebsd!org)
MFC after:	3 days
2012-05-20 16:43:47 +00:00
Sergey Kandaurov
19d3a14cde Expand contraction.
Spotted by:	bjk
2012-03-23 16:24:07 +00:00
Sergey Kandaurov
7ddc82cc53 Update IFCAP_* macro descriptions.
Reviewed by:	attilio (polling part, a previous version)
MFC after:	1 week
2012-03-23 10:39:50 +00:00
Sergey Kandaurov
b5c871bfe5 Clean up from the old kern.polling.
Reviewed by:	attilio
MFC after:	1 week
2012-03-23 10:33:24 +00:00
Sergey Kandaurov
e8809d66d1 Document IFT_USB referenced by IFF_CANTCONFIG since the previous change,
so that ifnet(9) is self contained.

MFC after:	1 week
2012-03-23 06:06:37 +00:00
Sergey Kandaurov
dac61c3d62 Update IFF_* macro descriptions.
MFC after:	1 week
2012-03-23 06:01:16 +00:00
Sergey Kandaurov
8a9b1b14f6 Update the list of struct ifnet fields.
- Document if_vnet, if_home_vnet, if_carp, if_vlantrunk, if_multiaddrs,
  if_amcount, if_addr, if_llsoftc stub, if_broadcastaddr, if_bridge,
  if_label, if_afdata, if_afdata_initialized, if_afdata_lock, if_linktask,
  if_addr_mtx (now if_addr_lock), if_clones, if_groups, if_pf_kif, if_lagg,
  if_alloctype
- G/c now defunct and/or commented out in the manual page if_ipending,
  if_poll_slowq, if_done, if_poll_recv, if_poll_xmit, if_poll_slowinput,
  if_poll_intren
- Update if_snd type changed with ALTQ integration.

MFC after:	1 week
2012-03-20 16:56:35 +00:00
Sergey Kandaurov
c46ad71972 Move struct if_data basic description to a more suitable place, and remove
a bit of .Bx 4.4 history.

MFC after:	1 week
2012-03-07 14:53:53 +00:00
Sergey Kandaurov
3f978c3537 Reflect that if_output changed to take a struct route as its fourth
argument (r191148).

MFC after:	1 week
2012-03-07 11:29:43 +00:00
Sergey Kandaurov
c469a8f18f Update ifa_rtrequest() description after post-4.4BSD change made in r85074.
3rd argument of ifa->ifa_rtrequest is now ``rt_addrinfo *'' instead of
``sockaddr *''. While here, un-document RTM_RESOLVE cmd argument for
ifa_rtrequest() that became a stub after separating L2 tables in r186119.

MFC after:	1 week
2012-03-07 09:42:19 +00:00
Sergey Kandaurov
5aa77f88ec Remove if_watchdog remnants after if_timer/if_watchdog removal in r199975.
This part was missed in r199992.

MFC after:	1 week
2012-03-06 12:20:37 +00:00
Sergey Kandaurov
8b7b8e14a8 Fix a typo: use lower case in "A Shorthand".
Noted by:	maxim
2012-03-06 09:57:50 +00:00
Sergey Kandaurov
4f0ab9dc95 Kill EoL whitespaces. 2012-03-06 09:40:34 +00:00
Sergey Kandaurov
40b39918be The missing part of r232588 that documents ifaddr_byindex() itself.
MFC after:	1 week
2012-03-06 09:04:53 +00:00
Sergey Kandaurov
2abee21cd7 - ifnet_addrs has gone and replaced by ifaddr_byindex(), as per r83130
- access to the AF_LINK address through if_addrhead is deprecated (r128315)

MFC after:	1 week
2012-03-06 08:59:42 +00:00
Sergey Kandaurov
c136083e86 Reflect the renaming of ifmaof_ifpforaddr() to if_findmulti() in r148652.
MFC after:	1 week
2012-03-02 09:52:42 +00:00
Sergey Kandaurov
1e0f75d313 ifp->if_ioctl() has moved to u_long cmd in r36735.
Somehow that change had not reached here together with ifioctl().

MFC after:	1 week
2012-03-02 09:30:54 +00:00
Sergey Kandaurov
40d5e8a628 Changes in ifaddr refcounting: ifa_refcnt IFAREF/IFAFREE macros
moved to ifa_ref()/ifa_free() refcounting functions.

MFC after:	1 week
2012-03-01 12:52:14 +00:00
Sergey Kandaurov
8963e1b501 Refine r232333 [1] and put note about ifnet refcount caller responsibility.
Spotted by:	gavin [1]
MFC after:	1 week
2012-03-01 12:30:57 +00:00
Sergey Kandaurov
1c6fed25bb Reflect that ifa_ifwithnet() gained ignore_ptp argument.
MFC after:	1 week
2012-03-01 12:16:00 +00:00
Sergey Kandaurov
86d2665cdb Document ifunit_ref function.
MFC after:	1 week
2012-03-01 12:03:52 +00:00
Sergey Kandaurov
89eb4374e3 Document ifnet refcount.
MFC after:	1 week
2012-03-01 11:03:39 +00:00
Gleb Smirnoff
2930db16a0 List supported ioctl commands instead of old one. 2012-01-26 11:08:55 +00:00
Sergey Kandaurov
06dafde167 Fix typo in OSIOCGIFADDR.
MFC after:	3 days
2011-09-27 07:05:41 +00:00
Bjoern A. Zeeb
35fd7bc020 Add infrastructure to allow all frames/packets received on an interface
to be assigned to a non-default FIB instance.

You may need to recompile world or ports due to the change of struct ifnet.

Submitted by:	cjsp
Submitted by:	Alexander V. Chernikov (melifaro ipfw.ru)
		(original versions)
Reviewed by:	julian
Reviewed by:	Alexander V. Chernikov (melifaro ipfw.ru)
MFC after:	2 weeks
X-MFC:		use spare in struct ifnet
2011-07-03 12:22:02 +00:00
Simon L. B. Nielsen
74aed54846 Missing IFCAP_* macro descriptions in ifnet(9).
PR:		docs/148952
Submitted by:	Lars Hartmann <lars@chaotika.org>
MFC after:	2 weeks
2010-07-27 08:45:29 +00:00
Ulrich Spörlein
aa12cea2cc mdoc: order prologue macros consistently by Dd/Dt/Os
Although groff_mdoc(7) gives another impression, this is the ordering
most widely used and also required by mdocml/mandoc.

Reviewed by:	ru
Approved by:	philip, ed (mentors)
2010-04-14 19:08:06 +00:00
John Baldwin
54721dc9f4 - Note that if_xname, if_dname, and if_dunit are usually initialized via
if_initname().
- Document if_drv_flags and replace references to IFF_(RUNNING|OACTIVE)
  with references to IFF_DRV_(RUNNING|OACTIVE).
- Complete truncated sentence in the description of if_transmit by copying
  from the description in if_qflush.
- Add missing line breaks for translators.

Reviewed by:	brooks (1)
MFC after:	3 days
2010-01-14 14:43:16 +00:00
Bjoern A. Zeeb
aaae58c491 Unbreak user space after if_timer/if_watchdog removal in r199975.
Tested by:	glebius
2009-12-01 14:56:00 +00:00
Kip Macy
a2b96afe46 Add entry for if_transmit and if_qflush 2008-12-11 22:51:11 +00:00
Bruce M Simpson
5e018b11ee Remove obsolete polling members from documentation for struct ifnet.
Submitted by:	Aniruddha Bohra
MFC after:	5 days
2007-03-14 13:19:50 +00:00
Mike Pritchard
9280e5fac2 Spelling fixes. 2006-12-14 14:33:13 +00:00
Giorgos Keramidas
6fb9b618f5 Fix all the spelling mistakes I could find in the man pages for words
that have at least 3 characters.

MFC after:	1 week
Thanks to:	Music band ``Chingon''
		for keeping me company while searching for these.
2005-07-31 03:30:48 +00:00
Ruslan Ermilov
4f06896130 Assorted markup fixes and minor wordsmithing.
Approved by:	re
2005-06-15 13:31:23 +00:00