qcacmn: Add utility functions to set/get flow tag from skb cb

Tags are programmed using wlanconfig commands. Rx IPv4/v6
TCP/UDP packets matching a 5-tuple are tagged using HawkeyeV2 hardware.
Tags are populated in the skb->cb in the REO/exception/monitor data
path and sent to upper stack

CRs-Fixed: 2475913
Change-Id: I534a633b99a8b1c4c9aab71fbf5857710d7977a1
This commit is contained in:
Sumeet Rao
2019-06-20 12:04:24 -07:00
committed by nshrivas
orang tua 752a0b9c71
melakukan 5664251726
4 mengubah file dengan 69 tambahan dan 15 penghapusan

Melihat File

@@ -58,19 +58,41 @@ static inline void qdf_nbuf_ipa_priv_set(qdf_nbuf_t buf, uint32_t priv)
/**
* qdf_nbuf_set_rx_protocol_tag()
* @buf: Network buffer
* @val: Value to be set
* Return: void
* @val: Value to be set in the nbuf
* Return: None
*/
static inline void qdf_nbuf_set_rx_protocol_tag(qdf_nbuf_t buf, uint32_t val)
static inline void qdf_nbuf_set_rx_protocol_tag(qdf_nbuf_t buf, uint16_t val)
{
}
/**
* qdf_nbuf_get_rx_protocol_tag()
* @buf: Network buffer
* Return: void
* Return: Value of rx protocol tag, here 0
*/
static inline int qdf_nbuf_get_rx_protocol_tag(qdf_nbuf_t buf)
static inline uint16_t qdf_nbuf_get_rx_protocol_tag(qdf_nbuf_t buf)
{
return 0;
}
/**
* qdf_nbuf_set_rx_flow_tag() - set given value in flow tag field
* of buf(skb->cb)
* @buf: Network buffer
* @val: Rx Flow Tag to be set in the nbuf
* Return: None
*/
static inline void qdf_nbuf_set_rx_flow_tag(qdf_nbuf_t buf, uint16_t val)
{
}
/**
* qdf_nbuf_get_rx_flow_tag() - Get the value of flow_tag
* field of buf(skb->cb)
* @buf: Network buffer
* Return: Value of rx flow tag, here 0
*/
static inline uint16_t qdf_nbuf_get_rx_flow_tag(qdf_nbuf_t buf)
{
return 0;
}

Melihat File

@@ -68,10 +68,10 @@ qdf_nbuf_set_ext_cb(qdf_nbuf_t buf, void *ref)
* qdf_nbuf_set_rx_protocol_tag() - set given value in protocol_tag
* field of buf(skb->cb)
* @buf: Network buffer
* @val: Value to be set
* Return: void
* @val: Value to be set in the nbuf
* Return: None
*/
static inline void qdf_nbuf_set_rx_protocol_tag(qdf_nbuf_t buf, uint32_t val)
static inline void qdf_nbuf_set_rx_protocol_tag(qdf_nbuf_t buf, uint16_t val)
{
__qdf_nbuf_set_rx_protocol_tag(buf, val);
}
@@ -80,10 +80,34 @@ static inline void qdf_nbuf_set_rx_protocol_tag(qdf_nbuf_t buf, uint32_t val)
* qdf_nbuf_get_rx_protocol_tag() - Get the value of protocol_tag
* field of buf(skb->cb)
* @buf: Network buffer
* Return: void
* Return: Value of Rx protocol tag in the nbuf
*/
static inline int qdf_nbuf_get_rx_protocol_tag(qdf_nbuf_t buf)
static inline uint16_t qdf_nbuf_get_rx_protocol_tag(qdf_nbuf_t buf)
{
return __qdf_nbuf_get_rx_protocol_tag(buf);
}
/**
* qdf_nbuf_set_rx_flow_tag() - set given value in flow tag field
* of buf(skb->cb)
* @buf: Network buffer
* @val: Value of Rx flow tag to be set in the nbuf
* Return: None
*/
static inline void qdf_nbuf_set_rx_flow_tag(qdf_nbuf_t buf, uint16_t val)
{
__qdf_nbuf_set_rx_flow_tag(buf, val);
}
/**
* qdf_nbuf_get_rx_flow_tag() - Get the value of flow_tag
* field of buf(skb->cb)
* @buf: Network buffer
* Return: Value of the Rx flow tag in the nbuf
*/
static inline uint16_t qdf_nbuf_get_rx_flow_tag(qdf_nbuf_t buf)
{
return __qdf_nbuf_get_rx_flow_tag(buf);
}
#endif /* _QDF_NBUF_W_H */