Skip to content

cuttlefish: Add netsim_modem CLI flag and route cellular modem over VSOCK to netsimd#2745

Open
schilit wants to merge 1 commit into
google:mainfrom
schilit:netsim-modem-host
Open

cuttlefish: Add netsim_modem CLI flag and route cellular modem over VSOCK to netsimd#2745
schilit wants to merge 1 commit into
google:mainfrom
schilit:netsim-modem-host

Conversation

@schilit

@schilit schilit commented Jun 23, 2026

Copy link
Copy Markdown

Enables netsim to act as the cellular modem simulator for Cuttlefish by passing VSOCK connections directly to netsimd:

  1. CLI & Instance Configuration:

    • Adds '--netsim_modem' flag to launch_cvd to route cellular modem traffic to netsim.
    • Disables the legacy standalone modem_simulator process when '--netsim_modem' or '--netsim' is active.
    • Records modem simulator instance count and SIM type in CuttlefishConfig.
  2. VSOCK Server Routing ('netsim_server.cpp'):

    • Creates a VSOCK server socket ('SharedFD::VsockServer') listening on each guest modem simulator port.
    • Configures the CELLULAR chip in netsimd's startup JSON ('-s'), passing the inherited listening file descriptor as 'vsockFd' and the SIM configuration as 'simType'.

Refactored netsim radio enabling to use per-instance config checks in netsim_server.cpp to support mixed-mode multi-instance clusters, and removed the global netsim_radio_enabled config.

Bug: 514348948
Bug: 530300761
Bug: 532125591
Test: launch_cvd --netsim_modem
Assisted-by: Jetski:pro

Comment thread base/cvd/cuttlefish/host/libs/vm_manager/vm_manager.h Outdated
@schilit schilit force-pushed the netsim-modem-host branch from 5546173 to 6ee7a3b Compare June 24, 2026 01:20
@schilit

schilit commented Jun 24, 2026

Copy link
Copy Markdown
Author

@Databean looks like an unrelated test is failing (?):

//cvd/bugreport_tests:bugreport_tests                                    FAILED in 389.3s

@Databean Databean added the kokoro:run Run e2e tests. label Jun 24, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Jun 24, 2026
@Databean

Copy link
Copy Markdown
Member

e2etests-podcvd is incredibly flaky so it's not marked as blocking for submission.

@Databean Databean enabled auto-merge June 24, 2026 16:49
@Databean Databean added this pull request to the merge queue Jun 24, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Jun 24, 2026

@Databean Databean left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Retracting approval pending host compat validation, FYI @rmuthiah

@rmuthiah

Copy link
Copy Markdown
Collaborator

Hi Bill, can you update this series with what you've posted on https://googleplex-android-review.git.corp.google.com/c/device/google/cuttlefish/+/40406246 ?

@schilit schilit force-pushed the netsim-modem-host branch from f6e5993 to 0fee293 Compare July 13, 2026 21:31
@schilit schilit changed the title cuttlefish: Migrate host-side netsim_modem flags and routing cuttlefish: Add netsim_modem CLI flag and route cellular modem over VSOCK to netsimd Jul 13, 2026
@schilit

schilit commented Jul 13, 2026

Copy link
Copy Markdown
Author

Updated with the changes from the Gerrit CL 40406246 (VSOCK routing).

Enables netsim to act as the cellular modem simulator for Cuttlefish by passing VSOCK connections directly to netsimd:

1. CLI & Instance Configuration:
   - Adds '--netsim_modem' flag to launch_cvd to route cellular modem traffic to netsim.
   - Disables the legacy standalone modem_simulator process when '--netsim_modem' or '--netsim' is active.
   - Records modem simulator instance count and SIM type in CuttlefishConfig.

2. VSOCK Server Routing ('netsim_server.cpp'):
   - Creates a VSOCK server socket ('SharedFD::VsockServer') listening on each guest modem simulator port.
   - Configures the CELLULAR chip in netsimd's startup JSON ('-s'), passing the inherited listening file descriptor as 'vsockFd' and the SIM configuration as 'simType'.

Refactored netsim radio enabling to use per-instance config checks in netsim_server.cpp to support mixed-mode multi-instance clusters, and removed the global netsim_radio_enabled config.

Bug: 514348948
Bug: 530300761
Bug: 532125591
Test: launch_cvd --netsim_modem
@schilit schilit force-pushed the netsim-modem-host branch from 0fee293 to 39f648a Compare July 13, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants