Skip to contentSkip to conversation

fbnic qemu is open source

DISCUSSION Jakub Kicinski 3 participants 4 messages Mar 9 – Mar 17

Subsystems (2)
lore
Share & tools
lore

Jakub Kicinski

author maintainer
#0 lore raw

Hi!

The fbnic QEMU repo is now open source and available at:

https://github.com/facebook/fbnic_qemu

It contains the emulated datapath for the fbnic device, the FW components are not included (PHY programming, NC-SI, init, sensors and such).

The main practical use I imagine is being able to test TCP Rx zero copy (kernel and/or user space) without any HW dependency. There's work on adding relevant features to virtio but it's going a little slowly. Also being able to test code and selftests with a more "real" device than netdevsim with vng is super convenient :)

Big thanks to Zinc Lim for the open source heavy lifting (isolating and mocking out the FW parts, cleaning up the code base and getting it thru corporate reviews).

No plans at this stage to upstream it to QEMU because TBH I don't expect that QEMU would care to carry random HW emulation drivers.

Sorry if the announcement is a bit self-serving but folks expressed interest off list in being able to test the queue API and zero-copy Rx without real HW so I thought it's relevant.

#1 lore raw
Quoted 21 lines · Jakub Kicinski

Hi!

The fbnic QEMU repo is now open source and available at:

https://github.com/facebook/fbnic_qemu

It contains the emulated datapath for the fbnic device, the FW components are not included (PHY programming, NC-SI, init, sensors and such).

The main practical use I imagine is being able to test TCP Rx zero copy (kernel and/or user space) without any HW dependency. There's work on adding relevant features to virtio but it's going a little slowly. Also being able to test code and selftests with a more "real" device than netdevsim with vng is super convenient :)

Big thanks to Zinc Lim for the open source heavy lifting (isolating and mocking out the FW parts, cleaning up the code base and getting it thru corporate reviews).

Quoted 6 lines

No plans at this stage to upstream it to QEMU because TBH I don't expect that QEMU would care to carry random HW emulation drivers.

Sorry if the announcement is a bit self-serving but folks expressed interest off list in being able to test the queue API and zero-copy Rx without real HW so I thought it's relevant.

Wow, very cool! (Sorry I missed this announcement initially) I'm a bit of a noob but I'm a bit surprised a 'real' driver can work no qemu with a bit of magic.

Is fbnic-on-qemu about as feature-rich as fbnic-on-real-hardware? Do most of what it can do on real hardware it can do on qemu, or is it just really zerocopy that fully works?

Signature · 2 lines
Thanks,
Mina
author maintainer
#2 lore raw
Quoted 7 lines · On Tue, 17 Mar 2026 12:41:39 -0700 Mina Almasry wrote:
Quoted 6 lines

No plans at this stage to upstream it to QEMU because TBH I don't expect that QEMU would care to carry random HW emulation drivers.

Sorry if the announcement is a bit self-serving but folks expressed interest off list in being able to test the queue API and zero-copy Rx without real HW so I thought it's relevant.

Quoted 7 lines

Wow, very cool! (Sorry I missed this announcement initially) I'm a bit of a noob but I'm a bit surprised a 'real' driver can work no qemu with a bit of magic.

Is fbnic-on-qemu about as feature-rich as fbnic-on-real-hardware? Do most of what it can do on real hardware it can do on qemu, or is it just really zerocopy that fully works?

We implement the driver and QEMU side by side pre-silicon so the QEMU should cover what the driver can do. Keep in mind it's a pretty simple NIC, even "in the flesh".

#3 lore raw

I think I see a pattern of this happening.  I wrote a Qemu driver  for the MCTP-over-PCC Kernel driver as well.  I wonder if there is a right-sized organizational scheme for these kind of drivers?

Quoted 18 lines · Jakub Kicinski
Quoted 6 lines · On Tue, 17 Mar 2026 12:41:39 -0700 Mina Almasry wrote:
Quoted 6 lines

No plans at this stage to upstream it to QEMU because TBH I don't expect that QEMU would care to carry random HW emulation drivers.

Sorry if the announcement is a bit self-serving but folks expressed interest off list in being able to test the queue API and zero-copy Rx without real HW so I thought it's relevant.

Quoted 7 lines

Wow, very cool! (Sorry I missed this announcement initially) I'm a bit of a noob but I'm a bit surprised a 'real' driver can work no qemu with a bit of magic.

Is fbnic-on-qemu about as feature-rich as fbnic-on-real-hardware? Do most of what it can do on real hardware it can do on qemu, or is it just really zerocopy that fully works?

We implement the driver and QEMU side by side pre-silicon so the QEMU should cover what the driver can do. Keep in mind it's a pretty simple NIC, even "in the flesh".