Skip to content

Commit

Permalink
Add a tunnel interface option to HosfIf
Browse files Browse the repository at this point in the history
Add updated Host-Interface proposal

Change copyright header and fix UDP port type

Change copyright year

Fix warnings in saihostif.h

Fix warnings in saihostif.h

Fix warnings in saihostif.h

Fix warnings in saihostif.h

Update saitypes.h to include SAI_OBJECT_TYPE_HOSTIF_TUNNEL

Add encap parameters to hostif, revert the use of tunnel

Fix warning

Add default for SAI_HOSTIF_ATTR_ENCAP_TYPE

Change conditional to validonly

Add defaults for encap attributes

fix warnings

fix warnings

fix warnings

fix warnings

fix warnings

fix warnings

fix warnings

fix warnings

remove use of tunnel in meta header

Revert Netdev tunnel approach and use Generic Netlink

Fix typo

Add netlink to aspell
  • Loading branch information
padmanarayana committed May 29, 2019
1 parent 79babb0 commit f9610a0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
22 changes: 19 additions & 3 deletions inc/saihostif.h
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,10 @@ typedef enum _sai_hostif_type_t
SAI_HOSTIF_TYPE_NETDEV,

/** File descriptor */
SAI_HOSTIF_TYPE_FD
SAI_HOSTIF_TYPE_FD,

/** Generic netlink */
SAI_HOSTIF_TYPE_GENETLINK

} sai_hostif_type_t;

Expand Down Expand Up @@ -738,7 +741,7 @@ typedef enum _sai_hostif_attr_t
*
* @type char
* @flags MANDATORY_ON_CREATE | CREATE_ONLY
* @condition SAI_HOSTIF_ATTR_TYPE == SAI_HOSTIF_TYPE_NETDEV
* @condition SAI_HOSTIF_ATTR_TYPE == SAI_HOSTIF_TYPE_NETDEV or SAI_HOSTIF_ATTR_TYPE == SAI_HOSTIF_TYPE_GENETLINK
*/
SAI_HOSTIF_ATTR_NAME,

Expand Down Expand Up @@ -770,6 +773,16 @@ typedef enum _sai_hostif_attr_t
*/
SAI_HOSTIF_ATTR_VLAN_TAG,

/**
* @brief Set the Generic netlink (multicast) port id on which the packets/buffers
* are received on this host interface
*
* @type sai_uint32_t
* @flags CREATE_AND_SET
* @default 0
*/
SAI_HOSTIF_ATTR_GENETLINK_PORT_ID,

/**
* @brief End of attributes
*/
Expand Down Expand Up @@ -875,7 +888,10 @@ typedef enum _sai_hostif_table_entry_channel_type_t
SAI_HOSTIF_TABLE_ENTRY_CHANNEL_TYPE_NETDEV_LOGICAL_PORT,

/** Receive packets via Linux netdev L3 interface */
SAI_HOSTIF_TABLE_ENTRY_CHANNEL_TYPE_NETDEV_L3
SAI_HOSTIF_TABLE_ENTRY_CHANNEL_TYPE_NETDEV_L3,

/** Receive packets via Linux generic netlink interface */
SAI_HOSTIF_TABLE_ENTRY_CHANNEL_TYPE_GENETLINK

} sai_hostif_table_entry_channel_type_t;

Expand Down
1 change: 1 addition & 0 deletions meta/aspell.en.pws
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ multi
multicast
netdev
netdevs
netlink
nexthop
nexthopgroup
objlist
Expand Down

1 comment on commit f9610a0

@michaelli10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    /**
     * @brief Host interface table entry action target host interface object
     *
     * Valid only when #SAI_HOSTIF_TABLE_ENTRY_ATTR_CHANNEL_TYPE = #SAI_HOSTIF_TABLE_ENTRY_CHANNEL_TYPE_FD
     *
     * @type sai_object_id_t
     * @flags MANDATORY_ON_CREATE | CREATE_ONLY
     * @objects SAI_OBJECT_TYPE_HOSTIF
     * @condition SAI_HOSTIF_TABLE_ENTRY_ATTR_CHANNEL_TYPE == SAI_HOSTIF_TABLE_ENTRY_CHANNEL_TYPE_FD
     */
    SAI_HOSTIF_TABLE_ENTRY_ATTR_HOST_IF,

For the new hostif type "SAI_HOSTIF_TYPE_GENETLINK", the SAI_HOSTIF_TABLE_ENTRY_ATTR_HOST_IF attribute can also be used for setting the genetlink group ID in the case that the SAI_HOSTIF_TABLE_ENTRY_ATTR_CHANNEL_TYPE == SAI_HOSTIF_TABLE_ENTRY_CHANNEL_TYPE_GENETLINK. The comments should be updated to reflect this.

Please sign in to comment.