DragonFly BSD

CVS log for src/sys/netinet/if_ether.c

[BACK] Up to [DragonFly] / src / sys / netinet

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.59: download - view: text, markup, annotated - select for diffs
Sat Nov 22 11:03:35 2008 UTC (6 years ago) by sephe
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.58: preferred, unified
Changes since revision 1.58: +1 -2 lines
Remove MSGF_PRIORITY support.  The flag testing and message queue selection
on the hot code path introduce noticeable performance regression during ip
forwarding (from 667Kpps to 655Kpps w/ 64bytes packet and fastforwarding
enabled on Phenom 9550).

Revision 1.58: download - view: text, markup, annotated - select for diffs
Sun Nov 9 10:18:42 2008 UTC (6 years ago) by sephe
Branches: MAIN
Diff to: previous 1.57: preferred, unified
Changes since revision 1.57: +51 -2 lines
- During ARP resolving, current thread msgport or current CPU's netisr msgport
  (if current is not TDF_NETWORK) is recorded in addition to the mbuf.
- When ARP resolving is finished, the recorded mbuf is dispatched to the
  recorded msgport to do network output using priority message.

This eliminates the last network output in route threads.

Reviewed-by: dillon@

Revision 1.57: download - view: text, markup, annotated - select for diffs
Tue Oct 7 22:30:31 2008 UTC (6 years, 1 month ago) by thomas
Branches: MAIN
Diff to: previous 1.56: preferred, unified
Changes since revision 1.56: +1 -0 lines
 - fix UP build

Revision 1.56: download - view: text, markup, annotated - select for diffs
Sat Oct 4 11:26:09 2008 UTC (6 years, 1 month ago) by sephe
Branches: MAIN
Diff to: previous 1.55: preferred, unified
Changes since revision 1.55: +21 -6 lines
- Add tunable (net.link.ether.inet.arp_mpsafe) to register ARP as MPSAFE netisr.
- Hold BGL on CARP in arp input path.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Wed Oct 1 09:16:18 2008 UTC (6 years, 1 month ago) by sephe
Branches: MAIN
Diff to: previous 1.54: preferred, unified
Changes since revision 1.54: +92 -30 lines
Split arprequest() into two parts, arpreq_alloc() and arpreq_send().
arprequest() simply calls these two functions sequencially.

Add arprequest_async(), which allocates the arp request using arpreq_alloc()
and then dispatch the real sending (arpreq_send()) to current CPU's netisr.
Callers of arprequest_async() do not need to worry about the ifp's serializer
state.  This function also makes sure that the network output happens in
TDF_NETWORK kernel thread.

Let arp_ifinit(), arp_ifinit2() and arp_rtrequest() call arprequest_async().

Revision 1.54: download - view: text, markup, annotated - select for diffs
Wed Oct 1 07:29:16 2008 UTC (6 years, 1 month ago) by sephe
Branches: MAIN
Diff to: previous 1.53: preferred, unified
Changes since revision 1.53: +3 -3 lines
- Constify 'enaddr'
- Minor style change

Revision 1.53: download - view: text, markup, annotated - select for diffs
Sat Sep 27 11:29:47 2008 UTC (6 years, 1 month ago) by sephe
Branches: MAIN
Diff to: previous 1.52: preferred, unified
Changes since revision 1.52: +8 -9 lines
For SMP kernel
- Don't call arp_update_oncpu() again in in_arpinput()
- Pass dologging to arp_update_oncpu(), only if the current cpu is CPU0,
  remove the redundant cpu==0 checks

Reviewed-by: dillon@

Revision 1.52: download - view: text, markup, annotated - select for diffs
Thu Sep 25 14:08:06 2008 UTC (6 years, 1 month ago) by sephe
Branches: MAIN
Diff to: previous 1.51: preferred, unified
Changes since revision 1.51: +37 -45 lines
- Minor style and white space changes
- Break long line

Revision 1.51: download - view: text, markup, annotated - select for diffs
Wed Sep 24 14:26:39 2008 UTC (6 years, 1 month ago) by sephe
Branches: MAIN
Diff to: previous 1.50: preferred, unified
Changes since revision 1.50: +2 -1 lines
Add NETISR_FLAG_NOTMPSAFE, which could be used as the last parameter to
netisr_register(), more expressive and less error-prone than 0.

Suggested-by: hsu@

Revision 1.50: download - view: text, markup, annotated - select for diffs
Tue Sep 23 11:28:49 2008 UTC (6 years, 1 month ago) by sephe
Branches: MAIN
Diff to: previous 1.49: preferred, unified
Changes since revision 1.49: +1 -1 lines
Add following three network protocol threads running mode:
1) BGL (default)
2) Adaptive BGL.  Protocol threads run without BGL by default.  BGL will be
   held if the received msg does not have MSGF_MPSAFE turned on the ms_flags
   field
3) No BGL (experimental)

The code on the main path is done by dillon@

Following three sysctls and tunables are added to adjust the "mode":
net.netisr.mpsafe_thread
net.inet.tcp.mpsafe_thread
net.inet.udp.mpsafe_thread

They have same set of values,
0 (default) -- BGL
1 	    -- Adaptive BGL
2 	    -- No BGL



NETISR_FLAG_MPSAFE is added (netisr.ni_flags), so that:
- netisr_queue() and schednetisr() could set MSGF_MPSAFE during msg
  initialization
- netisr_run() (called by ether_input_oncpu()) could hold BGL based on this flag
  before calling netisr's handler



PR_MPSAFE is added (protosw.pr_flags), so that tranport_processing_oncpu() could
hold BGL before calling protocol's input handler



Kernel API changes:
- The thread parameter to netmsg_service_loop() must be supplied (running mode)
  and it must have the type of "int *"
- netisr_register() takes additional flags parameter to indicate whether its
  handler is MPSAFE (NETISR_FLAG_MPSAFE) or not

Reviewed-by: dillon@

Revision 1.49: download - view: text, markup, annotated - select for diffs
Mon Jun 9 11:24:24 2008 UTC (6 years, 5 months ago) by sephe
Branches: MAIN
CVS tags: DragonFly_RELEASE_2_0_Slip, DragonFly_RELEASE_2_0, DragonFly_Preview
Diff to: previous 1.48: preferred, unified
Changes since revision 1.48: +7 -2 lines
Parallelize in_ifaddrhashtbl

Revision 1.48: download - view: text, markup, annotated - select for diffs
Sat May 31 08:29:05 2008 UTC (6 years, 5 months ago) by sephe
Branches: MAIN
Diff to: previous 1.47: preferred, unified
Changes since revision 1.47: +15 -17 lines
- Avoid excessive goto
- Adjust arphdr pointer, if we need to do another m_pullup()
- Indentation in switch block

Obtained-from: FreeBSD w/ mod

Revision 1.47: download - view: text, markup, annotated - select for diffs
Wed May 28 12:11:13 2008 UTC (6 years, 5 months ago) by sephe
Branches: MAIN
Diff to: previous 1.46: preferred, unified
Changes since revision 1.46: +8 -1 lines
- ifnet.if_output() should be called without ifnet.if_serializer being
  held.  Add assertion about it in ether_output().
- ether_output_frame() should be called without the ifnet.if_serializer
  being held.  Add assertion in it.
- arp_ifinit() will be called with ifnet.if_serializer being held.  To
  prevent serializer from recursion, ifnet.if_serializer is released
  before calling arprequest(), which supposes caller does not hold output
  iface's serializer.
- ifnet.if_serializer can't be held when calling arp_ifinit2().

Reported-by: dillon@

Revision 1.46: download - view: text, markup, annotated - select for diffs
Wed May 14 11:59:24 2008 UTC (6 years, 6 months ago) by sephe
Branches: MAIN
Diff to: previous 1.45: preferred, unified
Changes since revision 1.45: +3 -11 lines
Reduce ifnet.if_serializer contention on output path:
- Push ifnet.if_serializer holding down into each ifnet.if_output implementation
- Add a serializer into ifaltq, which is used to protect send queue instead of
  its parent's if_serializer.  This change has following implication:
  o  On output path, enqueueing packets and calling ifnet.if_start are decoupled
  o  In device drivers, poll->dev_encap_ok->dequeue operation sequence is no
     longer safe, instead dequeue->dev_encap_fail->prepend should be used
  This serializer will be held by using lwkt_serialize_adaptive_enter()
- Add altq_started field into ifaltq, which is used to interlock the calling
  of its parent's if_start, to reduce ifnet.if_serializer contention.
  if_devstart(), a helper function which utilizes ifaltq.altq_started, is added
  to reduce code duplication in ethernet device drivers.
- Add if_cpuid into ifnet.  This field indicates on which CPU device driver's
  interrupt will happen.
- Add ifq_dispatch().  This function will try to hold ifnet.if_serializer in
  order to call ifnet.if_start.  If this attempt fails, this function will
  schedule ifnet.if_start to be called on CPU located by ifnet.if_start_cpuid
  if_start_nmsg, which is per-CPU netmsg, is added to ifnet to facilitate
  ifnet.if_start scheduling.  ifq_dispatch() is called by ether_output_frame()
  currently
- Use ifq_classic_ functions, if altq is not enabled
- Fix various device drivers bugs in their if_start implementation
- Add ktr for ifq classic enqueue and dequeue
- Add ktr for ifnet.if_start

Revision 1.45: download - view: text, markup, annotated - select for diffs
Fri Mar 7 11:34:20 2008 UTC (6 years, 8 months ago) by sephe
Branches: MAIN
Diff to: previous 1.44: preferred, unified
Changes since revision 1.44: +4 -2 lines
Parallelize ifnet.if_addrhead accessing by duplicating the list itself
on each CPU, each list element points to ifaddr:
- Add SI_SUB_PRE_DRIVERS before SI_SUB_DRIVERS, so action could be taken
  before drivers' initialization (mainly before NIC driver's if_attach())
- Move netisr_init() to the FIRST of SI_SUB_PRE_DRIVERS, so that
  netmsg_service_port_init() could be called in earlier stage of system
  initialization.
- Create one thread on each CPU to propagate changes to ifnet.if_addrhead.
  Their thread ports are registered with netmsg_service_port_init() for
  port syncing operation.
- Change to ifnet.if_addrhead begins in netisr0, i.e. serial of changes
  to ifnet.if_addrhead are serialized by netisr0
- ifaddr's refcnt is moved to its list elements, i.e. per-CPU refcnt.
  They are initialized to 1 instead of 0.
- A magic field is added to ifaddr list element to make sure that IFAREF
  and IFAFREE are called on valid ifaddr list element.  This field is
  initialized to a magic value and is wiped out once the list element's
  refcnt drops to 0
- To close the gap between testing and freeing, once the ifaddr list
  element's refcnt drops to 0, ifa_portfn(0) (a thread's port on CPU0) is
  poked to check whether ifaddr is referenced on other CPUs, if not, then
  ifaddr is freed on ifa_portfn(0)

Reviewed-by: dillon@ (earlier version)

Revision 1.44: download - view: text, markup, annotated - select for diffs
Mon Feb 11 16:42:39 2008 UTC (6 years, 9 months ago) by nant
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_12_Slip, DragonFly_RELEASE_1_12
Diff to: previous 1.43: preferred, unified
Changes since revision 1.43: +6 -1 lines
Fix arprequest serialization.

arprequest() calls ifp->if_output() without locally grabbing the
respective serializer, so ASSERT_SERIALIZED at the beginning of the
function.
Grab the serializer at arp_rtrequest() when it calls arprequest().

Reviewed-by: sephe@

Revision 1.43: download - view: text, markup, annotated - select for diffs
Sat Sep 8 12:35:04 2007 UTC (7 years, 2 months ago) by sephe
Branches: MAIN
Diff to: previous 1.42: preferred, unified
Changes since revision 1.42: +0 -2 lines
Kill token ring remainder.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Mon Aug 27 16:15:42 2007 UTC (7 years, 2 months ago) by hasso
Branches: MAIN
Diff to: previous 1.41: preferred, unified
Changes since revision 1.41: +0 -2 lines
Nuke FDDI support.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Mon Aug 27 14:56:00 2007 UTC (7 years, 2 months ago) by hasso
Branches: MAIN
Diff to: previous 1.40: preferred, unified
Changes since revision 1.40: +0 -73 lines
Nuke token ring support. This also means one blob less in DragonFly.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Mon Aug 27 13:15:14 2007 UTC (7 years, 2 months ago) by hasso
Branches: MAIN
Diff to: previous 1.39: preferred, unified
Changes since revision 1.39: +3 -27 lines
Nuke ARCnet support.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Thu Aug 16 20:03:57 2007 UTC (7 years, 3 months ago) by dillon
Branches: MAIN
Diff to: previous 1.38: preferred, unified
Changes since revision 1.38: +35 -3 lines
Bring CARP into the tree.  CARP = Common Address Redundancy Protocol, which
allows an IP address to hot switch to backup machine(s) when the master goes
offline.

Submitted-by:	Baptiste Ritter <baptiste.ritter@ulp.u-strasbg.fr>,
		Jonathan, and Nicolas
Testing-by:	Thomas Nikolajsen, Gergo Szakal
Obtained-from:	OpenBSD, NetBSD, and FreeBSD

Revision 1.38: download - view: text, markup, annotated - select for diffs
Thu May 24 20:51:22 2007 UTC (7 years, 6 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_10_Slip, DragonFly_RELEASE_1_10
Diff to: previous 1.37: preferred, unified
Changes since revision 1.37: +1 -1 lines
Add lwkt_sleep() to formalize a shortcut numerous bits of code have been
using for a while, which is to directly deschedule oneself and switch away.
This method of blocking requires a direct lwkt_schedule() call to reschedule
the thread and is primarily used by the message port abstraction.

Change the psignal code to check TDF_SINTR in the thread flags instead
of checking MSGPORTF_WAITING in the thread's private message port.

The lwkt_waitmsg() and lwkt_waitport() functions use the same msgport
backend function (mp_waitport).  Separate the backend into two functions,
mp_waitport and mp_waitmsg, and allow tsleep flags to be passed in instead
of flagging interruptability in the lwkt_msg flags.

Optimize the lwkt_waitmsg() backends - in the fully synchronous critical
path case no critical sections or spinlocks are required at all.

Revision 1.37: download - view: text, markup, annotated - select for diffs
Wed May 23 08:57:09 2007 UTC (7 years, 6 months ago) by dillon
Branches: MAIN
Diff to: previous 1.36: preferred, unified
Changes since revision 1.36: +18 -17 lines
* Greatly reduce the complexity of the LWKT messaging and port abstraction.
  Significantly reduce the overhead of the subsystem.

* The message abort algorithm has been rewritten.  It now sends a
  separate message to issue the abort instead of trying to requeue
  the original message.  This also means the TAILQ embedded in the
  lwkt_msg structure can be used by unrelated code during processing
  of the message.

* Numerous MSGF_ flags have been removed, and all the LWKT msg/port
  algorithms have been rewritten and simplified.  The message structure
  is now only touched by the current owner in all situations.

* Numerous structural fields have been removed.  In particular, the
  fields used for message abort sequencing have been simplified and
  we do not try to embed a 'command' field in the base LWKT message
  any more.

* Clean up the netmsg abstraction, which is used all over the network stack.
  Instead of trying to overload fields in lwkt_msg we now simply extend
  the base lwkt_msg into struct netmsg.  The function dispatch now takes
  a netmsg and returns void (before we had to return EASYNC), and we no
  longer need weird casts.

  Accept/connect message aborts are now greatly simplified.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Sun Mar 4 18:51:59 2007 UTC (7 years, 8 months ago) by swildner
Branches: MAIN
Diff to: previous 1.35: preferred, unified
Changes since revision 1.35: +0 -18 lines
Remove weird license clause which has expired.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Fri Dec 22 23:57:52 2006 UTC (7 years, 11 months ago) by swildner
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_8_Slip, DragonFly_RELEASE_1_8
Diff to: previous 1.34: preferred, unified
Changes since revision 1.34: +1 -1 lines
Rename printf -> kprintf in sys/ and add some defines where necessary
(files which are used in userland, too).

Revision 1.34: download - view: text, markup, annotated - select for diffs
Thu Jul 20 16:22:48 2006 UTC (8 years, 4 months ago) by corecode
Branches: MAIN
Diff to: previous 1.33: preferred, unified
Changes since revision 1.33: +32 -13 lines
Fix bug introduced in rev 1.33 and make a clearer code flow.

Noticed-by: y0netani

Revision 1.33.2.1: download - view: text, markup, annotated - select for diffs
Thu Jul 20 16:22:48 2006 UTC (8 years, 4 months ago) by corecode
Branches: DragonFly_RELEASE_1_6
CVS tags: DragonFly_RELEASE_1_6_Slip
Diff to: previous 1.33: preferred, unified; next MAIN 1.34: preferred, unified
Changes since revision 1.33: +32 -13 lines
Fix bug introduced in rev 1.33 and make a clearer code flow.

Noticed-by: y0netani

Revision 1.33: download - view: text, markup, annotated - select for diffs
Sun Jun 25 11:02:40 2006 UTC (8 years, 4 months ago) by corecode
Branches: MAIN
Branch point for: DragonFly_RELEASE_1_6
Diff to: previous 1.32: preferred, unified
Changes since revision 1.32: +2 -42 lines
Remove OLDBRIDGE

Revision 1.32: download - view: text, markup, annotated - select for diffs
Sat May 20 06:32:40 2006 UTC (8 years, 6 months ago) by dillon
Branches: MAIN
Diff to: previous 1.31: preferred, unified
Changes since revision 1.31: +1 -1 lines
Embed the netmsg in the mbuf itself rather than allocating one for
each received packet.  This greatly reduces the overhead in the
network receive path (removing a malloc() and free()).

Revision 1.31: download - view: text, markup, annotated - select for diffs
Tue Jan 31 19:05:39 2006 UTC (8 years, 9 months ago) by dillon
Branches: MAIN
Diff to: previous 1.30: preferred, unified
Changes since revision 1.30: +206 -115 lines
Bring in the parallel route table code and clean up ARP.  The
route table is now replicated across all cpus (ncpus, not ncpus2).
Note that cloned routes are not replicated.

This removes one of the few remaining obstacles to being able
to run the network protocol stacks without the BGL.

Primary-Design-by: Jeffrey Hsu
Work-by: Jeffrey Hsu and Matthew Dillon

Revision 1.30: download - view: text, markup, annotated - select for diffs
Wed Dec 21 16:40:25 2005 UTC (8 years, 11 months ago) by corecode
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_4_Slip, DragonFly_RELEASE_1_4
Diff to: previous 1.29: preferred, unified
Changes since revision 1.29: +32 -4 lines
Bring in if_bridge from Open-/Net-/FreeBSD

Based-on-patch-by: Andrew Atrens
Reviewed-and-locking-corrected-by: dillon and sephe

Revision 1.29: download - view: text, markup, annotated - select for diffs
Mon Dec 19 00:07:02 2005 UTC (8 years, 11 months ago) by corecode
Branches: MAIN
Diff to: previous 1.28: preferred, unified
Changes since revision 1.28: +1 -1 lines
Adjust sources to accomodate for repo copy of our bridging code

sys/net/bridge was copied to sys/net/oldbridge

Revision 1.28: download - view: text, markup, annotated - select for diffs
Mon Nov 28 17:13:46 2005 UTC (8 years, 11 months ago) by dillon
Branches: MAIN
Diff to: previous 1.27: preferred, unified
Changes since revision 1.27: +4 -0 lines
Make all network interrupt service routines MPSAFE part 1/3.

Replace the critical section that was previously used to serialize access
with the LWKT serializer.  Integrate the serializer into the IFNET structure.
Note that kern.intr_mpsafe must be set to 1 for network interrupts to actually
run MPSAFE.  Also note that any interrupts shared with othre non-MP drivers
will cause all drivers on that interrupt to run with the Big Giant Lock.

Network interrupt - Each network driver then simply passes that serializer
to bus_setup_intr() so only a single serializer is required to process the
entire interrupt path.  LWKT serialization support is already 100% integrated
into the interrupt subsystem so it will already be held as of when the
registered interrupt procedure is called.

Ioctl and if_* functions - All callers of if_* functions (such as if_start,
if_ioctl, etc) now obtain the IFNET serializer before making the call.  Thus
all of these entry points into the driver will now be serialized.

if_input - All code that calls if_input now ensures that the serializer
is held.  It will either already be held (when called from a driver), or
the serializer will be wrapped around the call.  When packets are forwarded
or bridged between interfaces, the target interface serializer will be
dropped temporarily to avoid a deadlock.

Device Driver access - dev_* entry points into certain pseudo-network
devices now obtain and release the serializer.  This had to be done on
a device-by-device basis (but there are only a few such devices).

Thanks to several people for helping test the patch, in particular
Sepherosa Ziehau.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Thu Jun 2 23:52:42 2005 UTC (9 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.26: preferred, unified
Changes since revision 1.26: +2 -2 lines
Remove spl*() calls from netinet, replacing them with critical sections.
A slight rearrangement of COMMON_START() in tcp_usrreq.c was necessary to
ensure that the inp is loaded after  entering the critical section.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Fri Mar 4 03:48:25 2005 UTC (9 years, 8 months ago) by hsu
Branches: MAIN
CVS tags: DragonFly_Stable, DragonFly_RELEASE_1_2_Slip, DragonFly_RELEASE_1_2
Diff to: previous 1.25: preferred, unified
Changes since revision 1.25: +2 -7 lines
Cosmetic changes only.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Sun Jan 23 06:41:55 2005 UTC (9 years, 10 months ago) by hsu
Branches: MAIN
Diff to: previous 1.24: preferred, unified
Changes since revision 1.24: +1 -0 lines
Now that we generate the ethernet header in place in the mbuf instead
of in a secondary buffer, we have to remove space for the old ethernet
header before we send a packet waiting for ARP resolution back to
ether_output() again.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Thu Jan 6 17:59:32 2005 UTC (9 years, 10 months ago) by hsu
Branches: MAIN
Diff to: previous 1.23: preferred, unified
Changes since revision 1.23: +56 -3 lines
Now that I understand the poorly written BSD routing code and what
it was trying to do, rewrite it in a clear and concise manner.

The old rtalloc1() code written by CSRG had a number of problems:
  1. it was not clear which route was being returned
  2. it was not clear what was being reported
  3. it hid the essential radix tree lookup operation inside a series of
      conditional tests and inline assignments
  4. it had multiple gotos to the inside of if statements
  5. it intermixed reporting code with the operational logic of lookup
      and cloning
  6. it assigns multiple times to key variables
  7. it has unnecessary assignments to key variables
  8. it overloaded the "report" argument parameter, to have two
      different semantics
  9. it misnamed the key route lookup function "rtalloc1", obscuring all uses
      of route lookup.

In contrast to the rtalloc1 code in FreeBSD 4 or the even more convoluted
rtalloc1 code in FreeBSD 5, the DragonFlyBSD version
  A. has a clear control flow that makes the common case obvious
      by highlighting the core call to the radix tree look up function,
      eliminating gotos into if statements,
      and completely separating out the special-case cloning logic
  B. makes it clear which route is being returned
      by only assigning once to the key "rt" variable
      and by expliciting returning "rt" or "clonedroute"
  C. abstracts out the reporting code into its own reporting API
  D. cleans up the semantics of the "report" argument parameter to
      only indicate whether to report a miss and not whether to clone
  E. introduces a simple single-argument API for caller that want to clone
      and those that do not.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Thu Jan 6 09:14:13 2005 UTC (9 years, 10 months ago) by hsu
Branches: MAIN
Diff to: previous 1.22: preferred, unified
Changes since revision 1.22: +16 -17 lines
Cosmetic cleanups.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Tue Dec 28 08:09:59 2004 UTC (9 years, 10 months ago) by hsu
Branches: MAIN
Diff to: previous 1.21: preferred, unified
Changes since revision 1.21: +10 -10 lines
Clean up the networking code before I parallelize the routing code.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Tue Dec 21 02:54:15 2004 UTC (9 years, 11 months ago) by hsu
Branches: MAIN
Diff to: previous 1.20: preferred, unified
Changes since revision 1.20: +118 -125 lines
Clean up the routing and networking code before I parallelize routing.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Tue Dec 14 18:46:08 2004 UTC (9 years, 11 months ago) by hsu
Branches: MAIN
Diff to: previous 1.19: preferred, unified
Changes since revision 1.19: +6 -10 lines
Clean up routing code before I parallelize it.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Sat Dec 11 01:04:00 2004 UTC (9 years, 11 months ago) by hsu
Branches: MAIN
Diff to: previous 1.18: preferred, unified
Changes since revision 1.18: +7 -6 lines
Merge from FreeBSD:
  revision 1.102
  date: 2003/02/08 15:05:15;  author: orion;  state: Exp;  lines: +7 -6
  Avoid multiply for preemptive arp calculation since it hits every
  ethernet packet sent.

  Prompted by: Jeffrey Hsu <hsu@FreeBSD.org>

Revision 1.18: download - view: text, markup, annotated - select for diffs
Sat Nov 20 04:14:29 2004 UTC (10 years ago) by dillon
Branches: MAIN
Diff to: previous 1.17: preferred, unified
Changes since revision 1.17: +2 -2 lines
Fix a conditional.  sdl was not unconditionally being checked for NULL.

Found-by: Mikhail Teterin <mi+kde@aldan.algebra.com>

Revision 1.17: download - view: text, markup, annotated - select for diffs
Wed Nov 17 21:04:05 2004 UTC (10 years ago) by joerg
Branches: MAIN
Diff to: previous 1.16: preferred, unified
Changes since revision 1.16: +1 -1 lines
Normally we want to warn if the local IP address is used by a different
host. This isn't useful for 0.0.0.0, because it is used by dhclient
when no address is known.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Tue Nov 2 23:49:30 2004 UTC (10 years ago) by dillon
Branches: MAIN
Diff to: previous 1.15: preferred, unified
Changes since revision 1.15: +11 -5 lines
Fix 'route add -host <target> -interface <interface_name>.  This was
previously adding a static arp entry with the interface's MAC address
instead of the target's address or an incomplete address.  The result is
that the target cannot be routed to.

The fix is to (1) Install the route with 'incomplete' link level info rather
then using the interface's MAC address, (2) Allowing the incomplete address
to be resolved and timeout normally, (3) re-clearing the entry to an
incomplete status instead of destroying it when the ARP times out,
and (4) Making 'arp -d -a' only clear link level routes marked static
instead of deleting them.

Noticed-by: Mikhail Teterin <mi+dragonflybsd@aldan.algebra.com>

Revision 1.15: download - view: text, markup, annotated - select for diffs
Thu Sep 16 23:14:29 2004 UTC (10 years, 2 months ago) by joerg
Branches: MAIN
CVS tags: DragonFly_Snap29Sep2004
Diff to: previous 1.14: preferred, unified
Changes since revision 1.14: +5 -2 lines
timeout/untimeout ==> callout_*

This moves the reset of the arptimer after the list processing. There's no
protection against multiple runs here, so this makes more sense.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Sat Jul 17 09:43:05 2004 UTC (10 years, 4 months ago) by joerg
Branches: MAIN
CVS tags: DragonFly_Snap13Sep2004
Diff to: previous 1.13: preferred, unified
Changes since revision 1.13: +6 -13 lines
Add if_broadcastaddr to struct ifnet to hold the link layer broadcast address.
Use this in place of the various direct references esp. to etherbroadcastaddr.

Inspired-by: NetBSD if.h, rev. 1.29

Revision 1.13: download - view: text, markup, annotated - select for diffs
Wed Jun 2 14:43:01 2004 UTC (10 years, 5 months ago) by eirikn
Branches: MAIN
CVS tags: DragonFly_1_0_REL, DragonFly_1_0_RC1, DragonFly_1_0A_REL
Diff to: previous 1.12: preferred, unified
Changes since revision 1.12: +1 -1 lines
Change mbug allocation flags from M_ to MB_ to avoid confusion with malloc
flags.

Requested by: Jeffrey Hsu

Revision 1.12: download - view: text, markup, annotated - select for diffs
Wed Apr 21 18:13:56 2004 UTC (10 years, 7 months ago) by dillon
Branches: MAIN
Diff to: previous 1.11: preferred, unified
Changes since revision 1.11: +9 -8 lines
Fix a netmsg memory leak in the ARP code.  Adjust all ms_cmd function
dispatches to return a proper error code.

Reported-by: multiple people

Revision 1.11: download - view: text, markup, annotated - select for diffs
Fri Apr 9 22:34:10 2004 UTC (10 years, 7 months ago) by hsu
Branches: MAIN
Diff to: previous 1.10: preferred, unified
Changes since revision 1.10: +4 -0 lines
Push the lwkt_replymsg() up one level from netisr_service_loop() to
the message handler so we can explicitly reply or not reply as appropriate.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Sat Mar 6 01:58:55 2004 UTC (10 years, 8 months ago) by hsu
Branches: MAIN
Diff to: previous 1.9: preferred, unified
Changes since revision 1.9: +3 -2 lines
Dispatch upper-half protocol request handling.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Tue Jan 6 03:17:27 2004 UTC (10 years, 10 months ago) by dillon
Branches: MAIN
Diff to: previous 1.8: preferred, unified
Changes since revision 1.8: +7 -7 lines
if_xname support Part 2/2: Convert remaining netif devices and implement full
support for if_xname.  Restructure struct ifnet in net/if_var.h, pulling in
a few minor additional changes from current including making if_dunit an int,
and making if_flags an int.

Submitted-by: Max Laier <max@love2party.net>

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sat Nov 8 07:57:51 2003 UTC (11 years ago) by dillon
Branches: MAIN
Diff to: previous 1.7: preferred, unified
Changes since revision 1.7: +1 -2 lines
Network threading stage 1/3: netisrs are already software interrupts,
which means they alraedy run in their own thread.  This commit creates
multiple supporting threads for netisrs rather then just one and code
has been added to begin routing packets to particular threads based on
their content.  Eventually this will lead to us being able to isolate and
serialize PCBs in particular threads.  The tail end of the ip_input path's
protocol dispatch, the UIPC (user entry) code, and listen socket have not
been covered yet and still need to be serialized.

A new debugging sysctl, net.inet.ip.mthread_enable, has been added.  It
defaults to 1.  If you set this sysctl 0 netisr processing will revert to
the prior single-threaded behavior.

Submitted-by: Jeffrey Hsu <hsu@FreeBSD.org>
Additional-work-by: dillon

Revision 1.7: download - view: text, markup, annotated - select for diffs
Thu Sep 25 02:22:23 2003 UTC (11 years, 1 month ago) by dillon
Branches: MAIN
Diff to: previous 1.6: preferred, unified
Changes since revision 1.6: +14 -6 lines
Apply FreeBSD Security Advisory FreeBSD-SA-03:14.arp.  Fix DOS crash due
to arp starvation.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Mon Sep 15 23:38:14 2003 UTC (11 years, 2 months ago) by hsu
Branches: MAIN
Diff to: previous 1.5: preferred, unified
Changes since revision 1.5: +34 -42 lines
Centralize if queue handling.

Original patch against FreeBSD submitted by Jonathan Lemon.
Reviewed by Matt Dillon.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Sat Aug 23 11:18:00 2003 UTC (11 years, 3 months ago) by rob
Branches: MAIN
Diff to: previous 1.4: preferred, unified
Changes since revision 1.4: +8 -8 lines
if ipv6 doesnt need oldstyle prototypes maybe its time we took them out
of ipv4's code

Revision 1.4: download - view: text, markup, annotated - select for diffs
Thu Aug 7 21:54:32 2003 UTC (11 years, 3 months ago) by dillon
Branches: MAIN
Diff to: previous 1.3: preferred, unified
Changes since revision 1.3: +1 -1 lines
kernel tree reorganization stage 1: Major cvs repository work (not logged as
commits) plus a major reworking of the #include's to accomodate the
relocations.

    * CVS repository files manually moved.  Old directories left intact
      and empty (temporary).

    * Reorganize all filesystems into vfs/, most devices into dev/,
      sub-divide devices by function.

    * Begin to move device-specific architecture files to the device
      subdirs rather then throwing them all into, e.g. i386/include

    * Reorganize files related to system busses, placing the related code
      in a new bus/ directory.  Also move cam to bus/cam though this may
      not have been the best idea in retrospect.

    * Reorganize emulation code and place it in a new emulation/ directory.

    * Remove the -I- compiler option in order to allow #include file
      localization, rename all config generated X.h files to use_X.h to
      clean up the conflicts.

    * Remove /usr/src/include (or /usr/include) dependancies during the
      kernel build, beyond what is normally needed to compile helper
      programs.

    * Make config create 'machine' softlinks for architecture specific
      directories outside of the standard <arch>/include.

    * Bump the config rev.

    WARNING! after this commit /usr/include and /usr/src/sys/compile/*
    should be regenerated from scratch.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sat Jul 26 21:00:04 2003 UTC (11 years, 3 months ago) by rob
Branches: MAIN
Diff to: previous 1.2: preferred, unified
Changes since revision 1.2: +27 -27 lines
Register keyword removal

Approved by: Matt Dillon

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue Jun 17 04:28:51 2003 UTC (11 years, 5 months ago) by dillon
Branches: MAIN
CVS tags: PRE_MP
Diff to: previous 1.1: preferred, unified
Changes since revision 1.1: +1 -0 lines
Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids.  Most
ids have been removed from !lint sections and moved into comment sections.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Tue Jun 17 02:55:33 2003 UTC (11 years, 5 months ago) by dillon
Branches: MAIN
CVS tags: FREEBSD_4_FORK
import from FreeBSD RELENG_4 1.64.2.23

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options