netgraph/ng_bridge: Document staleness in multithreaded operation

In the data path of ng_bridge(4), the only value of the host struct,
which needs to be modified, is the staleness, which is reset every
time a frame is received.  It's save to leave the code as it is.

This patch is part of a series to make ng_bridge(4) multithreaded.

Reviewed by:	kp
MFC after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D28546
This commit is contained in:
Lutz Donnerhacke 2021-02-09 12:32:46 +01:00
parent ccf4cd2e78
commit 011b7317db

View File

@ -739,7 +739,10 @@ ng_bridge_rcvdata(hook_p hook, item_p item)
/* Look up packet's source Ethernet address in hashtable */
if ((host = ng_bridge_get(priv, eh->ether_shost)) != NULL) {
/* Update time since last heard from this host */
/* Update time since last heard from this host.
* This is safe without locking, because it's
* the only operation during shared access.
*/
host->staleness = 0;
/* Did host jump to a different link? */