Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Jan 2020 05:48:36 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r356754 - head/sys/netinet
Message-ID:  <202001150548.00F5maIf099447@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Wed Jan 15 05:48:36 2020
New Revision: 356754
URL: https://svnweb.freebsd.org/changeset/base/356754

Log:
  Use official macro to enter/exit the network epoch. NFC

Modified:
  head/sys/netinet/tcp_ratelimit.c

Modified: head/sys/netinet/tcp_ratelimit.c
==============================================================================
--- head/sys/netinet/tcp_ratelimit.c	Wed Jan 15 05:45:27 2020	(r356753)
+++ head/sys/netinet/tcp_ratelimit.c	Wed Jan 15 05:48:36 2020	(r356754)
@@ -880,7 +880,7 @@ rt_setup_rate(struct inpcb *inp, struct ifnet *ifp, ui
 	struct epoch_tracker et;
 	int err;
 
-	epoch_enter_preempt(net_epoch_preempt, &et);
+	NET_EPOCH_ENTER(et);
 use_real_interface:
 	CK_LIST_FOREACH(rs, &int_rs, next) {
 		/*
@@ -920,7 +920,7 @@ use_real_interface:
 	if ((rs == NULL) || (rs->rs_disable != 0)) {
 		if (rs->rs_disable && error)
 			*error = ENOSPC;
-		epoch_exit_preempt(net_epoch_preempt, &et);
+		NET_EPOCH_EXIT(et);
 		return (NULL);
 	}
 	if (rs->rs_flags & RS_IS_DEFF) {
@@ -931,7 +931,7 @@ use_real_interface:
 		if (tifp == NULL) {
 			if (rs->rs_disable && error)
 				*error = ENOTSUP;
-			epoch_exit_preempt(net_epoch_preempt, &et);
+			NET_EPOCH_EXIT(et);
 			return (NULL);
 		}
 		goto use_real_interface;
@@ -940,7 +940,7 @@ use_real_interface:
 	    ((rs->rs_flows_using + 1) > rs->rs_flow_limit)) {
 		if (error)
 			*error = ENOSPC;
-		epoch_exit_preempt(net_epoch_preempt, &et);
+		NET_EPOCH_EXIT(et);
 		return (NULL);
 	}
 	rte = tcp_find_suitable_rate(rs, bytes_per_sec, flags);
@@ -964,7 +964,7 @@ use_real_interface:
 		 */
 		atomic_add_64(&rs->rs_flows_using, 1);
 	}
-	epoch_exit_preempt(net_epoch_preempt, &et);
+	NET_EPOCH_EXIT(et);
 	return (rte);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001150548.00F5maIf099447>