Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Dec 2018 15:53:33 +0000 (UTC)
From:      Andrew Rybchenko <arybchik@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r342319 - stable/12/sys/dev/sfxge/common
Message-ID:  <201812211553.wBLFrX06062760@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: arybchik
Date: Fri Dec 21 15:53:33 2018
New Revision: 342319
URL: https://svnweb.freebsd.org/changeset/base/342319

Log:
  MFC r340801
  
  sfxge(4): provide information about supported tunnels
  
  VXLAN/NVGRE (and Geneve) support is available on SFN8xxx with
  full-feature firmware variant running.
  
  Sponsored by:   Solarflare Communications, Inc.
  Differential Revision:  https://reviews.freebsd.org/D18071

Modified:
  stable/12/sys/dev/sfxge/common/ef10_nic.c
  stable/12/sys/dev/sfxge/common/efx.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/sfxge/common/ef10_nic.c
==============================================================================
--- stable/12/sys/dev/sfxge/common/ef10_nic.c	Fri Dec 21 15:15:07 2018	(r342318)
+++ stable/12/sys/dev/sfxge/common/ef10_nic.c	Fri Dec 21 15:53:33 2018	(r342319)
@@ -1117,6 +1117,16 @@ ef10_get_datapath_caps(
 	encp->enc_mac_stats_40g_tx_size_bins =
 	    CAP_FLAG2(flags2, MAC_STATS_40G_TX_SIZE_BINS) ? B_TRUE : B_FALSE;
 
+	/*
+	 * Check if firmware supports VXLAN and NVGRE tunnels.
+	 * The capability indicates Geneve protocol support as well.
+	 */
+	if (CAP_FLAG(flags, VXLAN_NVGRE))
+		encp->enc_tunnel_encapsulations_supported =
+		    (1u << EFX_TUNNEL_PROTOCOL_VXLAN) |
+		    (1u << EFX_TUNNEL_PROTOCOL_GENEVE) |
+		    (1u << EFX_TUNNEL_PROTOCOL_NVGRE);
+
 #undef CAP_FLAG
 #undef CAP_FLAG2
 

Modified: stable/12/sys/dev/sfxge/common/efx.h
==============================================================================
--- stable/12/sys/dev/sfxge/common/efx.h	Fri Dec 21 15:15:07 2018	(r342318)
+++ stable/12/sys/dev/sfxge/common/efx.h	Fri Dec 21 15:53:33 2018	(r342319)
@@ -1087,6 +1087,14 @@ efx_bist_stop(
 #define	EFX_FEATURE_FW_ASSISTED_TSO	0x00001000
 #define	EFX_FEATURE_FW_ASSISTED_TSO_V2	0x00002000
 
+typedef enum efx_tunnel_protocol_e {
+	EFX_TUNNEL_PROTOCOL_NONE = 0,
+	EFX_TUNNEL_PROTOCOL_VXLAN,
+	EFX_TUNNEL_PROTOCOL_GENEVE,
+	EFX_TUNNEL_PROTOCOL_NVGRE,
+	EFX_TUNNEL_NPROTOS
+} efx_tunnel_protocol_t;
+
 typedef struct efx_nic_cfg_s {
 	uint32_t		enc_board_type;
 	uint32_t		enc_phy_type;
@@ -1184,6 +1192,7 @@ typedef struct efx_nic_cfg_s {
 	boolean_t		enc_init_evq_v2_supported;
 	boolean_t		enc_pm_and_rxdp_counters;
 	boolean_t		enc_mac_stats_40g_tx_size_bins;
+	uint32_t		enc_tunnel_encapsulations_supported;
 	/* External port identifier */
 	uint8_t			enc_external_port;
 	uint32_t		enc_mcdi_max_payload_length;



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