Page MenuHomeFreeBSD

sfxge(4): fix efx_filter_supported_filters API
ClosedPublic

Authored by arybchik on Dec 29 2016, 8:52 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 20, 4:15 PM
Unknown Object (File)
Fri, Dec 20, 10:06 AM
Unknown Object (File)
Sep 27 2024, 10:15 AM
Unknown Object (File)
Sep 20 2024, 9:48 AM
Unknown Object (File)
Sep 20 2024, 9:43 AM
Unknown Object (File)
Sep 20 2024, 9:38 AM
Unknown Object (File)
Sep 20 2024, 4:28 AM
Unknown Object (File)
Sep 19 2024, 2:56 PM
Subscribers

Details

Summary

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.
MFC after: 2 days

Test Plan

amd64 kernels build tested

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

arybchik retitled this revision from to sfxge(4): fix efx_filter_supported_filters API.
arybchik updated this object.
arybchik edited the test plan for this revision. (Show Details)
arybchik added reviewers: gnn, philip, np, bz.
gnn edited edge metadata.
This revision is now accepted and ready to land.Dec 29 2016, 3:28 PM
This revision was automatically updated to reflect the committed changes.