Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lebauce committed Mar 29, 2024
1 parent 0b7cab3 commit 84e1858
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion flow/flow.proto
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ message Flow {
/* number of raw packet captured */
int64 RawPacketsCaptured = 37;

/* describes the way the flow was ended (e.g. by RST, FIN) */
/* describes the way the flow was ended (e.g. by RST, FIN) */
FlowFinishType FinishType = 60;
}

Expand Down
4 changes: 3 additions & 1 deletion flow/probes/targets/no_erspan.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ package targets

import (
"github.com/google/gopacket"

"github.com/skydive-project/skydive/api/types"
"github.com/skydive-project/skydive/flow"
"github.com/skydive-project/skydive/graffiti/graph"
"github.com/skydive-project/skydive/probe"
)

// ERSpanTarget defines a ERSpanTarget target
Expand All @@ -44,5 +46,5 @@ func (ers *ERSpanTarget) Stop() {

// NewERSpanTarget returns a new ERSpan target
func NewERSpanTarget(g *graph.Graph, n *graph.Node, capture *types.Capture) (*ERSpanTarget, error) {
return nil, errrors.ErrNotImplemented
return nil, probe.ErrNotImplemented
}
12 changes: 6 additions & 6 deletions topology/probes/netlink/sriov.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ func PciToString(address uint32) string {
address&0x7)
}

/* readIntFile reads a file containing an integer. This function targets
specifically files from /sys or /proc */
// readIntFile reads a file containing an integer. This function targets
// specifically files from /sys or /proc
func readIntFile(path string) (int, error) {
contents, err := ioutil.ReadFile(path)
if err != nil {
Expand All @@ -80,8 +80,8 @@ func readIntFile(path string) (int, error) {
return result, nil
}

/* ProcessNode, the action associated to a pendingVf connects the node of actual
virtual to the VF node associated to the physical interface */
// ProcessNode, the action associated to a pendingVf connects the node of actual
// virtual to the VF node associated to the physical interface
func (pending *pendingVf) ProcessNode(g *graph.Graph, node *graph.Node) bool {
tr := g.StartMetadataTransaction(node)
tr.AddMetadata("VfID", int64(pending.vfid))
Expand All @@ -99,8 +99,8 @@ func (pending *pendingVf) ProcessNode(g *graph.Graph, node *graph.Node) bool {
// errZeroVfs is used as a catchable exception rather than an error
var errZeroVfs = errors.New("zero VFS")

/* handleSriov adds a node for each virtual function declared. It takes
care of finding the PCI address of each VF */
// handleSriov adds a node for each virtual function declared. It takes
// care of finding the PCI address of each VF
func (u *Probe) handleSriov(
graph *graph.Graph,
intf *graph.Node,
Expand Down
12 changes: 6 additions & 6 deletions topology/probes/ovn/ovn.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ func uuidHasher(n *graph.Node) map[string]interface{} {
return nil
}

//OVNMetadata is the interface that autogenerated OVN types must satify
// OVNMetadata is the interface that autogenerated OVN types must satify
type OVNMetadata interface {
GetUUID() string
Metadata() graph.Metadata
}

//Callback to register a OVN node
// Callback to register a OVN node
func (p *Probe) registerNode(indexer *graph.Indexer, uuid string, metadata graph.Metadata) {
logging.GetLogger().Debugf("Registering OVN object with UUID %s and metadata %+v", uuid, metadata)

Expand All @@ -101,7 +101,7 @@ func (p *Probe) registerNode(indexer *graph.Indexer, uuid string, metadata graph
indexer.Index(id, node, map[string]interface{}{uuid: node})
}

//Callback to unregister a OVN node
// Callback to unregister a OVN node
func (p *Probe) unregisterNode(indexer *graph.Indexer, uuid string) {
logging.GetLogger().Debugf("Unregistering OVN object with UUID %s", uuid)

Expand Down Expand Up @@ -131,7 +131,7 @@ func (p *Probe) Stolen([]interface{}) {}
func (p *Probe) Locked([]interface{}) {}
func (p *Probe) Echo([]interface{}) {}

//Callback trigered when a new element was added to the OVN DB
// Callback trigered when a new element was added to the OVN DB
func (p *Probe) OnAdd(table string, m model.Model) {
logging.GetLogger().Debugf("OnAdd OVN Table %s: %v", table, m)
meta := m.(OVNMetadata)
Expand All @@ -142,7 +142,7 @@ func (p *Probe) OnAdd(table string, m model.Model) {
p.eventChan <- func() { p.registerNode(indexer, meta.GetUUID(), meta.Metadata()) }
}

//Callback trigered when an element was updated in the OVN DB
// Callback trigered when an element was updated in the OVN DB
func (p *Probe) OnUpdate(table string, om, nm model.Model) {
logging.GetLogger().Debugf("OnUpdate OVN Table %s: %v", table, nm)
meta := nm.(OVNMetadata)
Expand All @@ -153,7 +153,7 @@ func (p *Probe) OnUpdate(table string, om, nm model.Model) {
p.eventChan <- func() { p.registerNode(indexer, meta.GetUUID(), meta.Metadata()) }
}

//Callback trigered when an element was deleted from in the OVN DB
// Callback trigered when an element was deleted from in the OVN DB
func (p *Probe) OnDelete(table string, om model.Model) {
logging.GetLogger().Debugf("OnDelete OVN Table %s: %v", table, om)
meta := om.(OVNMetadata)
Expand Down

0 comments on commit 84e1858

Please sign in to comment.