From 39a10a70574fa76ae2a46ca6cfbced6f775d411b Mon Sep 17 00:00:00 2001 From: yamaguchi Date: Tue, 30 Nov 2021 01:17:02 +0000 Subject: [PATCH] Move net/agr/ieee8023_slowprotocols.h to net/ether_slowprotocols.h Definitions related to slowprotocols are duplicated between agr/ieee8023ad_slowprotocols.h and lagg/if_lagg_lacp.h Therefore, the contents are moved to added file. Note: currently, there are just LACP and Marker protocol, however slowprotocols is independent of them. --- sys/net/agr/ieee8023ad_lacp.c | 6 +++--- sys/net/agr/ieee8023ad_lacp_debug.c | 6 +++--- sys/net/agr/ieee8023ad_lacp_select.c | 6 +++--- sys/net/agr/ieee8023ad_lacp_sm_mux.c | 6 +++--- sys/net/agr/ieee8023ad_lacp_sm_ptx.c | 6 +++--- sys/net/agr/ieee8023ad_lacp_sm_rx.c | 6 +++--- sys/net/agr/ieee8023ad_lacp_sm_tx.c | 6 +++--- sys/net/agr/ieee8023ad_lacp_timer.c | 6 +++--- sys/net/agr/ieee8023ad_marker.c | 6 +++--- sys/net/agr/if_agrether.c | 6 +++--- .../ieee8023_slowprotocols.h => ether_slowprotocols.h} | 10 ++++------ sys/net/if_ethersubr.c | 6 +++--- sys/net/lagg/if_lagg_lacp.c | 6 ++++-- sys/net/lagg/if_lagg_lacp.h | 10 +--------- 14 files changed, 42 insertions(+), 50 deletions(-) rename sys/net/{agr/ieee8023_slowprotocols.h => ether_slowprotocols.h} (86%) diff --git a/sys/net/agr/ieee8023ad_lacp.c b/sys/net/agr/ieee8023ad_lacp.c index a2e85e223dba..458ef2ad6543 100644 --- a/sys/net/agr/ieee8023ad_lacp.c +++ b/sys/net/agr/ieee8023ad_lacp.c @@ -1,4 +1,4 @@ -/* $NetBSD: ieee8023ad_lacp.c,v 1.12 2021/09/30 03:15:25 yamaguchi Exp $ */ +/* $NetBSD: ieee8023ad_lacp.c,v 1.13 2021/11/30 01:17:02 yamaguchi Exp $ */ /*- * Copyright (c)2005 YAMAMOTO Takashi, @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp.c,v 1.12 2021/09/30 03:15:25 yamaguchi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp.c,v 1.13 2021/11/30 01:17:02 yamaguchi Exp $"); #include #include @@ -40,10 +40,10 @@ __KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp.c,v 1.12 2021/09/30 03:15:25 yamaguc #include #include #include +#include #include #include -#include #include #include #include diff --git a/sys/net/agr/ieee8023ad_lacp_debug.c b/sys/net/agr/ieee8023ad_lacp_debug.c index 780571a85a50..a1fd93a9ae71 100644 --- a/sys/net/agr/ieee8023ad_lacp_debug.c +++ b/sys/net/agr/ieee8023ad_lacp_debug.c @@ -1,4 +1,4 @@ -/* $NetBSD: ieee8023ad_lacp_debug.c,v 1.6 2011/07/17 20:54:52 joerg Exp $ */ +/* $NetBSD: ieee8023ad_lacp_debug.c,v 1.7 2021/11/30 01:17:02 yamaguchi Exp $ */ /*- * Copyright (c)2005 YAMAMOTO Takashi, @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_debug.c,v 1.6 2011/07/17 20:54:52 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_debug.c,v 1.7 2021/11/30 01:17:02 yamaguchi Exp $"); #include #include @@ -35,8 +35,8 @@ __KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_debug.c,v 1.6 2011/07/17 20:54:52 jo #include #include +#include -#include #include #include #include diff --git a/sys/net/agr/ieee8023ad_lacp_select.c b/sys/net/agr/ieee8023ad_lacp_select.c index 77648efb6205..7d427a0c1568 100644 --- a/sys/net/agr/ieee8023ad_lacp_select.c +++ b/sys/net/agr/ieee8023ad_lacp_select.c @@ -1,4 +1,4 @@ -/* $NetBSD: ieee8023ad_lacp_select.c,v 1.5 2007/02/22 06:20:16 thorpej Exp $ */ +/* $NetBSD: ieee8023ad_lacp_select.c,v 1.6 2021/11/30 01:17:02 yamaguchi Exp $ */ /*- * Copyright (c)2005 YAMAMOTO Takashi, @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_select.c,v 1.5 2007/02/22 06:20:16 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_select.c,v 1.6 2021/11/30 01:17:02 yamaguchi Exp $"); #include #include @@ -36,9 +36,9 @@ __KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_select.c,v 1.5 2007/02/22 06:20:16 t #include #include +#include #include -#include #include #include #include diff --git a/sys/net/agr/ieee8023ad_lacp_sm_mux.c b/sys/net/agr/ieee8023ad_lacp_sm_mux.c index 22e2b309420f..2926a17c5dbf 100644 --- a/sys/net/agr/ieee8023ad_lacp_sm_mux.c +++ b/sys/net/agr/ieee8023ad_lacp_sm_mux.c @@ -1,4 +1,4 @@ -/* $NetBSD: ieee8023ad_lacp_sm_mux.c,v 1.4 2007/02/21 23:00:07 thorpej Exp $ */ +/* $NetBSD: ieee8023ad_lacp_sm_mux.c,v 1.5 2021/11/30 01:17:02 yamaguchi Exp $ */ /*- * Copyright (c)2005 YAMAMOTO Takashi, @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_sm_mux.c,v 1.4 2007/02/21 23:00:07 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_sm_mux.c,v 1.5 2021/11/30 01:17:02 yamaguchi Exp $"); #include #include @@ -36,8 +36,8 @@ __KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_sm_mux.c,v 1.4 2007/02/21 23:00:07 t #include #include +#include -#include #include #include #include diff --git a/sys/net/agr/ieee8023ad_lacp_sm_ptx.c b/sys/net/agr/ieee8023ad_lacp_sm_ptx.c index c9e2e35df4c4..1f5eb4e67dac 100644 --- a/sys/net/agr/ieee8023ad_lacp_sm_ptx.c +++ b/sys/net/agr/ieee8023ad_lacp_sm_ptx.c @@ -1,4 +1,4 @@ -/* $NetBSD: ieee8023ad_lacp_sm_ptx.c,v 1.3 2005/12/11 12:24:54 christos Exp $ */ +/* $NetBSD: ieee8023ad_lacp_sm_ptx.c,v 1.4 2021/11/30 01:17:02 yamaguchi Exp $ */ /*- * Copyright (c)2005 YAMAMOTO Takashi, @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_sm_ptx.c,v 1.3 2005/12/11 12:24:54 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_sm_ptx.c,v 1.4 2021/11/30 01:17:02 yamaguchi Exp $"); #include #include @@ -36,8 +36,8 @@ __KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_sm_ptx.c,v 1.3 2005/12/11 12:24:54 c #include #include +#include -#include #include #include #include diff --git a/sys/net/agr/ieee8023ad_lacp_sm_rx.c b/sys/net/agr/ieee8023ad_lacp_sm_rx.c index e95fb82c55c6..567b72789600 100644 --- a/sys/net/agr/ieee8023ad_lacp_sm_rx.c +++ b/sys/net/agr/ieee8023ad_lacp_sm_rx.c @@ -1,4 +1,4 @@ -/* $NetBSD: ieee8023ad_lacp_sm_rx.c,v 1.4 2007/02/21 23:00:07 thorpej Exp $ */ +/* $NetBSD: ieee8023ad_lacp_sm_rx.c,v 1.5 2021/11/30 01:17:02 yamaguchi Exp $ */ /*- * Copyright (c)2005 YAMAMOTO Takashi, @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_sm_rx.c,v 1.4 2007/02/21 23:00:07 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_sm_rx.c,v 1.5 2021/11/30 01:17:02 yamaguchi Exp $"); #include #include @@ -36,8 +36,8 @@ __KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_sm_rx.c,v 1.4 2007/02/21 23:00:07 th #include #include +#include -#include #include #include #include diff --git a/sys/net/agr/ieee8023ad_lacp_sm_tx.c b/sys/net/agr/ieee8023ad_lacp_sm_tx.c index 66e7a4e0c0eb..e44ae51363dc 100644 --- a/sys/net/agr/ieee8023ad_lacp_sm_tx.c +++ b/sys/net/agr/ieee8023ad_lacp_sm_tx.c @@ -1,4 +1,4 @@ -/* $NetBSD: ieee8023ad_lacp_sm_tx.c,v 1.4 2020/05/15 19:28:10 maxv Exp $ */ +/* $NetBSD: ieee8023ad_lacp_sm_tx.c,v 1.5 2021/11/30 01:17:02 yamaguchi Exp $ */ /*- * Copyright (c)2005 YAMAMOTO Takashi, @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_sm_tx.c,v 1.4 2020/05/15 19:28:10 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_sm_tx.c,v 1.5 2021/11/30 01:17:02 yamaguchi Exp $"); #include #include @@ -37,8 +37,8 @@ __KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_sm_tx.c,v 1.4 2020/05/15 19:28:10 ma #include #include +#include -#include #include #include #include diff --git a/sys/net/agr/ieee8023ad_lacp_timer.c b/sys/net/agr/ieee8023ad_lacp_timer.c index 27b89b927858..a97ea651c477 100644 --- a/sys/net/agr/ieee8023ad_lacp_timer.c +++ b/sys/net/agr/ieee8023ad_lacp_timer.c @@ -1,4 +1,4 @@ -/* $NetBSD: ieee8023ad_lacp_timer.c,v 1.5 2006/10/22 03:39:43 uebayasi Exp $ */ +/* $NetBSD: ieee8023ad_lacp_timer.c,v 1.6 2021/11/30 01:17:02 yamaguchi Exp $ */ /*- * Copyright (c)2005 YAMAMOTO Takashi, @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_timer.c,v 1.5 2006/10/22 03:39:43 uebayasi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_timer.c,v 1.6 2021/11/30 01:17:02 yamaguchi Exp $"); #include #include @@ -35,8 +35,8 @@ __KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_timer.c,v 1.5 2006/10/22 03:39:43 ue #include #include +#include -#include #include #include #include diff --git a/sys/net/agr/ieee8023ad_marker.c b/sys/net/agr/ieee8023ad_marker.c index 8461d21eb364..347cf767b591 100644 --- a/sys/net/agr/ieee8023ad_marker.c +++ b/sys/net/agr/ieee8023ad_marker.c @@ -1,4 +1,4 @@ -/* $NetBSD: ieee8023ad_marker.c,v 1.5 2021/09/30 03:15:25 yamaguchi Exp $ */ +/* $NetBSD: ieee8023ad_marker.c,v 1.6 2021/11/30 01:17:02 yamaguchi Exp $ */ /*- * Copyright (c)2005 YAMAMOTO Takashi, @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_marker.c,v 1.5 2021/09/30 03:15:25 yamaguchi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_marker.c,v 1.6 2021/11/30 01:17:02 yamaguchi Exp $"); #include #include @@ -36,9 +36,9 @@ __KERNEL_RCSID(0, "$NetBSD: ieee8023ad_marker.c,v 1.5 2021/09/30 03:15:25 yamagu #include #include +#include #include -#include #include #include #include diff --git a/sys/net/agr/if_agrether.c b/sys/net/agr/if_agrether.c index 4c4fafeb5079..1665d03c9b96 100644 --- a/sys/net/agr/if_agrether.c +++ b/sys/net/agr/if_agrether.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_agrether.c,v 1.11 2019/11/10 21:16:38 chs Exp $ */ +/* $NetBSD: if_agrether.c,v 1.12 2021/11/30 01:17:02 yamaguchi Exp $ */ /*- * Copyright (c)2005 YAMAMOTO Takashi, @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_agrether.c,v 1.11 2019/11/10 21:16:38 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_agrether.c,v 1.12 2021/11/30 01:17:02 yamaguchi Exp $"); #include #include @@ -38,12 +38,12 @@ __KERNEL_RCSID(0, "$NetBSD: if_agrether.c,v 1.11 2019/11/10 21:16:38 chs Exp $") #include #include #include +#include #include #include #include -#include #include #include #include diff --git a/sys/net/agr/ieee8023_slowprotocols.h b/sys/net/ether_slowprotocols.h similarity index 86% rename from sys/net/agr/ieee8023_slowprotocols.h rename to sys/net/ether_slowprotocols.h index 669998abc56d..41b9c55d641f 100644 --- a/sys/net/agr/ieee8023_slowprotocols.h +++ b/sys/net/ether_slowprotocols.h @@ -1,4 +1,4 @@ -/* $NetBSD: ieee8023_slowprotocols.h,v 1.2 2005/12/10 23:21:39 elad Exp $ */ +/* $NetBSD: ether_slowprotocols.h,v 1.1 2021/11/30 01:17:02 yamaguchi Exp $ */ /*- * Copyright (c)2005 YAMAMOTO Takashi, @@ -26,15 +26,13 @@ * SUCH DAMAGE. */ -#ifndef _NET_AGR_IEEE8023_SLOWPROTOCOLS_H_ -#define _NET_AGR_IEEE8023_SLOWPROTOCOLS_H_ +#ifndef _NET_ETHER_SLOWPROTOCOLS_H_ +#define _NET_ETHER_SLOWPROTOCOLS_H_ /* * IEEE802.3 slow protocols * * protocol (on-wire) definitions. - * - * XXX should be elsewhere. */ #define SLOWPROTOCOLS_SUBTYPE_LACP 1 @@ -45,4 +43,4 @@ struct slowprothdr { uint8_t sph_version; } __packed; -#endif /* !_NET_AGR_IEEE8023_SLOWPROTOCOLS_H_ */ +#endif /* !_NET_ETHER_SLOWPROTOCOLS_H_ */ diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index d7e92c0f3dca..a32b7cb7a953 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ethersubr.c,v 1.305 2021/11/25 00:49:34 msaitoh Exp $ */ +/* $NetBSD: if_ethersubr.c,v 1.306 2021/11/30 01:17:02 yamaguchi Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.305 2021/11/25 00:49:34 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.306 2021/11/30 01:17:02 yamaguchi Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -120,7 +120,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.305 2021/11/25 00:49:34 msaitoh E #endif #if NAGR > 0 -#include /* XXX */ +#include #include #include #endif diff --git a/sys/net/lagg/if_lagg_lacp.c b/sys/net/lagg/if_lagg_lacp.c index 6c690b76951b..dfc7a6635a4f 100644 --- a/sys/net/lagg/if_lagg_lacp.c +++ b/sys/net/lagg/if_lagg_lacp.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_lagg_lacp.c,v 1.8 2021/11/16 04:48:43 yamaguchi Exp $ */ +/* $NetBSD: if_lagg_lacp.c,v 1.9 2021/11/30 01:17:02 yamaguchi Exp $ */ /*- * SPDX-License-Identifier: BSD-2-Clause-NetBSD @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_lagg_lacp.c,v 1.8 2021/11/16 04:48:43 yamaguchi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_lagg_lacp.c,v 1.9 2021/11/30 01:17:02 yamaguchi Exp $"); #ifdef _KERNEL_OPT #include "opt_lagg.h" @@ -52,6 +52,8 @@ __KERNEL_RCSID(0, "$NetBSD: if_lagg_lacp.c,v 1.8 2021/11/16 04:48:43 yamaguchi E #include #include +#include + #include #include #include diff --git a/sys/net/lagg/if_lagg_lacp.h b/sys/net/lagg/if_lagg_lacp.h index 10945e59e3e0..44e7f30de864 100644 --- a/sys/net/lagg/if_lagg_lacp.h +++ b/sys/net/lagg/if_lagg_lacp.h @@ -1,4 +1,4 @@ -/* $NetBSD: if_lagg_lacp.h,v 1.2 2021/05/24 06:08:28 yamaguchi Exp $ */ +/* $NetBSD: if_lagg_lacp.h,v 1.3 2021/11/30 01:17:02 yamaguchi Exp $ */ /* * Copyright (c) 2021 Internet Initiative Japan Inc. @@ -48,14 +48,6 @@ LACP_STATE_DISTRIBUTING) #define LACP_PARTNER_ADMIN_STRICT 0 -#define SLOWPROTOCOLS_SUBTYPE_LACP 1 -#define SLOWPROTOCOLS_SUBTYPE_MARKER 2 - -struct slowprothdr { - uint8_t sph_subtype; - uint8_t sph_version; -} __packed; - #define TLV_TYPE_TERMINATE 0 #define LACP_TYPE_TERMINATE TLV_TYPE_TERMINATE