intel

package
v0.0.0-...-b5bde14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

README

PTP Operator

Table of Contents

E810 plugin

Intel E810 plugin can be used to do hardware-specific configurations as required for e810 NICs, in order to use as a PTP grandmaster.

Quick Start

Example config enable e810 plugin and doing configuration as GM.
apiVersion: ptp.openshift.io/v1
kind: PtpConfig
metadata:
  name: ptpconfig-gm
  namespace: openshift-ptp
spec:
  profile:
  - name: "profile1"
    ...
    ...
    ......   
    plugins:
      e810:
        enableDefaultConfig: false
        settings:
          LocalMaxHoldoverOffSet: 1500
          LocalHoldoverTimeout: 14400
          MaxInSpecOffset: 100
        phaseOffsetPins:
          ens2f0:
            boardLabel: GNSS-1PPS
          ens7f0:
            boardLabel: SMA1
        pins:
          "ens2f0":
            "U.FL2": "0 2"
            "U.FL1": "0 1"
            "SMA2": "0 2"
            "SMA1": "0 1"
        ublxCmds:
          - args: #ubxtool -P 29.20 -z CFG-HW-ANT_CFG_VOLTCTRL,1
              - "-P"
              - "29.20"
              - "-z"
              - "CFG-HW-ANT_CFG_VOLTCTRL,1"
            reportOutput: false
          - args: #ubxtool -P 29.20 -e GPS
              - "-P"
              - "29.20"
              - "-e"
              - "GPS"
            reportOutput: false
          - args: #ubxtool -P 29.20 -d Galileo
              - "-P"
              - "29.20"
              - "-d"
              - "Galileo"
            reportOutput: false
          - args: #ubxtool -P 29.20 -d GLONASS
              - "-P"
              - "29.20"
              - "-d"
              - "GLONASS"
            reportOutput: false
          - args: #ubxtool -P 29.20 -d BeiDou
              - "-P"
              - "29.20"
              - "-d"
              - "BeiDou"
            reportOutput: false
          - args: #ubxtool -P 29.20 -d SBAS
              - "-P"
              - "29.20"
              - "-d"
              - "SBAS"
            reportOutput: false
          - args: #ubxtool -P 29.20 -t -w 5 -v 1 -e SURVEYIN,600,50000
              - "-P"
              - "29.20"
              - "-t"
              - "-w"
              - "5"
              - "-v"
              - "1"
              - "-e"
              - "SURVEYIN,600,50000"
            reportOutput: true  
          - args:
              - "-p"
              - "MON-HW"
            reportOutput: true
          - args:
              - "-p"
              - "CFG-MSG,1,38,300"
            reportOutput: true
    ts2phcOpts: " "
    ts2phcConf: |
      [nmea]
      ts2phc.master 1
      [global]
      use_syslog  0
      verbose 1
      logging_level 7
      ts2phc.pulsewidth 100000000
      ts2phc.nmea_serialport  /dev/gnss0
      [ens2f0]
      ts2phc.extts_polarity rising
      ts2phc.extts_correction 0
    synce4lOpts: " "
    synce4lConf: |
      [global]
  recommend:
  - profile: "profile1"
    priority: 4
    match:
    - nodeLabel: "node-role.kubernetes.io/worker"
    

Documentation

Index

Constants

View Source
const (
	PCI_VPD_ID_STRING_TAG        = 0x82
	PCI_VPD_RO_TAG               = 0x90
	PCI_VPD_RW_TAG               = 0x91
	PCI_VPD_END_TAG              = 0x78
	PCI_VPD_BLOCK_DESCRIPTOR_LEN = 3
	PCI_VPD_KEYWORD_LEN          = 2
)

Variables

View Source
var EnableE810PTPConfig = `` /* 504-byte string literal not displayed */

Sourced from https://github.com/RHsyseng/oot-ice/blob/main/ptp-config.sh

Functions

func AfterRunPTPCommandE810

func AfterRunPTPCommandE810(data *interface{}, nodeProfile *ptpv1.PtpProfile, command string) error

func E810

func E810(name string) (*plugin.Plugin, *interface{})

func GetHardwareFingerprint

func GetHardwareFingerprint(device string) string

GetHardwareFingerprint returns the card identity for the purpose of matching to the correct internal delay profile Currently the fingerprint is extracted from the "Vendor Information V1" in the hardware Vital Product Data (VPD). With more cards with different delay profiles are avaliable, this function might need to change depending on how manufacturers expose data relevant for delay profiles in the VPD file

func OnPTPConfigChangeE810

func OnPTPConfigChangeE810(data *interface{}, nodeProfile *ptpv1.PtpProfile) error

func PopulateHwConfigE810

func PopulateHwConfigE810(data *interface{}, hwconfigs *[]ptpv1.HwConfig) error

Types

type E810Opts

type E810Opts struct {
	EnableDefaultConfig bool                         `json:"enableDefaultConfig"`
	UblxCmds            []E810UblxCmds               `json:"ublxCmds"`
	DevicePins          map[string]map[string]string `json:"pins"`
	DpllSettings        map[string]uint64            `json:"settings"`
	PhaseOffsetPins     map[string]map[string]string `json:"phaseOffsetPins"`
	InputDelays         []InputPhaseDelays           `json:"interconnections"`
}

type E810PluginData

type E810PluginData struct {
	// contains filtered or unexported fields
}

type E810UblxCmds

type E810UblxCmds struct {
	ReportOutput bool     `json:"reportOutput"`
	Args         []string `json:"args"`
}

type InputDelay

type InputDelay struct {
	Connector        string `json:"connector"`
	DelayPs          int    `json:"delayPs"`
	DelayVariationPs int    `json:"delayVariationPs"`
}

type InputPhaseDelays

type InputPhaseDelays struct {
	Id                    string      `json:"id"`
	Part                  string      `json:"Part"`
	Input                 *InputDelay `json:"inputPhaseDelay"`
	GnssInput             bool        `json:"gnssInput"`
	PhaseOutputConnectors []string    `json:"phaseOutputConnectors"`
}

type InternalDelays

type InternalDelays struct {
	PartType        string         `yaml:"partType"`
	ExternalInputs  []InternalLink `yaml:"externalInputs"`
	ExternalOutputs []InternalLink `yaml:"externalOutputs"`
	GnssInput       InternalLink   `yaml:"gnssInput"`
}

func InitInternalDelays

func InitInternalDelays(part string) (*InternalDelays, error)
type InternalLink struct {
	Connector        string `yaml:"connector"`
	Pin              string `yaml:"pin"`
	DelayPs          int32  `yaml:"delayPs"`
	DelayVariationPs uint32 `yaml:"delayVariationPs"`
}

type Vpd

type Vpd struct {
	IdentifierStringDescriptor string
	PartNumber                 string
	SerialNumber               string
	VendorSpecific1            string
	VendorSpecific2            string
}

Vital Product Data

func ParseVpd

func ParseVpd(vpdFile []byte) *Vpd

ParseVpd extracts some of the product data

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL