---
name: "rio_route_add_entry"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/rio_route_add_entry"
---

# rio\_route\_add\_entry(9)

Add a route entry to a switch routing table

## NAME

rio\_route\_add\_entry - Add a route entry to a switch routing table

## SYNOPSIS

**int rio\_route\_add\_entry(struct rio\_dev \*** *rdev***, u16** *table***, u16** *route\_destid***, u8** *route\_port***, int** *lock***);**

## ARGUMENTS

*rdev*

RIO device

*table*

Routing table ID

*route\_destid*

Destination ID to be routed

*route\_port*

Port number to be routed

*lock*

apply a hardware lock on switch device flag (1=lock, 0=no\_lock)

## DESCRIPTION

If available calls the switch specific **add\_entry** method to add a route entry into a switch routing table. Otherwise uses standard RT update method as defined by RapidIO specification. A specific routing table can be selected using the *table* argument if a switch has per port routing tables or the standard (or global) table may be used by passing **RIO\_GLOBAL\_TABLE** in *table*.

Returns **0** on success or **-EINVAL** on failure.

## AUTHOR

**Matt Porter** \<mporter@kernel.crashing.org\>, \<mporter@mvista.com\>

Author.

## COPYRIGHT
