lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAOrHB_C9B138Y38QBZTiYN8kwxFh2+=GyGix00Dp75jA01fbcA@mail.gmail.com>
Date:   Wed, 14 Jun 2017 13:43:09 -0700
From:   Pravin Shelar <pshelar@....org>
To:     Zhang Shengju <zhangshengju@...s.chinamobile.com>
Cc:     Pravin Shelar <pshelar@...ira.com>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>,
        "David S. Miller" <davem@...emloft.net>
Subject: Re: [net-next,v2] openvswitch: add macro MODULE_ALIAS_VPORT_TYPE for
 vport type alias

On Tue, Jun 13, 2017 at 12:00 AM, Zhang Shengju
<zhangshengju@...s.chinamobile.com> wrote:
> Add a new macro MODULE_ALIAS_VPORT_TYPE to unify and simplify the
> declaration of vport type alias.
>
> Signed-off-by: Zhang Shengju <zhangshengju@...s.chinamobile.com>
> ---
>  net/openvswitch/vport-geneve.c | 2 +-
>  net/openvswitch/vport-gre.c    | 2 +-
>  net/openvswitch/vport-vxlan.c  | 2 +-
>  net/openvswitch/vport.h        | 3 +++
>  4 files changed, 6 insertions(+), 3 deletions(-)
>
The change looks fine. But I do not see value in it. This is compat
tunnel code, there should not be any more vports added to OVS. So
adding this new API does not help for future code changes either.


> diff --git a/net/openvswitch/vport-geneve.c b/net/openvswitch/vport-geneve.c
> index 5aaf3ba..0ebf023 100644
> --- a/net/openvswitch/vport-geneve.c
> +++ b/net/openvswitch/vport-geneve.c
> @@ -141,4 +141,4 @@ static void __exit ovs_geneve_tnl_exit(void)
>
>  MODULE_DESCRIPTION("OVS: Geneve switching port");
>  MODULE_LICENSE("GPL");
> -MODULE_ALIAS("vport-type-5");
> +MODULE_ALIAS_VPORT_TYPE(5);
> diff --git a/net/openvswitch/vport-gre.c b/net/openvswitch/vport-gre.c
> index 0e72d95..97fc4d5 100644
> --- a/net/openvswitch/vport-gre.c
> +++ b/net/openvswitch/vport-gre.c
> @@ -113,4 +113,4 @@ static void __exit ovs_gre_tnl_exit(void)
>
>  MODULE_DESCRIPTION("OVS: GRE switching port");
>  MODULE_LICENSE("GPL");
> -MODULE_ALIAS("vport-type-3");
> +MODULE_ALIAS_VPORT_TYPE(3);
> diff --git a/net/openvswitch/vport-vxlan.c b/net/openvswitch/vport-vxlan.c
> index 869acb3..0375b6a 100644
> --- a/net/openvswitch/vport-vxlan.c
> +++ b/net/openvswitch/vport-vxlan.c
> @@ -179,4 +179,4 @@ static void __exit ovs_vxlan_tnl_exit(void)
>
>  MODULE_DESCRIPTION("OVS: VXLAN switching port");
>  MODULE_LICENSE("GPL");
> -MODULE_ALIAS("vport-type-4");
> +MODULE_ALIAS_VPORT_TYPE(4);
> diff --git a/net/openvswitch/vport.h b/net/openvswitch/vport.h
> index cda66c2..1d1584f 100644
> --- a/net/openvswitch/vport.h
> +++ b/net/openvswitch/vport.h
> @@ -199,4 +199,7 @@ static inline const char *ovs_vport_name(struct vport *vport)
>  void ovs_vport_ops_unregister(struct vport_ops *ops);
>  void ovs_vport_send(struct vport *vport, struct sk_buff *skb, u8 mac_proto);
>
> +#define MODULE_ALIAS_VPORT_TYPE(type) \
> +       MODULE_ALIAS("vport-type-" __stringify(type))
> +
>  #endif /* vport.h */
> --
> 1.8.3.1
>
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ