Skip to content

Adding driver specific Netkit type, and possibly others like Vxlan, Bond etc... #216

@brlbil

Description

@brlbil

I've initiated this discussion to explore incorporating driver-specific types within the library, with a particular interest in Netkit. However, the approach could extend to others such as Vxlan and Bond. Currently, driver-specific data is managed through LinkInfo.Data and/or LinkInfo.SlaveData as byte slices. To define concrete types for these drivers, we need a new mechanism. I propose several approaches and have prepared POC branches to illustrate these ideas, though I'm open to further suggestions for the most effective implementation. Your input would be invaluable to refine these proposals.

  1. Interface Integration within LinkInfo: Adding a new interface within LinkInfo to handle driver types based on the Kind dynamically. This approach maintains backward compatibility. Example POC.

  2. Revision of Data Fields as Interfaces: Transforming LinkInfo.Data and SlaveData into interfaces. This method would necessitate a major version update due to its backward-incompatible nature. Example POC.

  3. Driver Types in LinkAttributes: Embedding driver types directly within LinkAttributes. This method could provide operational benefits, such as compatibility checks. For example, Netkit does not support setting ethernet address, in this way, we could check this condition Example POC.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions