Skip to content

Adds missing video encoding NVIDIA ioctl classes#12867

Open
luiscape wants to merge 1 commit intogoogle:masterfrom
luiscape:implement-missing-video-ioctls
Open

Adds missing video encoding NVIDIA ioctl classes#12867
luiscape wants to merge 1 commit intogoogle:masterfrom
luiscape:implement-missing-video-ioctls

Conversation

@luiscape
Copy link
Copy Markdown
Contributor

@luiscape luiscape commented Apr 3, 2026

This adds missing NVJPG (JPEG encoding/decoding) and optical flow classes. Both are used in video-processing workflows, hence the video capability conditional.

@google-cla
Copy link
Copy Markdown

google-cla bot commented Apr 3, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@luiscape
Copy link
Copy Markdown
Contributor Author

luiscape commented Apr 3, 2026

@ayushr2 happy to resubmit this PR if the Google CLA issue above is hard to fix.

@luiscape luiscape changed the title Adds missing video encoding NVIDIA classes Adds missing video encoding NVIDIA ioctl classes Apr 3, 2026
@EtiennePerot
Copy link
Copy Markdown
Collaborator

The CLA check is unhappy about your git commit author, which is set to Author: EC2 Default User <ec****er​@ip-172-31-9-97.ec2.internal>. Can you reset the commit author metadata to your own?

@luiscape luiscape force-pushed the implement-missing-video-ioctls branch from 94e288e to defcad3 Compare April 7, 2026 03:40
@luiscape
Copy link
Copy Markdown
Contributor Author

luiscape commented Apr 7, 2026

@EtiennePerot thanks. Fixed!

copybara-service bot pushed a commit that referenced this pull request Apr 7, 2026
This adds missing NVJPG (JPEG encoding/decoding) and optical flow classes. Both are used in video-processing workflows, hence the video capability conditional.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12867 from luiscape:implement-missing-video-ioctls defcad3
PiperOrigin-RevId: 895636933
copybara-service bot pushed a commit that referenced this pull request Apr 7, 2026
This adds missing NVJPG (JPEG encoding/decoding) and optical flow classes. Both are used in video-processing workflows, hence the video capability conditional.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12867 from luiscape:implement-missing-video-ioctls defcad3
PiperOrigin-RevId: 895636981
copybara-service bot pushed a commit that referenced this pull request Apr 7, 2026
This adds missing NVJPG (JPEG encoding/decoding) and optical flow classes. Both are used in video-processing workflows, hence the video capability conditional.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12867 from luiscape:implement-missing-video-ioctls defcad3
PiperOrigin-RevId: 895636933
@parth-opensrc
Copy link
Copy Markdown
Contributor

Hi,
It seems like the unit tests are broken:

https://buildkite.com/gvisor/pipeline/builds/41271/steps/canvas?sid=019d69e1-497f-41c2-8ff9-7134828edaae&tab=output


FAIL: TestStructDefinitionParity (0.00s)
--
--- FAIL: TestStructDefinitionParity/535.183.06 (24.88s)
nvproxy_driver_parity_test.go:128: struct "NV_OFA_ALLOCATION_PARAMETERS" has different definitions between nvproxy and driver: mismatched sizes for struct "NV_OFA_ALLOCATION_PARAMETERS" between nvproxy (12) and driver (8) (bytes)
nvproxy_driver_parity_test.go:128: struct "NV_OFA_ALLOCATION_PARAMETERS" has different definitions between nvproxy and driver: mismatched sizes for struct "NV_OFA_ALLOCATION_PARAMETERS" between nvproxy (12) and driver (8) (bytes)
nvproxy_driver_parity_test.go:128: struct "NV_OFA_ALLOCATION_PARAMETERS" has different definitions between nvproxy and driver: mismatched sizes for struct "NV_OFA_ALLOCATION_PARAMETERS" between nvproxy (12) and driver (8) (bytes)
nvproxy_driver_parity_test.go:128: struct "NV_OFA_ALLOCATION_PARAMETERS" has different definitions between nvproxy and driver: mismatched sizes for struct "NV_OFA_ALLOCATION_PARAMETERS" between nvproxy (12) and driver (8) (bytes)
--- FAIL: TestStructDefinitionParity/535.247.01 (25.44s)
nvproxy_driver_parity_test.go:128: struct "NV_OFA_ALLOCATION_PARAMETERS" has different definitions between nvproxy and driver: mismatched sizes for struct "NV_OFA_ALLOCATION_PARAMETERS" between nvproxy (12) and driver (8) (bytes)
nvproxy_driver_parity_test.go:128: struct "NV_OFA_ALLOCATION_PARAMETERS" has different definitions between nvproxy and driver: mismatched sizes for struct "NV_OFA_ALLOCATION_PARAMETERS" between nvproxy (12) and driver (8) (bytes)
nvproxy_driver_parity_test.go:128: struct "NV_OFA_ALLOCATION_PARAMETERS" has different definitions between nvproxy and driver: mismatched sizes for struct "NV_OFA_ALLOCATION_PARAMETERS" between nvproxy (12) and driver (8) (bytes)
nvproxy_driver_parity_test.go:128: struct "NV_OFA_ALLOCATION_PARAMETERS" has different definitions between nvproxy and driver: mismatched sizes for struct "NV_OFA_ALLOCATION_PARAMETERS" between nvproxy (12) and driver (8) (bytes)
--- FAIL: TestStructDefinitionParity/535.261.03 (19.24s)

...................

copybara-service bot pushed a commit that referenced this pull request Apr 7, 2026
This adds missing NVJPG (JPEG encoding/decoding) and optical flow classes. Both are used in video-processing workflows, hence the video capability conditional.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12867 from luiscape:implement-missing-video-ioctls defcad3
PiperOrigin-RevId: 895636933
copybara-service bot pushed a commit that referenced this pull request Apr 7, 2026
This adds missing NVJPG (JPEG encoding/decoding) and optical flow classes. Both are used in video-processing workflows, hence the video capability conditional.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12867 from luiscape:implement-missing-video-ioctls defcad3
PiperOrigin-RevId: 895636933
@ayushr2
Copy link
Copy Markdown
Collaborator

ayushr2 commented Apr 8, 2026

Be sure to run the tests in https://github.com/google/gvisor/tree/master/pkg/sentry/devices/nvproxy#step-3-account-for-abi-changes when modifying the version map (adding new ioctls or version support).

_ structs.HostLayout
Size uint32
ProhibitMultipleInstances uint32
EngineInstance uint32
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we are missing the uint32 padding at the end. The adding is added to make the struct 64-byte aligned. See similar padding in

Pad0 [4]byte

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to add padding on this one. Tests will fail after adding padding, so I'm leaving this one as is.

nvproxy_driver_parity_test.go:128: struct "NV_NVJPG_ALLOCATION_PARAMETERS" has different definitions between nvproxy and driver: mismatched sizes for struct "NV_NVJPG_ALLOCATION_PARAMETERS" between nvproxy (16) and driver (12) (bytes)

@luiscape
Copy link
Copy Markdown
Contributor Author

luiscape commented Apr 8, 2026

Thank you for the reviews. Taking a look.

This adds missing NVJPG (JPEG encoding/decoding) and optical flow
classes. Both are used in video-processing workflows, hence thet video
capability conditional.
@luiscape luiscape force-pushed the implement-missing-video-ioctls branch from defcad3 to bf9b0ea Compare April 8, 2026 10:33
@luiscape
Copy link
Copy Markdown
Contributor Author

luiscape commented Apr 8, 2026

@ayushr2 updated with your proposed changes. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants