Created attachment 207415 [details] patch to ng_source in 12-STABLE train ng_source is a module for debugging and performance measurement within netgraph. The current implementation is designed to emit packets to an physical ethernet interface and tries to maximize the hardware throughput. There is already code to limit the packet rate injected (maxpps) further. The whole code is able to inject any netgraph messages into any netgraph network, despite the dependency to a physical interface prohibits this at the moment. This patch allows to use the ng_source module to be used in arbitary netgraph network. In order to limit the rate of packets injected, the maxpps part needs to be enforced if there is no assigned ethernet interface available. I personally use this patch to profile somewhat complex netgraph networks, which terminate in i.e. in eiface nodes.
Comment on attachment 207415 [details] patch to ng_source in 12-STABLE train Replaced by https://reviews.freebsd.org/D21968
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=75e7ef74dfc12e01b1ef4706110d238639e04543 commit 75e7ef74dfc12e01b1ef4706110d238639e04543 Author: Lutz Donnerhacke <donner@FreeBSD.org> AuthorDate: 2021-01-17 20:35:28 +0000 Commit: Lutz Donnerhacke <donner@FreeBSD.org> CommitDate: 2021-01-17 21:17:01 +0000 netgraph/ng_source: Allow ng_source to inject into any netgraph network PR: 240530 Reviewed by: kp Approved by: kp (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D21968 share/man/man4/ng_source.4 | 11 +++++++++-- sys/netgraph/ng_source.c | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-)
A commit in branch stable/12 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=591e21210e35b7b0ed0a8c39404e15a1225976bf commit 591e21210e35b7b0ed0a8c39404e15a1225976bf Author: Lutz Donnerhacke <donner@FreeBSD.org> AuthorDate: 2021-01-17 20:35:28 +0000 Commit: Lutz Donnerhacke <donner@FreeBSD.org> CommitDate: 2021-02-16 08:25:59 +0000 netgraph/ng_source: Allow ng_source to inject into any netgraph network PR: 240530 Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D21968 (cherry picked from commit 75e7ef74dfc12e01b1ef4706110d238639e04543) share/man/man4/ng_source.4 | 11 +++++++++-- sys/netgraph/ng_source.c | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-)