aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/sfxge/common/efx.h
Commit message (Collapse)AuthorAgeFilesLines
...
* sfxge(4): run mkconfig.py to add FEC MAC statsAndrew Rybchenko2018-11-271-1/+7
| | | | | | | | | Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18177 Notes: svn path=/head/; revision=341063
* sfxge(4): retrieve number of MAC stats from NICAndrew Rybchenko2018-11-271-0/+2
| | | | | | | | | | | | | This reports the number of stats (and hence the DMA buffer size) for MAC stats. If MC_GET_CAPABABILITIES_V4 is not supported then use the legacy Siena-compatible MC_CMD_MAC_NSTATS value. Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18173 Notes: svn path=/head/; revision=341059
* sfxge(4): add new loopback modesAndrew Rybchenko2018-11-271-0/+3
| | | | | | | | | | | Report supported loopback modes for new Medford2 link speeds. Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18169 Notes: svn path=/head/; revision=341050
* sfxge(4): support new link modesAndrew Rybchenko2018-11-271-0/+7
| | | | | | | | | | | Add basic support for new link modes for Medford2. Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18168 Notes: svn path=/head/; revision=341049
* sfxge(4): report memory BAR numberAndrew Rybchenko2018-11-271-2/+13
| | | | | | | | | | | Remove EFX_MEM_BAR define as it it is not correct on all platforms. Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18165 Notes: svn path=/head/; revision=341046
* sfxge(4): add method to make checksum option descriptorsAndrew Rybchenko2018-11-271-0/+6
| | | | | | | | | Submitted by: Mark Spender <mspender at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18160 Notes: svn path=/head/; revision=341038
* sfxge(4): support runtime VI window sizeAndrew Rybchenko2018-11-271-0/+8
| | | | | | | | | | | | | | | | | | | | | Medford2 uses a configurable VI window size, and requires updates to register accesses to use a runtime VI window size rather than the *_STEP register constants used for earlier controllers. Update the common code to query the VI window size via MCDI, and add new EFX_BAR_VI_* accessor macros for per-VI registers. The existing EFX_BAR_TBL_* macros can be used for non-VI register tables (and for code that can never be called for a Medford2 controller e.g. Siena-only code). Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18158 Notes: svn path=/head/; revision=341036
* sfxge(4): add Medford2 support to NIC moduleAndrew Rybchenko2018-11-271-3/+3
| | | | | | | | | Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18142 Notes: svn path=/head/; revision=341020
* sfxge(4): add Medford2 PCI IDsAndrew Rybchenko2018-11-271-0/+5
| | | | | | | | | Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18139 Notes: svn path=/head/; revision=341017
* sfxge(4): add 3.3V and 12.0V current sensorsAndrew Rybchenko2018-11-261-1/+3
| | | | | | | | | | | Automatically generated using mkconfig.py. Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18138 Notes: svn path=/head/; revision=340932
* sfxge(4): add API to control UDP tunnel portsAndrew Rybchenko2018-11-261-0/+51
| | | | | | | | | | | | | HW needs to know which UDP packets should be treated as tunnel encapsulation to do inner packet recognition, classification and offloads. Submitted by: Ivan Malov <ivan.malov at oktetlabs.ru> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18134 Notes: svn path=/head/; revision=340928
* sfxge(4): allow to request inner classes for Rx packetsAndrew Rybchenko2018-11-241-0/+9
| | | | | | | | | | | | | | If HW/FW supports tunnel encapsulations, Rx event may contain either inner or outer packet classes. By default outer classes are requested. Make it possible to request inner classes to have more information about packet type and allow to interpret inner frame checksum validation results correctly. Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18133 Notes: svn path=/head/; revision=340908
* sfxge(4): add function to create packed stream RxQAndrew Rybchenko2018-11-241-5/+22
| | | | | | | | | | | | | | | Encoding packed stream buffer size in RxQ type is not a future-proof idea taking into account a new RxQ types with extra parameters. To be consistent make packet stream buffer size a separate parameter. In order to avoid blowing of the default RxQ create function prototype add a dedicated function to create packed stream RxQ without not applicable paramters. Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18132 Notes: svn path=/head/; revision=340907
* sfxge(4): control RxQ scatter using flag instead of typeAndrew Rybchenko2018-11-241-1/+8
| | | | | | | | | | Rx scatter may be applicable to different Rx queue types. Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18131 Notes: svn path=/head/; revision=340906
* sfxge(4): fix warnings from VS2015 C compiler (C4214)Andrew Rybchenko2018-11-241-17/+17
| | | | | | | | | | | | | | Fix multiple level 4 warnings "C4214: nonstandard extension used: bit field types other than int"; no functional changes. Submitted by: Andrew Lee <alee at solarflare.com> Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D18125 Notes: svn path=/head/; revision=340891
* sfxge(4): fix warnings from VS2015 C compiler (C4057)Andrew Rybchenko2018-11-241-2/+2
| | | | | | | | | | | | | | Fix two level 4 warnings "C4057: 'function': 'const uint8_t *' differs in indirection to slightly different base types from 'caddr_t'"; no functional changes. Submitted by: Andrew Lee <alee at solarflare.com> Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D18124 Notes: svn path=/head/; revision=340890
* sfxge(4): fix warnings from VS2015 C compiler (C4245)Andrew Rybchenko2018-11-241-23/+31
| | | | | | | | | | | | | | Fix level 4 warning "C4245: 'initializing': conversion from 'int' to 'uint32_t', signed/unsigned mismatch" warning; no functional changes. Submitted by: Andrew Lee <alee at solarflare.com> Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D18121 Notes: svn path=/head/; revision=340887
* sfxge(4): fix coding styleAndrew Rybchenko2018-11-241-28/+21
| | | | | | | | | Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18115 Notes: svn path=/head/; revision=340880
* sfxge(4): add new sensorsAndrew Rybchenko2018-11-241-1/+3
| | | | | | | | | Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18112 Notes: svn path=/head/; revision=340877
* sfxge(4): move Siena-specific defs to right headerAndrew Rybchenko2018-11-241-1/+0
| | | | | | | | | Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18111 Notes: svn path=/head/; revision=340876
* sfxge(4): improve names for TXQ descriptor countsAndrew Rybchenko2018-11-241-6/+6
| | | | | | | | | Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18109 Notes: svn path=/head/; revision=340874
* sfxge(4): improve names for RXQ descriptor countsAndrew Rybchenko2018-11-241-8/+8
| | | | | | | | | Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18108 Notes: svn path=/head/; revision=340873
* sfxge(4): improve names for EVQ descriptor countsAndrew Rybchenko2018-11-241-1/+1
| | | | | | | | | Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18107 Notes: svn path=/head/; revision=340872
* sfxge(4): support inner checksum offload on transmitAndrew Rybchenko2018-11-231-3/+5
| | | | | | | | | | | Inner checksum offloads may be used only if firmware supports these tunnels. Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18102 Notes: svn path=/head/; revision=340833
* sfxge(4): enforce packed stream fake buffer sizeAndrew Rybchenko2018-11-231-6/+0
| | | | | | | | | | | | In the case of packed stream real size of the buffer does not fit in Rx descriptor byte count. Real size is specified on Rx queue setup. Non-zero fake should be used to bypass hardware checks. Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18100 Notes: svn path=/head/; revision=340830
* sfxge(4): support MUM/SUC firmware partitionsAndrew Rybchenko2018-11-231-0/+1
| | | | | | | | | Submitted by: Andrew Lee <alee at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18097 Notes: svn path=/head/; revision=340827
* sfxge(4): fix ignoring function return valueAndrew Rybchenko2018-11-231-6/+6
| | | | | | | | | | | | | fix PreFAST issue, add missing annotation that function return value should not be ignored. Fix alignment. Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D18096 Notes: svn path=/head/; revision=340826
* sfxge(4): precheck and verify flash writesAndrew Rybchenko2018-11-231-0/+8
| | | | | | | | | | | | | | | | | | | Read existing flash content before writing, so the flash write can be avoided if the existing partition content matches the new image. This avoids unnecessary write cycles for the flash device, and may also be faster. If the flash does need to be updated, verify the content after writing. Note that reading the flash content after writing but before calling efx_nvram-rw_finish() avoids firmware bug68170, which can lead to signed image updates failing on Medford. Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18093 Notes: svn path=/head/; revision=340823
* sfxge(4): rename firmware update verify result cap fieldAndrew Rybchenko2018-11-231-1/+1
| | | | | | | | | | | | | | | The existing name confuses support for secure boot with support for reporting a verify result after an NVRAM update. As the capability only reports support for returning a verify result, change the name to be less confusing. Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18088 Notes: svn path=/head/; revision=340818
* sfxge(4): extend NVRAM RW finish to return verify resultAndrew Rybchenko2018-11-231-1/+2
| | | | | | | | | | | Extend efx_nvram_rw_finish() to return firmware verify result code. Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18087 Notes: svn path=/head/; revision=340817
* sfxge(4): add RSS key size defineAndrew Rybchenko2018-11-231-0/+1
| | | | | | | | | Submitted by: Ivan Malov <ivan.malov at oktetlabs.ru> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18082 Notes: svn path=/head/; revision=340812
* sfxge(4): add API to set an RSS context for a filterAndrew Rybchenko2018-11-231-1/+6
| | | | | | | | | Submitted by: Mark Spender <mspender at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18081 Notes: svn path=/head/; revision=340811
* sfxge(4): update RSS API to take RSS context parameterAndrew Rybchenko2018-11-231-0/+3
| | | | | | | | | | | | | Update efx_rx_scale_mode_set(), efx_rx_scale_key_set() and efx_rx_scale_tbl_set(). Submitted by: Mark Spender <mspender at solarflare.com> Submitted by: Ivan Malov <ivan.malov at oktetlabs.ru> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18080 Notes: svn path=/head/; revision=340810
* sfxge(4): add API to allocate and free RSS contextsAndrew Rybchenko2018-11-231-0/+12
| | | | | | | | | Submitted by: Mark Spender <mspender at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18079 Notes: svn path=/head/; revision=340809
* sfxge(4): rename API to check Rx scale and hash supportAndrew Rybchenko2018-11-231-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Rename efx_rx_scale_support_get() to efx_rx_scale_default_support_get(), and efx_rx_hash_support_get() to efx_rx_hash_default_support_get(). All these really report is whether an exclusive RSS context was successfully acquired at efx_rx_init(). efx_rx_scale_support_get() sounds like it reports whether the device supports RSS, and whether exclusive or shared contexts are supported, but it doesn't do that. Renaming it to efx_rx_scale_default_support_get() helps to reflect that it reports what RSS support the client gets without trying to allocate RSS contexts itself. Also rename efx_rx_scale_support_t to efx_rx_scale_context_type_t, to make the enum more suitable for specifying the type of an RSS context to be allocated. Submitted by: Mark Spender <mspender at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18078 Notes: svn path=/head/; revision=340808
* sfxge(4): add the max number of RSS exclusive contextsAndrew Rybchenko2018-11-231-0/+1
| | | | | | | | | | | | | The patch adds enc_rx_scale_max_exclusive_contexts member to nic_cfg_t structure and sets the corresponding values for Siena, Huntington and Medford Submitted by: Mark Spender <mspender at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18077 Notes: svn path=/head/; revision=340807
* sfxge(4): define a handle to denote default RSS contextAndrew Rybchenko2018-11-231-1/+3
| | | | | | | | | | | | Make the existing filter-specific define more general. This is the same as MC_CMD_RSS_CONTEXT_ALLOC_OUT_RSS_CONTEXT_ID_INVALID. Submitted by: Mark Spender <mspender at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18075 Notes: svn path=/head/; revision=340805
* sfxge(4): support filters for encapsulated packetsAndrew Rybchenko2018-11-231-15/+43
| | | | | | | | | | | | | This supports filters which match all unicast or multicast inner frames in VXLAN, GENEVE, or NVGRE packets. (Additional fields to match on can be added easily.) Submitted by: Mark Spender <mspender at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18073 Notes: svn path=/head/; revision=340803
* sfxge(4): provide information about supported tunnelsAndrew Rybchenko2018-11-231-0/+9
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=340801
* sfxge(4): add advanced function to extract FW versionAndrew Rybchenko2018-11-231-0/+18
| | | | | | | | | | | | | Some libefx-based drivers might need this functionality to indicate DPCPU FW IDs as part of FW version info to assist experienced users. Submitted by: Ivan Malov <ivan.malov at oktetlabs.ru> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18065 Notes: svn path=/head/; revision=340795
* sfxge(4): add MCDI agnostic wrapper for MAC stats clearAndrew Rybchenko2018-11-231-0/+4
| | | | | | | | | | | | If a libefx-based driver needs some way to clear port statistics, then an MCDI agnostic method is required. Submitted by: Ivan Malov <ivan.malov at oktetlabs.ru> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18064 Notes: svn path=/head/; revision=340794
* sfxge(4): limit max TXQ size on Medford to 2048Andrew Rybchenko2018-11-221-6/+1
| | | | | | | | | | | | | | Queues with 4096 descriptors are not supported as the top bit is used for vfifo stuffing. Submitted by: Mark Spender <mspender at solarflare.com> Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D8948 Notes: svn path=/head/; revision=340767
* sfxge(4): support packed stream Rx mode in libefxAndrew Rybchenko2018-11-221-0/+69
| | | | | | | | | Submitted by: Artem V. Andreev <Artem.Andreev@oktetlabs.ru> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18022 Notes: svn path=/head/; revision=340766
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326255
* sfxge(4): allow DMA descs to cross 4k boundary on EF10Andrew Rybchenko2017-01-071-0/+7
| | | | | | | | | | | | | | Siena has limitation on maximum byte count and 4k boundary crosssing (which is stricter than maximum byte count). EF10 has limitation on maximum byte count only. Reviewed by: philip Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D9061 Notes: svn path=/head/; revision=311640
* sfxge(4): remove obsolete Wake-On-LAN supportAndrew Rybchenko2016-12-301-82/+0
| | | | | | | | | | | | | | | Wake-on-lan is not supported in production on any of our adapters, as they don't have the required AUX power connector. (It's possible that AUX power is supplied to some of our ALOM or mezz adapters, but if so then we've never implemented or tested WoL support.) Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D8972 Notes: svn path=/head/; revision=310817
* sfxge(4): fix efx_filter_supported_filters APIAndrew Rybchenko2016-12-301-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | The previous API had various problems, including the length of the caller provided buffer not being specified, no means being available to discover how big the buffer needs to be, and a lack of clarity of what the resulting list contains. To fix it: - add the buffer length as a parameter - if the provided buffer is too short, fail with ENOSPC and return the required length - ensure that the list contents are valid and add comments describing it It is safe to change this API as, unsuprisingly, it has no users. Submitted by: Mark Spender <mspender at solarflare.com> Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D8971 Notes: svn path=/head/; revision=310816
* sfxge(4): add functions to efx_bootcfg supporting whole partition accessAndrew Rybchenko2016-12-301-0/+23
| | | | | | | | | | | | | | Expose expcfg partition layout discovery and validating buffer copy routines. Needed for whole-partition expcfg operations. Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com> Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D8970 Notes: svn path=/head/; revision=310815
* sfxge(4): add per-command timeout reporting to the common codeAndrew Rybchenko2016-12-301-0/+6
| | | | | | | | | | | | | | | | In newer firmware that supports multithreaded MCDI processing, longer running commands may be run ina background thread. Add support for drivers to query the appropriate timeout for each MCDI request. Submitted by: Andy Moreton <amoreton at solarflare.com> Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D8968 Notes: svn path=/head/; revision=310813
* sfxge(4): support non-interrupting event queues creationAndrew Rybchenko2016-12-301-0/+4
| | | | | | | | | | | | | | Poll-mode driver does not use interrupts and number of used event queues should not be limitted by the number of interrupts allocated for the NIC. Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D8967 Notes: svn path=/head/; revision=310812