diff options
author | arybchik <arybchik@FreeBSD.org> | 2017-01-06 07:29:54 +0000 |
---|---|---|
committer | arybchik <arybchik@FreeBSD.org> | 2017-01-06 07:29:54 +0000 |
commit | dc15d951485d155cb972bff7594f4288de203eab (patch) | |
tree | 5f904e110558c6729d0e00e3db997c941d3a633e /sys/dev/sfxge/common/efx_impl.h | |
parent | 0dbb7a16bdd599d66fc9f3aaa4df3d1a5a243a65 (diff) | |
download | FreeBSD-src-dc15d951485d155cb972bff7594f4288de203eab.zip FreeBSD-src-dc15d951485d155cb972bff7594f4288de203eab.tar.gz |
MFC r310816
sfxge(4): fix efx_filter_supported_filters API
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>
Sponsored by: Solarflare Communications, Inc.
Diffstat (limited to 'sys/dev/sfxge/common/efx_impl.h')
-rw-r--r-- | sys/dev/sfxge/common/efx_impl.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/sfxge/common/efx_impl.h b/sys/dev/sfxge/common/efx_impl.h index 6395717..de0ef39 100644 --- a/sys/dev/sfxge/common/efx_impl.h +++ b/sys/dev/sfxge/common/efx_impl.h @@ -231,7 +231,8 @@ typedef struct efx_filter_ops_s { efx_rc_t (*efo_add)(efx_nic_t *, efx_filter_spec_t *, boolean_t may_replace); efx_rc_t (*efo_delete)(efx_nic_t *, efx_filter_spec_t *); - efx_rc_t (*efo_supported_filters)(efx_nic_t *, uint32_t *, size_t *); + efx_rc_t (*efo_supported_filters)(efx_nic_t *, uint32_t *, + size_t, size_t *); efx_rc_t (*efo_reconfigure)(efx_nic_t *, uint8_t const *, boolean_t, boolean_t, boolean_t, boolean_t, uint8_t const *, uint32_t); |