aboutsummaryrefslogtreecommitdiff
path: root/sys/net/route
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2020-09-01 21:19:14 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2020-09-01 21:19:14 +0000
commit662c13053f4bf2d6245ba7e2b66c10d1cd5c1fb9 (patch)
tree5cffe4473640975abc443ef4b8047b34cdb4a039 /sys/net/route
parent586ee69f09c5060621486b34722a4a806581f93d (diff)
downloadsrc-662c13053f4bf2d6245ba7e2b66c10d1cd5c1fb9.tar.gz
src-662c13053f4bf2d6245ba7e2b66c10d1cd5c1fb9.zip
net: clean up empty lines in .c and .h files
Notes
Notes: svn path=/head/; revision=365071
Diffstat (limited to 'sys/net/route')
-rw-r--r--sys/net/route/nhop.c2
-rw-r--r--sys/net/route/nhop.h4
-rw-r--r--sys/net/route/nhop_ctl.c6
-rw-r--r--sys/net/route/nhop_utils.c3
-rw-r--r--sys/net/route/nhop_utils.h4
-rw-r--r--sys/net/route/nhop_var.h3
-rw-r--r--sys/net/route/route_ctl.c10
-rw-r--r--sys/net/route/route_ctl.h2
-rw-r--r--sys/net/route/route_helpers.c1
-rw-r--r--sys/net/route/route_tables.c1
-rw-r--r--sys/net/route/route_temporal.c2
-rw-r--r--sys/net/route/route_var.h3
12 files changed, 2 insertions, 39 deletions
diff --git a/sys/net/route/nhop.c b/sys/net/route/nhop.c
index f39b4fabdc93..4b9a79ffbf20 100644
--- a/sys/net/route/nhop.c
+++ b/sys/net/route/nhop.c
@@ -66,7 +66,6 @@ __FBSDID("$FreeBSD$");
static MALLOC_DEFINE(M_NHOP, "nhops", "nexthops data");
-
/* Hash management functions */
int
@@ -384,4 +383,3 @@ find_nhop(struct nh_control *ctl, const struct nhop_priv *nh_priv)
return (nh_priv_ret);
}
-
diff --git a/sys/net/route/nhop.h b/sys/net/route/nhop.h
index a3ee003cdf7d..1f6aff134c2d 100644
--- a/sys/net/route/nhop.h
+++ b/sys/net/route/nhop.h
@@ -166,7 +166,6 @@ struct nhop_object {
_nh = NULL; \
} while (0)
-
void nhop_free(struct nhop_object *nh);
struct sysctl_req;
@@ -222,7 +221,4 @@ struct mpath_external {
uint32_t mp_group_size;
};
-
#endif
-
-
diff --git a/sys/net/route/nhop_ctl.c b/sys/net/route/nhop_ctl.c
index 09365cc98238..217003ab6635 100644
--- a/sys/net/route/nhop_ctl.c
+++ b/sys/net/route/nhop_ctl.c
@@ -99,7 +99,6 @@ _Static_assert(sizeof(struct nhop_object) <= 128,
static uma_zone_t nhops_zone; /* Global zone for each and every nexthop */
-
#define NHOP_OBJECT_ALIGNED_SIZE roundup2(sizeof(struct nhop_object), \
2 * CACHE_LINE_SIZE)
#define NHOP_PRIV_ALIGNED_SIZE roundup2(sizeof(struct nhop_priv), \
@@ -181,7 +180,6 @@ set_nhop_mtu_from_info(struct nhop_object *nh, const struct rt_addrinfo *info)
if (info->rti_mflags & RTV_MTU) {
if (info->rti_rmx->rmx_mtu != 0) {
-
/*
* MTU was explicitly provided by user.
* Keep it.
@@ -189,7 +187,6 @@ set_nhop_mtu_from_info(struct nhop_object *nh, const struct rt_addrinfo *info)
nh->nh_priv->rt_flags |= RTF_FIXEDMTU;
} else {
-
/*
* User explicitly sets MTU to 0.
* Assume rollback to default.
@@ -532,7 +529,6 @@ finalize_nhop(struct nh_control *ctl, struct rt_addrinfo *info,
print_nhop("FINALIZE", nh);
if (link_nhop(ctl, nh_priv) == 0) {
-
/*
* Adding nexthop to the datastructures
* failed. Call destructor w/o waiting for
@@ -687,7 +683,6 @@ nhop_free_any(struct nhop_object *nh)
nhop_free(nh);
}
-
/* Helper functions */
uint32_t
@@ -858,4 +853,3 @@ nhops_dump_sysctl(struct rib_head *rh, struct sysctl_req *w)
return (0);
}
-
diff --git a/sys/net/route/nhop_utils.c b/sys/net/route/nhop_utils.c
index 56bca99c9ed8..c0d432ceaf65 100644
--- a/sys/net/route/nhop_utils.c
+++ b/sys/net/route/nhop_utils.c
@@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$");
#define _BLOCKS_TO_ITEMS(_blocks) ((uint32_t)(_blocks) * BLOCK_ITEMS)
#define _ITEMS_TO_BLOCKS(_items) ((_items) / BLOCK_ITEMS)
-
static void _bitmask_init_idx(void *index, uint32_t items);
void
@@ -111,7 +110,6 @@ _bitmask_init_idx(void *_idx, uint32_t items)
*idx &= ~(u_long)1; /* Always skip index 0 */
}
-
/*
* _try_merge api to allow shrinking?
*/
@@ -216,4 +214,3 @@ bitmask_free_idx(struct bitmask_head *bi, uint16_t idx)
return (0);
}
-
diff --git a/sys/net/route/nhop_utils.h b/sys/net/route/nhop_utils.h
index a2876178cbb0..a0d7cd564e72 100644
--- a/sys/net/route/nhop_utils.h
+++ b/sys/net/route/nhop_utils.h
@@ -57,7 +57,6 @@ _cht_need_resize(const struct _cht_head *head)
return (_cht_get_resize_size(head) > 0);
}
-
#ifndef typeof
#define typeof __typeof
#endif
@@ -152,11 +151,9 @@ struct _HNAME##_head { \
} \
} while(0)
-
#define CHT_SLIST_FOREACH(_head, _PX, _x) \
for (uint32_t _i = 0; _i < (_head)->hash_size; _i++) { \
for (_x = CHT_FIRST(_head, _i); _x; _x = _PX##_next(_x))
-
#define CHT_SLIST_FOREACH_END }
#define CHT_SLIST_RESIZE(_head, _PX, _new_void_ptr, _new_hsize) \
@@ -197,4 +194,3 @@ int bitmask_alloc_idx(struct bitmask_head *bi, uint16_t *pidx);
int bitmask_free_idx(struct bitmask_head *bi, uint16_t idx);
#endif
-
diff --git a/sys/net/route/nhop_var.h b/sys/net/route/nhop_var.h
index aac2829e186f..220b6c9a7634 100644
--- a/sys/net/route/nhop_var.h
+++ b/sys/net/route/nhop_var.h
@@ -47,7 +47,6 @@ CHT_SLIST_DEFINE(nhops, struct nhop_priv);
/* next object accessor */
#define nhops_next(_obj) (_obj)->nh_next
-
struct nh_control {
struct nhops_head nh_head; /* hash table head */
struct bitmask_head nh_idx_head; /* nhop index head */
@@ -64,7 +63,6 @@ struct nh_control {
#define NHOPS_LOCK_DESTROY(ctl) rw_destroy(&(ctl)->ctl_lock)
#define NHOPS_WLOCK_ASSERT(ctl) rw_assert(&(ctl)->ctl_lock, RA_WLOCKED)
-
/* Control plane-only nhop data */
struct nhop_object;
struct nhop_priv {
@@ -94,4 +92,3 @@ struct nhop_priv *unlink_nhop(struct nh_control *ctl, struct nhop_priv *nh_priv)
int cmp_priv(const struct nhop_priv *_one, const struct nhop_priv *_two);
#endif
-
diff --git a/sys/net/route/route_ctl.c b/sys/net/route/route_ctl.c
index 710e96f43323..c5ce51dbbe32 100644
--- a/sys/net/route/route_ctl.c
+++ b/sys/net/route/route_ctl.c
@@ -60,7 +60,6 @@ __FBSDID("$FreeBSD$");
#include <vm/uma.h>
-
/*
* This file contains control plane routing tables functions.
*
@@ -99,7 +98,7 @@ VNET_DEFINE_STATIC(uma_zone_t, rtzone);
void
vnet_rtzone_init()
{
-
+
V_rtzone = uma_zcreate("rtentry", sizeof(struct rtentry),
NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0);
}
@@ -158,8 +157,6 @@ rtfree(struct rtentry *rt)
&rt->rt_epoch_ctx);
}
-
-
static struct rib_head *
get_rnh(uint32_t fibnum, const struct rt_addrinfo *info)
{
@@ -359,7 +356,6 @@ add_route(struct rib_head *rnh, struct rt_addrinfo *info,
return (error);
}
-
/*
* Removes route defined by @info from the kernel table specified by @fibnum and
* sa_family in @info->rti_info[RTAX_DST].
@@ -752,7 +748,6 @@ change_route_conditional(struct rib_head *rnh, struct rtentry *rt,
} else {
/* Prefix exists, try to update */
if (rnd_orig->rnd_nhop == rt_new->rt_nhop) {
-
/*
* Nhop/mpath group hasn't changed. Flip
* to the new precalculated one and return
@@ -812,7 +807,6 @@ rib_action(uint32_t fibnum, int action, struct rt_addrinfo *info,
return (error);
}
-
struct rt_delinfo
{
struct rt_addrinfo info;
@@ -947,7 +941,6 @@ allocate_subscription(rib_subscription_cb_t *f, void *arg,
return (rs);
}
-
/*
* Subscribe for the changes in the routing table specified by @fibnum and
* @family.
@@ -1061,4 +1054,3 @@ rib_destroy_subscriptions(struct rib_head *rnh)
RIB_WUNLOCK(rnh);
NET_EPOCH_EXIT(et);
}
-
diff --git a/sys/net/route/route_ctl.h b/sys/net/route/route_ctl.h
index 62208609cd4d..fb6dda47b3ba 100644
--- a/sys/net/route/route_ctl.h
+++ b/sys/net/route/route_ctl.h
@@ -44,7 +44,6 @@ struct rib_cmd_info {
struct nhop_object *rc_nh_new; /* Target nhop OR mpath */
};
-
int rib_add_route(uint32_t fibnum, struct rt_addrinfo *info,
struct rib_cmd_info *rc);
int rib_del_route(uint32_t fibnum, struct rt_addrinfo *info,
@@ -85,4 +84,3 @@ struct rib_subscription *rib_subscribe_internal(struct rib_head *rnh,
int rib_unsibscribe(uint32_t fibnum, int family, struct rib_subscription *rs);
#endif
-
diff --git a/sys/net/route/route_helpers.c b/sys/net/route/route_helpers.c
index c2b7780976fd..b5b45ef662cc 100644
--- a/sys/net/route/route_helpers.c
+++ b/sys/net/route/route_helpers.c
@@ -131,4 +131,3 @@ rib_lookup(uint32_t fibnum, const struct sockaddr *dst, uint32_t flags,
return (nh);
}
-
diff --git a/sys/net/route/route_tables.c b/sys/net/route/route_tables.c
index bfaf5889807f..d987044091c0 100644
--- a/sys/net/route/route_tables.c
+++ b/sys/net/route/route_tables.c
@@ -324,4 +324,3 @@ rt_tables_get_gen(uint32_t table, sa_family_t family)
__func__, table, family));
return (rnh->rnh_gen);
}
-
diff --git a/sys/net/route/route_temporal.c b/sys/net/route/route_temporal.c
index 660436a2eb6e..935b110db629 100644
--- a/sys/net/route/route_temporal.c
+++ b/sys/net/route/route_temporal.c
@@ -153,11 +153,9 @@ tmproutes_init(struct rib_head *rh)
callout_init(&rh->expire_callout, 1);
}
-
void
tmproutes_destroy(struct rib_head *rh)
{
callout_drain(&rh->expire_callout);
}
-
diff --git a/sys/net/route/route_var.h b/sys/net/route/route_var.h
index f9c1b222d5b1..49c3d8d71f31 100644
--- a/sys/net/route/route_var.h
+++ b/sys/net/route/route_var.h
@@ -127,7 +127,6 @@ VNET_PCPUSTAT_DECLARE(struct rtstat, rtstat);
VNET_PCPUSTAT_ADD(struct rtstat, rtstat, name, (val))
#define RTSTAT_INC(name) RTSTAT_ADD(name, 1)
-
/*
* Convert a 'struct radix_node *' to a 'struct rtentry *'.
* The operation can be done safely (in this code) because a
@@ -211,7 +210,7 @@ struct rtentry {
#define _RT_SELECT_NHOP(_nh, _flowid) \
((!NH_IS_MULTIPATH(_nh)) ? (_nh) : _SELECT_NHOP(_nh, _flowid))
#define RT_SELECT_NHOP(_rt, _flowid) _RT_SELECT_NHOP((_rt)->rt_nhop, _flowid)
-
+
/* route_temporal.c */
void tmproutes_update(struct rib_head *rnh, struct rtentry *rt);
void tmproutes_init(struct rib_head *rh);