Signed-off-by: Bill Fischofer <[email protected]>
---
.../linux-generic/include/odp_packet_internal.h | 4 +++
platform/linux-generic/odp_packet_flags.c | 40 ++++++++++++++++++++++
2 files changed, 44 insertions(+)
diff --git a/platform/linux-generic/include/odp_packet_internal.h
b/platform/linux-generic/include/odp_packet_internal.h
index 1340f8a..55cc0a8 100644
--- a/platform/linux-generic/include/odp_packet_internal.h
+++ b/platform/linux-generic/include/odp_packet_internal.h
@@ -46,6 +46,8 @@ typedef union {
uint32_t l4:1; /**< known L4 protocol present */
uint32_t eth:1; /**< Ethernet */
+ uint32_t eth_bcast:1; /**< Ethernet broadcast */
+ uint32_t eth_mcast:1; /**< Ethernet multicast */
uint32_t jumbo:1; /**< Jumbo frame */
uint32_t vlan:1; /**< VLAN hdr found */
uint32_t vlan_qinq:1; /**< Stacked VLAN found, QinQ */
@@ -55,6 +57,8 @@ typedef union {
uint32_t ipv4:1; /**< IPv4 */
uint32_t ipv6:1; /**< IPv6 */
+ uint32_t ip_bcast:1; /**< IP broadcast */
+ uint32_t ip_mcast:1; /**< IP multicast */
uint32_t ipfrag:1; /**< IP fragment */
uint32_t ipopt:1; /**< IP optional headers */
uint32_t ipsec:1; /**< IPSec decryption may be needed */
diff --git a/platform/linux-generic/odp_packet_flags.c
b/platform/linux-generic/odp_packet_flags.c
index ae9a9ed..1a0a11c 100644
--- a/platform/linux-generic/odp_packet_flags.c
+++ b/platform/linux-generic/odp_packet_flags.c
@@ -85,6 +85,16 @@ int odp_packet_has_eth(odp_packet_t pkt)
return pkt_hdr->input_flags.eth;
}
+int odp_packet_has_eth_bcast(odp_packet_t pkt)
+{
+ retflag(pkt, input_flags.eth_bcast);
+}
+
+int odp_packet_has_eth_mcast(odp_packet_t pkt)
+{
+ retflag(pkt, input_flags.eth_mcast);
+}
+
int odp_packet_has_jumbo(odp_packet_t pkt)
{
odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt);
@@ -117,6 +127,16 @@ int odp_packet_has_ipv6(odp_packet_t pkt)
retflag(pkt, input_flags.ipv6);
}
+int odp_packet_has_ip_bcast(odp_packet_t pkt)
+{
+ retflag(pkt, input_flags.ip_bcast);
+}
+
+int odp_packet_has_ip_mcast(odp_packet_t pkt)
+{
+ retflag(pkt, input_flags.ip_mcast);
+}
+
int odp_packet_has_ipfrag(odp_packet_t pkt)
{
retflag(pkt, input_flags.ipfrag);
@@ -226,6 +246,16 @@ void odp_packet_has_eth_set(odp_packet_t pkt, int val)
setflag(pkt, input_flags.eth, val);
}
+void odp_packet_has_eth_bcast_set(odp_packet_t pkt, int val)
+{
+ setflag(pkt, input_flags.eth_bcast, val);
+}
+
+void odp_packet_has_eth_mcast_set(odp_packet_t pkt, int val)
+{
+ setflag(pkt, input_flags.eth_mcast, val);
+}
+
void odp_packet_has_jumbo_set(odp_packet_t pkt, int val)
{
setflag(pkt, input_flags.jumbo, val);
@@ -256,6 +286,16 @@ void odp_packet_has_ipv6_set(odp_packet_t pkt, int val)
setflag(pkt, input_flags.ipv6, val);
}
+void odp_packet_has_ip_bcast_set(odp_packet_t pkt, int val)
+{
+ setflag(pkt, input_flags.ip_bcast, val);
+}
+
+void odp_packet_has_ip_mcast_set(odp_packet_t pkt, int val)
+{
+ setflag(pkt, input_flags.ip_mcast, val);
+}
+
void odp_packet_has_ipfrag_set(odp_packet_t pkt, int val)
{
setflag(pkt, input_flags.ipfrag, val);
--
2.5.0
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp