Giter Club home page Giter Club logo

virtio-can's Introduction

virtio-can

A CAN bus controller driver using virtio.

Why ?

We want to provide access to a CAN controllers to guests running on a hypervisor. Some of these guests may be real-time systems, so the specification of the virtio interface for CAN must contain informations allowing a deterministic usage.

This driver is the Linux device driver for the virtio-can virtual device, it will be the starting point to specify the virtio-can interface.

Design decisions

What we need is an API abstracting the inner working of a CAN controller to a virtualized device while still having a good performance.

We have to provide the guest module with some information about its paramaters provided by the host:

  • Number of mailboxes
  • Endianness
  • CAN-id filters

Currently, these parameters will be statically defined in a device-tree file, or as a module loading parameter.

One of the things to keep in mind is that we want to run real-time tasks at some time, so the TX FIFOs have to be implemented in the host to provide the guests with a good responsivity. For the systems that don't support FIFOs, we can use the built-in virtio ring buffer to share the device while writing.

The Linux driver

This driver will connect to the virtual device, setup the queues and mailboxes according to the parameters, and manage the network device for the SocketCAN subsystem.

Outcome

This project has a 'code now, specify after' approach. After the Linux driver is done, it will be easier to create the spec based on the behaviour of the code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.