Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/sfxge/common/ef10_nic.c
Show First 20 Lines • Show All 1,073 Lines • ▼ Show 20 Lines | #define CAP_FLAG2(flags2, field) \ | ||||
*/ | */ | ||||
encp->enc_mac_stats_40g_tx_size_bins = | encp->enc_mac_stats_40g_tx_size_bins = | ||||
CAP_FLAG2(flags2, MAC_STATS_40G_TX_SIZE_BINS) ? B_TRUE : B_FALSE; | CAP_FLAG2(flags2, MAC_STATS_40G_TX_SIZE_BINS) ? B_TRUE : B_FALSE; | ||||
/* | /* | ||||
* Check if firmware supports VXLAN and NVGRE tunnels. | * Check if firmware supports VXLAN and NVGRE tunnels. | ||||
* The capability indicates Geneve protocol support as well. | * The capability indicates Geneve protocol support as well. | ||||
*/ | */ | ||||
if (CAP_FLAG(flags, VXLAN_NVGRE)) | if (CAP_FLAG(flags, VXLAN_NVGRE)) { | ||||
encp->enc_tunnel_encapsulations_supported = | encp->enc_tunnel_encapsulations_supported = | ||||
(1u << EFX_TUNNEL_PROTOCOL_VXLAN) | | (1u << EFX_TUNNEL_PROTOCOL_VXLAN) | | ||||
(1u << EFX_TUNNEL_PROTOCOL_GENEVE) | | (1u << EFX_TUNNEL_PROTOCOL_GENEVE) | | ||||
(1u << EFX_TUNNEL_PROTOCOL_NVGRE); | (1u << EFX_TUNNEL_PROTOCOL_NVGRE); | ||||
EFX_STATIC_ASSERT(EFX_TUNNEL_MAXNENTRIES == | |||||
MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_ENTRIES_MAXNUM); | |||||
encp->enc_tunnel_config_udp_entries_max = | |||||
EFX_TUNNEL_MAXNENTRIES; | |||||
} else { | |||||
encp->enc_tunnel_config_udp_entries_max = 0; | |||||
} | |||||
#undef CAP_FLAG | #undef CAP_FLAG | ||||
#undef CAP_FLAG2 | #undef CAP_FLAG2 | ||||
return (0); | return (0); | ||||
fail2: | fail2: | ||||
EFSYS_PROBE(fail2); | EFSYS_PROBE(fail2); | ||||
▲ Show 20 Lines • Show All 699 Lines • Show Last 20 Lines |