linkd

Control plane daemon for unos
git clone git://git.finwo.net/app/linkd
Log | Files | Refs | README

README.md (1483B)


      1 # plugins/bcm
      2 
      3 Broadcom XGS dataplane backend for `linkd`.
      4 
      5 This is **not** built by the `linkd` build. It is built and shipped by the
      6 `openbcm` package, which is installed only on hardware that has a Broadcom
      7 switching ASIC.
      8 
      9 That split is deliberate: the OS image is byte-identical on every machine.
     10 Hardware capability arrives as a package, not as a separate image flavour.
     11 `linkd` dlopens whatever it finds in `/usr/lib/linkd/dataplane/`, so on a box
     12 without an ASIC the directory is simply empty and the built-in kernel
     13 dataplane is used instead.
     14 
     15 ## Contract
     16 
     17 A plugin is a shared object exporting exactly one symbol:
     18 
     19 ```c
     20 struct dp_ops linkd_dataplane_ops;
     21 ```
     22 
     23 `dp_ops` is declared in `src/dataplane.h`. The `abi` field must equal
     24 `LINKD_DATAPLANE_ABI` or the plugin is refused at load time.
     25 
     26 `probe()` must be cheap and side-effect free. It runs against every registered
     27 backend before one is chosen. This backend probes for `/dev/linux-kernel-bde`,
     28 which the openbcm kernel modules create once they have enumerated a switch ASIC
     29 over PCIe.
     30 
     31 ## Building
     32 
     33 Requires a built OpenBCM SDK tree:
     34 
     35 ```sh
     36 make SDK=/path/to/openbcm/sdk-6.5.27
     37 make SDK=/path/to/openbcm/sdk-6.5.27 install DESTDIR=/
     38 ```
     39 
     40 ## Status
     41 
     42 Skeleton. Every entry point past `probe()` returns `DP_RET_ERROR` with a TODO
     43 naming the SDK call that belongs there. Real implementation is gated on having
     44 the board configuration for the target switch, without which the SDK cannot map
     45 logical ports to SerDes lanes.