netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Saeed Mahameed <saeedm@mellanox.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, Moshe Shemesh <moshe@mellanox.com>,
	Or Gerlitz <ogerlitz@mellanox.com>,
	John Hurley <john.hurley@netronome.com>,
	Tariq Toukan <tariqt@mellanox.com>
Subject: Re: [net-next 09/15] net: Move the definition of the default Geneve udp port to public header file
Date: Wed, 20 Mar 2019 16:54:44 -0700	[thread overview]
Message-ID: <20190320165444.0db2fccd@cakuba.netronome.com> (raw)
In-Reply-To: <20190320233959.31877-10-saeedm@mellanox.com>

On Wed, 20 Mar 2019 16:39:53 -0700, Saeed Mahameed wrote:
> From: Moshe Shemesh <moshe@mellanox.com>
> 
> Move the definition of the default Geneve udp port from the geneve
> source to the header file, so we can re-use it from drivers.
> Modify existing drivers to use it.
> 
> Signed-off-by: Moshe Shemesh <moshe@mellanox.com>
> Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
> Cc: John Hurley <john.hurley@netronome.com>
> Cc: Jakub Kicinski <jakub.kicinski@netronome.com>
> Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
> ---
>  drivers/net/ethernet/netronome/nfp/flower/main.h | 2 +-
>  drivers/net/geneve.c                             | 2 --
>  include/net/geneve.h                             | 2 ++
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/netronome/nfp/flower/main.h b/drivers/net/ethernet/netronome/nfp/flower/main.h
> index c0945a5fd1a4..7afe66eff684 100644
> --- a/drivers/net/ethernet/netronome/nfp/flower/main.h
> +++ b/drivers/net/ethernet/netronome/nfp/flower/main.h
> @@ -35,7 +35,7 @@ struct nfp_app;
>  #define NFP_FL_MASK_ID_LOCATION		1
>  
>  #define NFP_FL_VXLAN_PORT		4789
> -#define NFP_FL_GENEVE_PORT		6081
> +#define NFP_FL_GENEVE_PORT		GENEVE_UDP_PORT

Why not remove the now duplicated define and

s/NFP_FL_GENEVE_PORT/GENEVE_UDP_PORT/

throughout the code?

>  /* Extra features bitmap. */
>  #define NFP_FL_FEATS_GENEVE		BIT(0)
> diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
> index 5583d993480d..c05b1207358d 100644
> --- a/drivers/net/geneve.c
> +++ b/drivers/net/geneve.c
> @@ -22,8 +22,6 @@
>  
>  #define GENEVE_NETDEV_VER	"0.6"
>  
> -#define GENEVE_UDP_PORT		6081
> -
>  #define GENEVE_N_VID		(1u << 24)
>  #define GENEVE_VID_MASK		(GENEVE_N_VID - 1)
>  
> diff --git a/include/net/geneve.h b/include/net/geneve.h
> index fc6a7e0a874a..bced0b1d9fe4 100644
> --- a/include/net/geneve.h
> +++ b/include/net/geneve.h
> @@ -4,6 +4,8 @@
>  
>  #include <net/udp_tunnel.h>
>  
> +#define GENEVE_UDP_PORT		6081
> +
>  /* Geneve Header:
>   *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>   *  |Ver|  Opt Len  |O|C|    Rsvd.  |          Protocol Type        |


  reply	other threads:[~2019-03-20 23:54 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-20 23:39 [pull request][net-next 00/15] Mellanox, mlx5 updates 2019-03-20 Saeed Mahameed
2019-03-20 23:39 ` [net-next 01/15] net/mlx5: Simplify sriov enable/disable flow Saeed Mahameed
2019-03-20 23:39 ` [net-next 02/15] net/mlx5: Rename total_vfs to total_vports Saeed Mahameed
2019-03-20 23:39 ` [net-next 03/15] net/mlx5: Simplify mlx5_sriov_is_enabled() by using pci core API Saeed Mahameed
2019-03-20 23:39 ` [net-next 04/15] net/mlx5: Fix compilation warning in eq.c Saeed Mahameed
2019-03-20 23:39 ` [net-next 05/15] net/mlx5e: Fix port buffer function documentation format Saeed Mahameed
2019-03-20 23:39 ` [net-next 06/15] net/mlx5e: Fix compilation warning in en_tc.c Saeed Mahameed
2019-03-20 23:39 ` [net-next 07/15] net/mlx5e: Remove redundant assignment Saeed Mahameed
2019-03-20 23:39 ` [net-next 08/15] net/mlx5: E-Switch, Protect from invalid memory access in offload fdb table Saeed Mahameed
2019-03-20 23:39 ` [net-next 09/15] net: Move the definition of the default Geneve udp port to public header file Saeed Mahameed
2019-03-20 23:54   ` Jakub Kicinski [this message]
2019-03-21 11:47     ` Moshe Shemesh
2019-03-20 23:39 ` [net-next 10/15] net/mlx5e: Take SW parser code to a separate function Saeed Mahameed
2019-03-20 23:39 ` [net-next 11/15] net/mlx5e: TX, Add geneve tunnel stateless offload support Saeed Mahameed
2019-03-20 23:39 ` [net-next 12/15] net: Add IANA_VXLAN_UDP_PORT definition to vxlan header file Saeed Mahameed
2019-03-20 23:55   ` Jakub Kicinski
2019-03-21 11:51     ` Moshe Shemesh
2019-03-20 23:39 ` [net-next 13/15] net/mlx5e: Add VLAN ID rewrite fields Saeed Mahameed
2019-03-20 23:39 ` [net-next 14/15] net/mlx5e: Support VLAN modify action Saeed Mahameed
2019-03-20 23:39 ` [net-next 15/15] net/mlx5e: Replace TC VLAN pop and push actions with VLAN modify Saeed Mahameed
2019-03-21 20:47 ` [pull request][net-next 00/15] Mellanox, mlx5 updates 2019-03-20 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190320165444.0db2fccd@cakuba.netronome.com \
    --to=jakub.kicinski@netronome.com \
    --cc=davem@davemloft.net \
    --cc=john.hurley@netronome.com \
    --cc=moshe@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=saeedm@mellanox.com \
    --cc=tariqt@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).