Skip to contentSkip to conversation

RfL branch for PCI bindings

DISCUSSION Danilo Krummrich 5 participants 8 messages Feb 1, 2024 – Feb 7, 2024 Rust

lore
Share & tools
lore
#0 lore raw

Hi Andreas and Miguel,

I'd like to come back to our discussion from the last "Rust for DRM" meeting regarding a common "rust-pci" branch.

As discussed, in the context of the Nova project we are interested in using those bindings, contribute some more (also in the context of Philipp's recent PCI work) and help moving the code upstream.

With Nova we should have a driver project which should justify further efforts to upstream the code.

- Danilo

#1 lore raw
Quoted 11 lines · Danilo Krummrich

Hi Andreas and Miguel,

I'd like to come back to our discussion from the last "Rust for DRM" meeting regarding a common "rust-pci" branch.

As discussed, in the context of the Nova project we are interested in using those bindings, contribute some more (also in the context of Philipp's recent PCI work) and help moving the code upstream.

With Nova we should have a driver project which should justify further efforts to upstream the code.

Patches anywhere? Can them be submitted again please as I think the last time I saw them, they needed some work.

thanks,

greg k-h

#2 lore raw
In reply to Danilo Krummrich
Quoted 10 lines · Danilo Krummrich

I'd like to come back to our discussion from the last "Rust for DRM" meeting regarding a common "rust-pci" branch.

As discussed, in the context of the Nova project we are interested in using those bindings, contribute some more (also in the context of Philipp's recent PCI work) and help moving the code upstream.

With Nova we should have a driver project which should justify further efforts to upstream the code.

Thanks Danilo!

My understanding from the meeting was that Andreas kindly agreed to maintain a rust-pci branch in a compilable state (i.e. rebasing it on top of e.g. rust-next). I am happy to create the branch already if Andreas is ready, add it to the website, etc.

Or if you (Danilo) prefer to drive the branch instead (e.g. because you may have more bandwidth), that is also fine.

Cheers,
Miguel

#3 lore raw
Quoted 14 lines · Miguel Ojeda
Quoted 10 lines · Danilo Krummrich

I'd like to come back to our discussion from the last "Rust for DRM" meeting regarding a common "rust-pci" branch.

As discussed, in the context of the Nova project we are interested in using those bindings, contribute some more (also in the context of Philipp's recent PCI work) and help moving the code upstream.

With Nova we should have a driver project which should justify further efforts to upstream the code.

Thanks Danilo!

Quoted 7 lines

My understanding from the meeting was that Andreas kindly agreed to maintain a rust-pci branch in a compilable state (i.e. rebasing it on top of e.g. rust-next). I am happy to create the branch already if Andreas is ready, add it to the website, etc.

Or if you (Danilo) prefer to drive the branch instead (e.g. because you may have more bandwidth), that is also fine.

Exactly. I am currently keeping the patches alive for the Rust NVMe driver that lives here [1], latest rebase here [2].

I am not the original author of the Rust PCI patches. As far as I know, no one else is maintaining a copy of these patches on top of mainline (if there was, I would just use their work).

I volunteer to extract these patches from the nvme tree into a separate pci tree and keep that rebased on mainline + accept fixes and features into that tree.

We can also do it the other way round and I would just rebase nvme on top of your pci tree, that is up to you.

I don't have any plans of sending these patches upstream for now, since the NVMe driver is not welcome upstream. If/when Nova or another Rust project depending on pci is ready to merge, I would be happy to help upstream the pci patches, if that makes sense. Again, you could also do it yourself, that is completely up to you. Or perhaps the original authors are interested in helping with this - I do not know since it never came up.

We could start out in one configuration and then change later down the road if it becomes clear that another config would be more beneficial.

Best regards,
Andreas

[1] https://rust-for-linux.com/nvme-driver
[2] https://github.com/metaspace/linux/commits/nvme-6.7/

#4 lore raw
Quoted 3 lines · Andreas Hindborg

We could start out in one configuration and then change later down the road if it becomes clear that another config would be more beneficial.

+1, let's start with what we discussed -- we can change the arrangement whenever needed.

I have created the branch in our repository:

https://github.com/Rust-for-Linux/linux/tree/rust-pci

And added it to the website:

https://rust-for-linux.com/branches#rust-pci

Please feel free to push to the branch as you see fit -- thanks Andreas!

Cheers,
Miguel

#5 lore raw
Quoted 10 lines · Miguel Ojeda
Quoted 3 lines · Andreas Hindborg

We could start out in one configuration and then change later down the road if it becomes clear that another config would be more beneficial.

+1, let's start with what we discussed -- we can change the arrangement whenever needed.

I have created the branch in our repository:

Quoted 7 lines

https://github.com/Rust-for-Linux/linux/tree/rust-pci

And added it to the website:

https://rust-for-linux.com/branches#rust-pci

Please feel free to push to the branch as you see fit -- thanks Andreas!

+1

And thanks Miguel for setting things up!

@Andreas: Please let us know once you pushed the patches.

- Danilo

Quoted 4 lines

Cheers,
Miguel

#6 lore raw
Quoted 13 lines · Danilo Krummrich
Quoted 11 lines · Miguel Ojeda
Quoted 3 lines · Andreas Hindborg

We could start out in one configuration and then change later down the road if it becomes clear that another config would be more beneficial.

+1, let's start with what we discussed -- we can change the arrangement whenever needed.
I have created the branch in our repository:
https://github.com/Rust-for-Linux/linux/tree/rust-pci
And added it to the website:
https://rust-for-linux.com/branches#rust-pci
Please feel free to push to the branch as you see fit -- thanks Andreas!

Quoted 5 lines

+1

And thanks Miguel for setting things up!

@Andreas: Please let us know once you pushed the patches.

They are up. Please not that they are not high quality, lots of TODO and missing safety comments.

NVMe rebased on top is here [1]

Let me know if you have any questions!

Best regards,
Andreas

[1] https://github.com/metaspace/linux/tree/rnvme-for-6.8

#7 lore raw
In reply to Andreas Hindborg
Quoted 28 lines · Andreas Hindborg
Quoted 14 lines · Miguel Ojeda
Quoted 10 lines · Danilo Krummrich

I'd like to come back to our discussion from the last "Rust for DRM" meeting regarding a common "rust-pci" branch.

As discussed, in the context of the Nova project we are interested in using those bindings, contribute some more (also in the context of Philipp's recent PCI work) and help moving the code upstream.

With Nova we should have a driver project which should justify further efforts to upstream the code.

Thanks Danilo!

Quoted 7 lines

My understanding from the meeting was that Andreas kindly agreed to maintain a rust-pci branch in a compilable state (i.e. rebasing it on top of e.g. rust-next). I am happy to create the branch already if Andreas is ready, add it to the website, etc.

Or if you (Danilo) prefer to drive the branch instead (e.g. because you may have more bandwidth), that is also fine.

Exactly. I am currently keeping the patches alive for the Rust NVMe driver that lives here [1], latest rebase here [2].

Quoted 7 lines

I am not the original author of the Rust PCI patches. As far as I know, no one else is maintaining a copy of these patches on top of mainline (if there was, I would just use their work).

I volunteer to extract these patches from the nvme tree into a separate pci tree and keep that rebased on mainline + accept fixes and features into that tree.

Thanks Andreas, very much appreciated! I think Philipp will start working with this code soon.

Quoted 11 lines

We can also do it the other way round and I would just rebase nvme on top of your pci tree, that is up to you.

I don't have any plans of sending these patches upstream for now, since the NVMe driver is not welcome upstream. If/when Nova or another Rust project depending on pci is ready to merge, I would be happy to help upstream the pci patches, if that makes sense. Again, you could also do it yourself, that is completely up to you. Or perhaps the original authors are interested in helping with this - I do not know since it never came up.

The idea is to get an early version of Nova upstream and continue the development upstream. Hence, once ready, we do intend to upstream the code in this context. Of course, your help with that will be very welcome.

- Danilo

Quoted 11 lines

We could start out in one configuration and then change later down the road if it becomes clear that another config would be more beneficial.

Best regards,
Andreas

[1] https://rust-for-linux.com/nvme-driver
[2] https://github.com/metaspace/linux/commits/nvme-6.7/