HomeFreeBSD

sfxge(4): fix efx_filter_supported_filters API

Description

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>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D8971

Details