utils

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package utils contains various utilities for testing fabric simulator

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateFieldMatch

func GenerateFieldMatch(mf *p4info.MatchField) *p4api.FieldMatch

GenerateFieldMatch generates field match compliant with the specified match schema

func GenerateFieldMatches

func GenerateFieldMatches(tableInfo *p4info.Table) []*p4api.FieldMatch

GenerateFieldMatches generates field matches compliant with the specified table schema

func GenerateTableAction

func GenerateTableAction(tableInfo *p4info.Table) *p4api.TableAction

GenerateTableAction generates a table action compliant with the specified table schema

func GenerateTableEntry

func GenerateTableEntry(tableInfo *p4info.Table, priority int32, action *p4api.TableAction) *p4api.TableEntry

GenerateTableEntry generates a table entry compliant with the specified table schema

func RandomBytes

func RandomBytes(bitwidth int32) []byte

RandomBytes returns a buffer spanning at least the specified number of bits, filled with random content

Types

This section is empty.

Jump to

Keyboard shortcuts

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