Page MenuHomeFreeBSD

Create a macro for the static modifier with VNET
ClosedPublic

Authored by andrew on Jul 5 2018, 6:48 PM.

Details

Summary

As with DPCPU create a _STATIC version of VNET_DEFINE. This will allow us
to change this on arm64 later and enable VIMAGE.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

I still need to update vnet(9)

sys/net/vnet.h
273 ↗(On Diff #44932)

I can add the same comment as DPCPU_DEFINE here

If you can sort out the pf_ioctl.c volatile issue first, and add the comment as you suggested this look good to me.

sys/net/vnet.h
273 ↗(On Diff #44932)

Or a comment simply saying "/* See dpcpu for explanation. */".

sys/netpfil/pf/pf_ioctl.c
190 ↗(On Diff #44932)

should this not fail to compile?

  • Rebase
  • Update the man page (date will be changed when committed)
sys/netpfil/pf/pf_ioctl.c
190 ↗(On Diff #44932)

No, there is no struct _hack in the static macro. I'm not sure if the use of volatile is correct here, but haven't looked too deeply into it.

This revision is now accepted and ready to land.Jul 20 2018, 1:07 PM
This revision was automatically updated to reflect the committed changes.

Hi, Andrew, do you plan to merge this into stable/11? It would be nice to have these macros to be able make MFC.