The NetBSD Project

CVS log for src/sys/net/pktqueue.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / net

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.22: download - view: text, markup, annotated - select for diffs
Sun May 28 08:09:34 2023 UTC (19 months, 2 weeks ago) by andvar
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, HEAD
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +3 -3 lines
s/explcit/explicit/ in comment.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Sun Sep 4 17:34:43 2022 UTC (2 years, 4 months ago) by thorpej
Branches: MAIN
CVS tags: netbsd-10-base, netbsd-10-1-RELEASE, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +31 -6 lines
In pktq_flush():
- Run a dummy softint at IPL_SOFTNET on all CPUs to ensure that the
  ISR for this pktqueue is not running (addresses a pre-existing XXX).
- Hold the barrier lock around the critical section to ensure that
  implicit pktq_barrier() calls via pktq_ifdetach() are held off during
  the critical section.
- Ensure the critical section completes in minimal time by not freeing
  memory during the critical section; instead, just build a list of the
  packets pulled out of the per-CPU queues and free them after the critical
  section is over.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Fri Sep 2 05:50:36 2022 UTC (2 years, 4 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +62 -3 lines
Re-factor how pktq_barrier() is issued by if_detach().

Rather than excplicitly referencing ip_pktq and ip6_pktq in if_detach(),
instead add all pktqueues to a global list.  This list is then used in
the new pktq_ifdetach() function to issue a barrier on all pktqueues.

Note that the performance of this list is not critical; it will seldom
be accessed (then pktqueues are created/destroyed and when network
interfaces are detached), and so a simple synchronization strategy using
a rwlock is sufficient.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Fri Sep 2 03:50:00 2022 UTC (2 years, 4 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +69 -9 lines
pktqueue: Re-factor sysctl handling.

Provide a new pktq_sysctl_setup() function that attaches standard
pktq sysctl nodes below a specified parent node, with either a
fixed node ID or CTL_CREATE to dynamically assign node IDs.  Make
all of the sysctl handlers private to pktqueue.c, and remove the
INET- and INET6-specific pktqueue sysctl code from net/if.c.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Thu Sep 1 05:04:22 2022 UTC (2 years, 4 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +3 -3 lines
pktq_rps_hash(): Make the "funcp" argument const.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Thu Sep 1 02:35:06 2022 UTC (2 years, 4 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +12 -3 lines
pktq_dequeue(): Prevent packets from getting stuck beind barrier markers.

pktq_barrier() ensures that all packets enqueued before the barrier have
been dequeued before the barrier returns.  However, previously, pktq_dequeue()
would return NULL when a barrier marker was encountered.  If there were
packets queued up behind the marker and no additional softint were scheduled
for the pktqueue, those packets would end up stranded.  pktq_dequeue() now
continues to the next slot after the marker, ensuring that processing can
continue after the barrier has been signaled.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Tue Dec 21 04:09:32 2021 UTC (3 years ago) by knakahara
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +5 -2 lines
Fix net.*.rps_hash=toeplitz-othercpus on one CPU systems.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Wed Dec 15 07:47:22 2021 UTC (3 years ago) by knakahara
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +4 -4 lines
Fix typo in comment.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Mon Oct 11 05:13:11 2021 UTC (3 years, 3 months ago) by knakahara
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +144 -5 lines
Make pktq_rps_hash() pluggable for each interface type.  Reviewed by gdt@n.o, thorpej@n.o, and riastradh@n.o, thanks.

Revision 1.12.2.1: download - view: text, markup, annotated - select for diffs
Sat Apr 3 22:29:01 2021 UTC (3 years, 9 months ago) by thorpej
Branches: thorpej-futex
Diff to: previous 1.12: preferred, colored; next MAIN 1.13: preferred, colored
Changes since revision 1.12: +9 -11 lines
Sync with HEAD.

Revision 1.12.4.1: download - view: text, markup, annotated - select for diffs
Sat Apr 3 21:45:01 2021 UTC (3 years, 9 months ago) by thorpej
Branches: thorpej-cfargs
Diff to: previous 1.12: preferred, colored; next MAIN 1.13: preferred, colored
Changes since revision 1.12: +9 -11 lines
Sync with HEAD.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Thu Mar 25 08:18:03 2021 UTC (3 years, 9 months ago) by skrll
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +9 -11 lines
Remove strange padding #define and replace with anonymous struct/union

Revision 1.12: download - view: text, markup, annotated - select for diffs
Fri Sep 11 14:29:00 2020 UTC (4 years, 4 months ago) by riastradh
Branches: MAIN
Branch point for: thorpej-futex, thorpej-cfargs
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +106 -40 lines
pktqueue(9): Use percpu_create to allow early initialization.

Otherwise pktqueues can't be created before all CPUs are detected --
they will have a queue only for the primary CPU, not for others.

This will also be necessary if we want to add CPU hotplug (still need
some way to block hotplug during pktq_set_maxlen but it's a start).

Revision 1.9.10.2: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:08:57 2020 UTC (4 years, 9 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.9.10.1: preferred, colored; branchpoint 1.9: preferred, colored; next MAIN 1.10: preferred, colored
Changes since revision 1.9.10.1: +9 -3 lines
Merge changes from current as of 20200406

Revision 1.10.6.1: download - view: text, markup, annotated - select for diffs
Sat Feb 29 20:21:06 2020 UTC (4 years, 10 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.10: preferred, colored; next MAIN 1.11: preferred, colored
Changes since revision 1.10: +9 -3 lines
Sync with head.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Fri Feb 7 12:35:33 2020 UTC (4 years, 11 months ago) by thorpej
Branches: MAIN
CVS tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +9 -3 lines
Use percpu_foreach_xcall() to gather volatile per-cpu counters.  These
must be serialized against the interrupts / soft-interrupts in which
they're manipulated, as well as protected from non-atomic 64-bit memory
loads on 32-bit platforms.

Revision 1.9.10.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:09:45 2019 UTC (5 years, 7 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +4 -3 lines
Sync with HEAD

Revision 1.9.8.1: download - view: text, markup, annotated - select for diffs
Thu Sep 6 06:56:44 2018 UTC (6 years, 4 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.9: preferred, colored; next MAIN 1.10: preferred, colored
Changes since revision 1.9: +4 -3 lines
Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

Revision 1.10: download - view: text, markup, annotated - select for diffs
Fri Aug 10 07:24:09 2018 UTC (6 years, 5 months ago) by msaitoh
Branches: MAIN
CVS tags: phil-wifi-20191119, phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, netbsd-9-base, netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, isaki-audio2-base, isaki-audio2, ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +4 -3 lines
- Fix a bug that drop counter shows incorrect vaule like
  "net.inet.ip.ifq.drops = 72059810241052672"
- Change pktq's length sysctl to uint64_t.

Revision 1.8.6.3: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:39:02 2017 UTC (7 years, 1 month ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.8.6.2: preferred, colored; branchpoint 1.8: preferred, colored; next MAIN 1.9: preferred, colored
Changes since revision 1.8.6.2: +1 -3 lines
update from HEAD

Revision 1.8.8.1: download - view: text, markup, annotated - select for diffs
Mon Aug 28 17:53:11 2017 UTC (7 years, 4 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.8: preferred, colored; next MAIN 1.9: preferred, colored
Changes since revision 1.8: +3 -5 lines
Sync with HEAD

Revision 1.9: download - view: text, markup, annotated - select for diffs
Thu Jun 1 02:45:14 2017 UTC (7 years, 7 months ago) by chs
Branches: MAIN
CVS tags: tls-maxphys-base-20171202, phil-wifi-base, pgoyette-compat-base, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek
Branch point for: phil-wifi, pgoyette-compat
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +3 -5 lines
remove checks for failure after memory allocation calls that cannot fail:

  kmem_alloc() with KM_SLEEP
  kmem_zalloc() with KM_SLEEP
  percpu_alloc()
  pserialize_create()
  psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.

Revision 1.8.6.2: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:04:34 2014 UTC (10 years, 4 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.8.6.1: preferred, colored; branchpoint 1.8: preferred, colored
Changes since revision 1.8.6.1: +390 -0 lines
Rebase to HEAD as of a few days ago.

Revision 1.8.2.2: download - view: text, markup, annotated - select for diffs
Sun Aug 10 06:56:15 2014 UTC (10 years, 5 months ago) by tls
Branches: tls-earlyentropy
Diff to: previous 1.8.2.1: preferred, colored; branchpoint 1.8: preferred, colored; next MAIN 1.9: preferred, colored
Changes since revision 1.8.2.1: +390 -0 lines
Rebase.

Revision 1.8.6.1
Fri Jul 4 01:50:22 2014 UTC (10 years, 6 months ago) by tls
Branches: tls-maxphys
FILE REMOVED
Changes since revision 1.8: +0 -390 lines
file pktqueue.c was added on branch tls-maxphys on 2014-08-20 00:04:34 +0000

Revision 1.8.2.1
Fri Jul 4 01:50:22 2014 UTC (10 years, 6 months ago) by tls
Branches: tls-earlyentropy
FILE REMOVED
Changes since revision 1.8: +0 -390 lines
file pktqueue.c was added on branch tls-earlyentropy on 2014-08-10 06:56:15 +0000

Revision 1.8: download - view: text, markup, annotated - select for diffs
Fri Jul 4 01:50:22 2014 UTC (10 years, 6 months ago) by ozaki-r
Branches: MAIN
CVS tags: tls-maxphys-base, tls-earlyentropy-base, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: tls-maxphys, tls-earlyentropy, nick-nhusb
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +3 -3 lines
Fix pktq_enqueue for rump

Add _RUMP_NATIVE_ABI to the macro condition for i386 and x86_64 because
_RUMPKERNEL is not defined for them. See sys/rump/Makefile.rump.

Found by ATF

Revision 1.7: download - view: text, markup, annotated - select for diffs
Wed Jul 2 07:30:37 2014 UTC (10 years, 6 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +7 -3 lines
Restore RPS of pktq_enqueue unless _RUMPKERNEL

It's a workaround and would be fixed in rump soon.

ok pooka@

Revision 1.6: download - view: text, markup, annotated - select for diffs
Mon Jun 16 00:40:10 2014 UTC (10 years, 7 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +25 -2 lines
Move sysctl_pktq_{maxlen,count} to pktqueue.c and make them global

They will be used by bridge.

ok rmind@

Revision 1.5: download - view: text, markup, annotated - select for diffs
Mon Jun 16 00:33:39 2014 UTC (10 years, 7 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +4 -4 lines
Add 3rd argument to pktq_create to pass sc

It will be used to pass bridge sc for bridge_forward softint.

ok rmind@

Revision 1.4: download - view: text, markup, annotated - select for diffs
Mon Jun 9 14:44:48 2014 UTC (10 years, 7 months ago) by rmind
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +12 -10 lines
pktqueue: add or fix some comments, remove some header inclusions.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Mon Jun 9 13:03:16 2014 UTC (10 years, 7 months ago) by rmind
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +4 -4 lines
Restore the assert in RUMP's softint_schedule_cpu() and just ensure
curcpu() in the caller.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Mon Jun 9 12:57:04 2014 UTC (10 years, 7 months ago) by rmind
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +62 -2 lines
Implement pktq_set_maxlen() and let sysctl net.inet.{ip,ip6}.ifq.maxlen be
changed on the fly again.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Thu Jun 5 23:48:16 2014 UTC (10 years, 7 months ago) by rmind
Branches: MAIN
- Implement pktqueue interface for lockless IP input queue.
- Replace ipintrq and ip6intrq with the pktqueue mechanism.
- Eliminate kernel-lock from ipintr() and ip6intr().
- Some preparation work to push softnet_lock out of ipintr().

Discussed on tech-net.

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

CVSweb <webmaster@jp.NetBSD.org>