efx_rx.c (293890) | efx_rx.c (299320) |
---|---|
1/*- 2 * Copyright (c) 2007-2015 Solarflare Communications Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright notice, --- 15 unchanged lines hidden (view full) --- 24 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * 26 * The views and conclusions contained in the software and documentation are 27 * those of the authors and should not be interpreted as representing official 28 * policies, either expressed or implied, of the FreeBSD Project. 29 */ 30 31#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2007-2015 Solarflare Communications Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright notice, --- 15 unchanged lines hidden (view full) --- 24 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * 26 * The views and conclusions contained in the software and documentation are 27 * those of the authors and should not be interpreted as representing official 28 * policies, either expressed or implied, of the FreeBSD Project. 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: head/sys/dev/sfxge/common/efx_rx.c 293890 2016-01-14 09:03:02Z arybchik $"); | 32__FBSDID("$FreeBSD: head/sys/dev/sfxge/common/efx_rx.c 299320 2016-05-10 07:01:06Z arybchik $"); |
33 34#include "efx.h" 35#include "efx_impl.h" 36 37 | 33 34#include "efx.h" 35#include "efx_impl.h" 36 37 |
38#if EFSYS_OPT_FALCON || EFSYS_OPT_SIENA | 38#if EFSYS_OPT_SIENA |
39 40static __checkReturn efx_rc_t 41falconsiena_rx_init( 42 __in efx_nic_t *enp); 43 44static void 45falconsiena_rx_fini( 46 __in efx_nic_t *enp); --- 73 unchanged lines hidden (view full) --- 120 __in uint32_t id, 121 __in efx_evq_t *eep, 122 __in efx_rxq_t *erp); 123 124static void 125falconsiena_rx_qdestroy( 126 __in efx_rxq_t *erp); 127 | 39 40static __checkReturn efx_rc_t 41falconsiena_rx_init( 42 __in efx_nic_t *enp); 43 44static void 45falconsiena_rx_fini( 46 __in efx_nic_t *enp); --- 73 unchanged lines hidden (view full) --- 120 __in uint32_t id, 121 __in efx_evq_t *eep, 122 __in efx_rxq_t *erp); 123 124static void 125falconsiena_rx_qdestroy( 126 __in efx_rxq_t *erp); 127 |
128#endif /* EFSYS_OPT_FALCON || EFSYS_OPT_SIENA */ | 128#endif /* EFSYS_OPT_SIENA */ |
129 130 | 129 130 |
131#if EFSYS_OPT_FALCON 132static efx_rx_ops_t __efx_rx_falcon_ops = { 133 falconsiena_rx_init, /* erxo_init */ 134 falconsiena_rx_fini, /* erxo_fini */ 135#if EFSYS_OPT_RX_SCATTER 136 falconsiena_rx_scatter_enable, /* erxo_scatter_enable */ 137#endif 138#if EFSYS_OPT_RX_SCALE 139 falconsiena_rx_scale_mode_set, /* erxo_scale_mode_set */ 140 falconsiena_rx_scale_key_set, /* erxo_scale_key_set */ 141 falconsiena_rx_scale_tbl_set, /* erxo_scale_tbl_set */ 142 falconsiena_rx_prefix_hash, /* erxo_prefix_hash */ 143#endif 144 falconsiena_rx_prefix_pktlen, /* erxo_prefix_pktlen */ 145 falconsiena_rx_qpost, /* erxo_qpost */ 146 falconsiena_rx_qpush, /* erxo_qpush */ 147 falconsiena_rx_qflush, /* erxo_qflush */ 148 falconsiena_rx_qenable, /* erxo_qenable */ 149 falconsiena_rx_qcreate, /* erxo_qcreate */ 150 falconsiena_rx_qdestroy, /* erxo_qdestroy */ 151}; 152#endif /* EFSYS_OPT_FALCON */ 153 | |
154#if EFSYS_OPT_SIENA 155static efx_rx_ops_t __efx_rx_siena_ops = { 156 falconsiena_rx_init, /* erxo_init */ 157 falconsiena_rx_fini, /* erxo_fini */ 158#if EFSYS_OPT_RX_SCATTER 159 falconsiena_rx_scatter_enable, /* erxo_scatter_enable */ 160#endif 161#if EFSYS_OPT_RX_SCALE --- 52 unchanged lines hidden (view full) --- 214 } 215 216 if (enp->en_mod_flags & EFX_MOD_RX) { 217 rc = EINVAL; 218 goto fail2; 219 } 220 221 switch (enp->en_family) { | 131#if EFSYS_OPT_SIENA 132static efx_rx_ops_t __efx_rx_siena_ops = { 133 falconsiena_rx_init, /* erxo_init */ 134 falconsiena_rx_fini, /* erxo_fini */ 135#if EFSYS_OPT_RX_SCATTER 136 falconsiena_rx_scatter_enable, /* erxo_scatter_enable */ 137#endif 138#if EFSYS_OPT_RX_SCALE --- 52 unchanged lines hidden (view full) --- 191 } 192 193 if (enp->en_mod_flags & EFX_MOD_RX) { 194 rc = EINVAL; 195 goto fail2; 196 } 197 198 switch (enp->en_family) { |
222#if EFSYS_OPT_FALCON 223 case EFX_FAMILY_FALCON: 224 erxop = (efx_rx_ops_t *)&__efx_rx_falcon_ops; 225 break; 226#endif /* EFSYS_OPT_FALCON */ 227 | |
228#if EFSYS_OPT_SIENA 229 case EFX_FAMILY_SIENA: 230 erxop = (efx_rx_ops_t *)&__efx_rx_siena_ops; 231 break; 232#endif /* EFSYS_OPT_SIENA */ 233 234#if EFSYS_OPT_HUNTINGTON 235 case EFX_FAMILY_HUNTINGTON: --- 352 unchanged lines hidden (view full) --- 588{ 589 efx_rx_ops_t *erxop = enp->en_erxop; 590 591 EFSYS_ASSERT3U(enp->en_hash_support, ==, EFX_RX_HASH_AVAILABLE); 592 return (erxop->erxo_prefix_hash(enp, func, buffer)); 593} 594#endif /* EFSYS_OPT_RX_SCALE */ 595 | 199#if EFSYS_OPT_SIENA 200 case EFX_FAMILY_SIENA: 201 erxop = (efx_rx_ops_t *)&__efx_rx_siena_ops; 202 break; 203#endif /* EFSYS_OPT_SIENA */ 204 205#if EFSYS_OPT_HUNTINGTON 206 case EFX_FAMILY_HUNTINGTON: --- 352 unchanged lines hidden (view full) --- 559{ 560 efx_rx_ops_t *erxop = enp->en_erxop; 561 562 EFSYS_ASSERT3U(enp->en_hash_support, ==, EFX_RX_HASH_AVAILABLE); 563 return (erxop->erxo_prefix_hash(enp, func, buffer)); 564} 565#endif /* EFSYS_OPT_RX_SCALE */ 566 |
596#if EFSYS_OPT_FALCON || EFSYS_OPT_SIENA | 567#if EFSYS_OPT_SIENA |
597 598static __checkReturn efx_rc_t 599falconsiena_rx_init( 600 __in efx_nic_t *enp) 601{ 602 efx_oword_t oword; 603 unsigned int index; 604 --- 645 unchanged lines hidden (view full) --- 1250 1251static void 1252falconsiena_rx_fini( 1253 __in efx_nic_t *enp) 1254{ 1255 _NOTE(ARGUNUSED(enp)) 1256} 1257 | 568 569static __checkReturn efx_rc_t 570falconsiena_rx_init( 571 __in efx_nic_t *enp) 572{ 573 efx_oword_t oword; 574 unsigned int index; 575 --- 645 unchanged lines hidden (view full) --- 1221 1222static void 1223falconsiena_rx_fini( 1224 __in efx_nic_t *enp) 1225{ 1226 _NOTE(ARGUNUSED(enp)) 1227} 1228 |
1258#endif /* EFSYS_OPT_FALCON || EFSYS_OPT_SIENA */ | 1229#endif /* EFSYS_OPT_SIENA */ |