NDN-DPDK
High-Speed Named Data Networking Forwarder
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Typedefs | Functions
weighted.c File Reference
#include "api.h"

Data Structures

struct  FibEntryInfo
 

Typedefs

typedef struct FibEntryInfo FibEntryInfo
 

Functions

SUBROUTINE uint64_t RxInterest (SgCtx *ctx)
 
uint64_t SgMain (SgCtx *ctx)
 The strategy dataplane program. More...
 
uint64_t SgInit (SgCtx *ctx)
 The strategy initialization procedure. More...
 
 SGINIT_SCHEMA ({ "$schema":"http://json-schema.org/draft-07/schema#", "type":"object", "properties":{ "weights":{ "description":"nexthop weights", "type":"array", "minItems":1, "items":{"type":"integer", "minimum":1, "maximum":255} } }, "required":["weights"], "additionalProperties":false })
 

Detailed Description

The weighted strategy randomly picks a nexthop by assigned weights. If the chosen nexthop is unusable (face down, supression, etc), packet is lost. Initial and retransmitted Interests are treated the same.

Typedef Documentation

◆ FibEntryInfo

typedef struct FibEntryInfo FibEntryInfo

Function Documentation

◆ RxInterest()

SUBROUTINE uint64_t RxInterest ( SgCtx ctx)

◆ SgInit()

uint64_t SgInit ( SgCtx ctx)

The strategy initialization procedure.

Returns
status code, ignored but may appear in logs.

A strategy should implement this function if it accepts parameters. This is called when a strategy is activated on a FIB entry. It should populate FIB entry scratch area according to JSON parameters.

◆ SGINIT_SCHEMA()

SGINIT_SCHEMA ( { "$schema":"http://json-schema.org/draft-07/schema#", "type":"object", "properties":{ "weights":{ "description":"nexthop weights", "type":"array", "minItems":1, "items":{"type":"integer", "minimum":1, "maximum":255} } }, "required":["weights"], "additionalProperties":false }  )

◆ SgMain()

uint64_t SgMain ( SgCtx ctx)

The strategy dataplane program.

Returns
status code, ignored but may appear in logs.

Every strategy must implement this function.