Bug #15327
closedadd misc datalink class
100%
Description
There are a couple of hardcoded datalink classes but there are scenarios where the existing ones don't fit. The proposal here is to add a generic "misc" class that can be used by say virtual devices and the like which don't require any class-specific properties.
Updated by Luqman Aden 14 days ago
Been running bits from my CR and things work as expected. Datalinks using one of the existing classes (e.g. phys, vnic) continue to work just fine. For the new misc
class since dladm
doesn't directly let one create such a link (given the point is its meant to be used for links that are managed by some other manner -- opteadm
in our case) we ask dlmgmtd
directly and use the returned link id from our MAC provider to setup DLS.
$ dladm LINK CLASS MTU STATE BRIDGE OVER e1000g0 phys 1500 up -- -- ul0 vnic 1500 up -- e1000g0 ul1 vnic 1500 up -- e1000g0 vm_test0 misc 1500 up -- --
Updated by Luqman Aden 13 days ago
Some further requested checks:
dlstat
continues to work as expected:
$ dlstat LINK IPKTS RBYTES OPKTS OBYTES e1000g0 51.17M 31.51G 76.92M 29.36G ul0 171.18K 16.59M 1.43K 151.50K ul1 171.18K 16.59M 1.39K 147.62K
Note it doesn't show vm_test0
here as that MAC provider currently just has empty stubs for the corresponding callbacks. But it doesn't error out:
$ dlstat e1000g0 LINK IPKTS RBYTES OPKTS OBYTES e1000g0 51.17M 31.51G 76.92M 29.36G $ dlstat vm_test0 $ echo $? 0 $ dlstat bad_link0 dlstat: link bad_link0 is not valid: object not found
Updated by Electric Monk 13 days ago
- % Done changed from 0 to 100
- Status changed from New to Closed
git commit aa33dce46b2ef0f5abdf6f7055067d7e3c0e61a6
commit aa33dce46b2ef0f5abdf6f7055067d7e3c0e61a6 Author: Luqman Aden <luqman@oxide.computer> Date: 2023-01-26T21:56:18.000Z 15327 add misc datalink class Reviewed by: Robert Mustacchi <rm@fingolfin.org> Reviewed by: Garrett D'Amore <garrett@damore.org> Approved by: Patrick Mooney <pmooney@pfmooney.com>