Page MenuHomeFreeBSD

sfxge: add MCDI logging support to common code
ClosedPublic

Authored by arybchik on Dec 1 2015, 7:36 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 25, 10:45 PM
Unknown Object (File)
Dec 30 2023, 5:16 AM
Unknown Object (File)
Dec 22 2023, 9:09 PM
Unknown Object (File)
Nov 7 2023, 1:49 AM
Unknown Object (File)
Sep 15 2023, 12:04 PM
Unknown Object (File)
Aug 30 2023, 9:50 AM
Unknown Object (File)
Aug 4 2023, 9:26 PM
Unknown Object (File)
Jul 13 2023, 12:05 PM
Subscribers

Details

Summary

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days

Test Plan

Driver build tested. Module loaded/unloaded.
The patch with support in FreeBSD-specific part will follow.

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: add MCDI logging support to common code.
arybchik updated this object.
arybchik edited the test plan for this revision. (Show Details)
arybchik added reviewers: gnn, philip, bz, np.
philip edited edge metadata.

A couple of very minor style nits. Looks good otherwise.

head/sys/dev/sfxge/common/efx_mcdi.c
472

Is this correct? Previously you weren't doing the copyout if errcode != 0. From the comment, the copyout was originally intended. Just making sure.

head/sys/dev/sfxge/common/hunt_mcdi.c
199

Maybe just &hdr instead of &hdr[0] for consistency with other calls to emtp->emt_logger() (e.g. line 271 and elsewhere).

365–366

Maybe just &hdr and &err here too?

This revision is now accepted and ready to land.Dec 1 2015, 8:54 AM
This revision was automatically updated to reflect the committed changes.

Thanks for review. Style fixes done in committed patch.

Feedback from Andy on copyout:

The copyout is needed to ensure that the logging is always performed (even if errcode != 0). This does mean that the error response is copied to the client buffer even if the client will not make use of it, but is a pragmatic way of ensuring that the logging always happens.

Fixing this properly requires some refactoring of the MCDI code and the client callbacks. The MCDI event handler performs the copyout for event-completed commands, but this should really be done by the background thread that issued the request (that is how the linux net driver does things). That complicates handling of errors and logging.
<<<