Files
gvisor/pkg
Ayush Ranjan b11efeaecd nvproxy: Clean up struct field tags.
Before this change, there were 2 places in which the driver struct names were
defined for nvproxy structs:
1. As struct field tags. The first field of structs had a tag `nvproxy:*`. This
   was kind of awkward. Such metadata is usually a struct comment.
2. In version.go while registering the struct with a name. Not all structs are
   defined in nvproxy (for example simple structs). In such cases, the driver
   struct name is directly assigned while registering struct info.

This change gets rid of (1). Most of the struct tags were `nvproxy:"same"`. Now
driverStructs() always infers the driver struct name using the nvproxy struct
name itself. The few cases where the nvproxy tag was needed, because driver
struct name was lower cased, were handled by defining driverStructWithName()
which allows specifying a different name. Now all driver struct names
definitions are in one place.

Along the way, also made the following fixes:
- For some reason, many structs defined in pkg/abi/nvgpu/frontend.go had
  camel-cased naming, while all other structs in pkg/abi/nvgpu/ctrl.go and
  pkg/abi/nvgpu/classes.go were named the same as their driver structs. The
  convention in the abi/* packages is to follow the kernel source naming.
  This is against Go sytle guide, but is more readable for gVisor purposes and
  has been a long accepted convention. This also makes the task of removing (1)
  easier. So renamed all such structs as per their driver names.
- A lot of code in pkg/sentry/devices/nvproxy/version.go was still referring to
  driver struct info as "struct names", even though it was representing more
  than just struct names. It also contains the reflect.Type of the struct which
  is used to compare the nvproxy struct layout to the driver struct layout.

PiperOrigin-RevId: 710648105
2024-12-30 01:32:41 -08:00
..
2024-12-30 01:32:41 -08:00
2024-10-13 00:50:32 -07:00
2023-11-29 18:55:37 -08:00
2024-12-10 17:28:40 -08:00
2023-10-23 22:09:47 -07:00
2024-05-08 00:09:42 -07:00
2023-10-25 12:13:42 -07:00
2023-10-23 22:09:47 -07:00
2023-11-08 15:57:42 -08:00
2024-04-22 05:15:20 -07:00
2023-08-07 11:42:20 -07:00
2023-10-23 22:09:47 -07:00
2024-09-12 08:33:37 -07:00
2024-03-04 12:21:50 -08:00
2024-09-27 16:58:17 -07:00
2024-09-25 20:16:45 -07:00
2024-10-16 13:07:09 -07:00
2024-12-04 08:26:45 -08:00
2024-11-20 14:53:44 -08:00
2024-11-14 11:24:42 -08:00
2024-05-02 11:09:16 -07:00