Skip to content

Commit

Permalink
net: Add function to convert VLAN priority to packet priority
Browse files Browse the repository at this point in the history
Currently the VLAN priority is the same as packet priority but
if such conversion is needed, then this function can be used
for such conversion.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
  • Loading branch information
jukkar authored and Anas Nashif committed Apr 5, 2018
1 parent 6643bb0 commit ad5bbef
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions include/net/net_ip.h
Expand Up @@ -981,6 +981,20 @@ int net_tx_priority2tc(enum net_priority prio);
*/
int net_rx_priority2tc(enum net_priority prio);

/**
* @brief Convert network packet VLAN priority to network packet priority so we
* can place the packet into correct queue.
*
* @param priority VLAN priority
*
* @return Network priority
*/
static inline enum net_priority net_vlan2priority(u8_t priority)
{
/* Currently this is 1:1 mapping */
return priority;
}

#ifdef __cplusplus
}
#endif
Expand Down

0 comments on commit ad5bbef

Please sign in to comment.