aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/faces
diff options
context:
space:
mode:
Diffstat (limited to 'hicn-plugin/src/faces')
-rwxr-xr-xhicn-plugin/src/faces/face.h23
-rwxr-xr-xhicn-plugin/src/faces/ip/dpo_ip.c13
-rwxr-xr-xhicn-plugin/src/faces/ip/dpo_ip.h44
-rwxr-xr-xhicn-plugin/src/faces/ip/face_ip_node.c6
-rwxr-xr-xhicn-plugin/src/faces/ip/iface_ip_node.c8
-rwxr-xr-xhicn-plugin/src/faces/udp/dpo_udp.c8
-rwxr-xr-xhicn-plugin/src/faces/udp/dpo_udp.h30
-rwxr-xr-xhicn-plugin/src/faces/udp/face_udp_node.c6
-rwxr-xr-xhicn-plugin/src/faces/udp/iface_udp_node.c6
9 files changed, 91 insertions, 53 deletions
diff --git a/hicn-plugin/src/faces/face.h b/hicn-plugin/src/faces/face.h
index 2774d9a2e..b24fe8648 100755
--- a/hicn-plugin/src/faces/face.h
+++ b/hicn-plugin/src/faces/face.h
@@ -21,6 +21,8 @@
#include <vnet/dpo/dpo.h>
#include <vnet/adj/adj_types.h>
+#include "../hicn.h"
+
typedef u8 hicn_face_flags_t;
typedef index_t hicn_face_id_t;
typedef dpo_type_t hicn_face_type_t;
@@ -101,6 +103,27 @@ extern hicn_face_t *hicn_dpoi_face_pool;
#define HICN_FACE_NULL (hicn_face_id_t) ~0
+#define HICN_FACE_FLAGS_APPFACE_PROD_BIT 2
+#define HICN_FACE_FLAGS_APPFACE_CONS_BIT 3
+
+STATIC_ASSERT ((1 << HICN_FACE_FLAGS_APPFACE_PROD_BIT) ==
+ HICN_FACE_FLAGS_APPFACE_PROD,
+ "HICN_FACE_FLAGS_APPFACE_PROD_BIT and HICN_FACE_FLAGS_APPFACE_PROD must correspond");
+
+STATIC_ASSERT ((1 << HICN_FACE_FLAGS_APPFACE_CONS_BIT) ==
+ HICN_FACE_FLAGS_APPFACE_CONS,
+ "HICN_FACE_FLAGS_APPFACE_CONS_BIT and HICN_FACE_FLAGS_APPFACE_CONS must correspond");
+
+STATIC_ASSERT ((HICN_FACE_FLAGS_APPFACE_PROD >>
+ HICN_FACE_FLAGS_APPFACE_PROD_BIT) ==
+ HICN_BUFFER_FLAGS_FACE_IS_APP,
+ "hicn buffer app flag does not correspond to HICN_FACE_FLAGS_APPFACE_PROD");
+
+STATIC_ASSERT ((HICN_FACE_FLAGS_APPFACE_CONS >>
+ HICN_FACE_FLAGS_APPFACE_CONS_BIT) ==
+ HICN_BUFFER_FLAGS_FACE_IS_APP,
+ "hicn buffer app flag does not correspond to HICN_FACE_FLAGS_APPFACE_PROD");
+
/**
* @brief Definition of the virtual functin table for an hICN FACE DPO.
*
diff --git a/hicn-plugin/src/faces/ip/dpo_ip.c b/hicn-plugin/src/faces/ip/dpo_ip.c
index 1b2dbcff9..de71f1b01 100755
--- a/hicn-plugin/src/faces/ip/dpo_ip.c
+++ b/hicn-plugin/src/faces/ip/dpo_ip.c
@@ -78,7 +78,7 @@ hicn_dpo_ip4_create (dpo_id_t * dpo,
/* If local matches the dpoi is a face */
hicn_face_t *face =
hicn_face_ip4_get (local_addr, sw_if, &hicn_face_ip_local_hashtb);
- u8 is_appface;
+ u8 hicnb_flags;
if (face != NULL)
return HICN_ERROR_FACE_ALREADY_CREATED;
@@ -87,7 +87,7 @@ hicn_dpo_ip4_create (dpo_id_t * dpo,
if (face == NULL)
{
- hicn_dpo_ip4_add_and_lock_from_remote (dpo, &is_appface, local_addr,
+ hicn_dpo_ip4_add_and_lock_from_remote (dpo, &hicnb_flags, local_addr,
remote_addr, sw_if, node_index);
*face_id = (hicn_face_id_t) dpo->dpoi_index;
face = hicn_dpoi_get_from_idx (*face_id);
@@ -127,7 +127,7 @@ hicn_dpo_ip6_create (dpo_id_t * dpo,
hicn_face_t *face =
hicn_face_ip6_get (local_addr, sw_if, &hicn_face_ip_local_hashtb);
- u8 is_appface;
+ u8 hicnb_flags;
if (face != NULL)
return HICN_ERROR_FACE_ALREADY_CREATED;
@@ -137,7 +137,7 @@ hicn_dpo_ip6_create (dpo_id_t * dpo,
/* If remote matches the dpoi is a iface */
if (face == NULL)
{
- hicn_dpo_ip6_add_and_lock_from_remote (dpo, &is_appface, local_addr,
+ hicn_dpo_ip6_add_and_lock_from_remote (dpo, &hicnb_flags, local_addr,
remote_addr, sw_if, node_index);
*face_id = (hicn_face_id_t) dpo->dpoi_index;
face = hicn_dpoi_get_from_idx (*face_id);
@@ -172,9 +172,8 @@ hicn_dpo_ip_create_from_face (hicn_face_t * face, dpo_id_t * dpo,
hicn_face_id_t face_dpoi_id = hicn_dpoi_get_index (face);
hicn_face_ip_t *ip_face = (hicn_face_ip_t *) face->data;
dpo_set (dpo, face->shared.face_type,
- ip46_address_is_ip4 (&ip_face->
- local_addr) ? DPO_PROTO_IP4 : DPO_PROTO_IP6,
- face_dpoi_id);
+ ip46_address_is_ip4 (&ip_face->local_addr) ? DPO_PROTO_IP4 :
+ DPO_PROTO_IP6, face_dpoi_id);
dpo->dpoi_next_node = dpoi_next_node;
}
diff --git a/hicn-plugin/src/faces/ip/dpo_ip.h b/hicn-plugin/src/faces/ip/dpo_ip.h
index 675443277..426d5a146 100755
--- a/hicn-plugin/src/faces/ip/dpo_ip.h
+++ b/hicn-plugin/src/faces/ip/dpo_ip.h
@@ -33,7 +33,7 @@ void hicn_dpo_ip_module_init (void);
* method adds a lock on the face state.
*
* @param dpo: Result of the lookup. If the face doesn't exist dpo = NULL
- * @param is_appface: Boolean that indicates whether the face is an application
+ * @param hicnb_flags: Flags that indicate whether the face is an application
* face or not
* @param local_addr: Ip v4 local address of the face
* @param sw_if: software interface id of the face
@@ -42,7 +42,7 @@ void hicn_dpo_ip_module_init (void);
*/
always_inline int
hicn_dpo_ip4_lock_from_local (dpo_id_t * dpo,
- u8 * is_appface,
+ u8 * hicnb_flags,
const ip4_address_t * local_addr, u32 sw_if)
{
hicn_face_t *face =
@@ -51,7 +51,10 @@ hicn_dpo_ip4_lock_from_local (dpo_id_t * dpo,
if (PREDICT_FALSE (face == NULL))
return HICN_ERROR_FACE_NOT_FOUND;
- *is_appface = face->shared.flags & HICN_FACE_FLAGS_APPFACE_PROD;
+ *hicnb_flags = HICN_BUFFER_FLAGS_DEFAULT;
+ *hicnb_flags |=
+ (face->shared.flags & HICN_FACE_FLAGS_APPFACE_PROD) >>
+ HICN_FACE_FLAGS_APPFACE_PROD_BIT;
hicn_face_id_t dpoi_index = hicn_dpoi_get_index (face);
dpo_set (dpo, hicn_face_ip_type, DPO_PROTO_IP4, dpoi_index);
@@ -66,7 +69,7 @@ hicn_dpo_ip4_lock_from_local (dpo_id_t * dpo,
* method adds a lock on the face state.
*
* @param dpo: Result of the lookup. If the face doesn't exist dpo = NULL
- * @param is_appface: Boolean that indicates whether the face is an application
+ * @param hicnb_flags: Flags that indicate whether the face is an application
* face or not
* @param local_addr: Ip v6 local address of the face
* @param sw_if: software interface id of the face
@@ -75,7 +78,7 @@ hicn_dpo_ip4_lock_from_local (dpo_id_t * dpo,
*/
always_inline int
hicn_dpo_ip6_lock_from_local (dpo_id_t * dpo,
- u8 * is_appface,
+ u8 * hicnb_flags,
const ip6_address_t * local_addr, u32 sw_if)
{
hicn_face_t *face =
@@ -84,7 +87,10 @@ hicn_dpo_ip6_lock_from_local (dpo_id_t * dpo,
if (PREDICT_FALSE (face == NULL))
return HICN_ERROR_FACE_NOT_FOUND;
- *is_appface = face->shared.flags & HICN_FACE_FLAGS_APPFACE_PROD;
+ *hicnb_flags = HICN_BUFFER_FLAGS_DEFAULT;
+ *hicnb_flags |=
+ (face->shared.flags & HICN_FACE_FLAGS_APPFACE_PROD) >>
+ HICN_FACE_FLAGS_APPFACE_PROD_BIT;
hicn_face_id_t dpoi_index = hicn_dpoi_get_index (face);
dpo_set (dpo, hicn_face_ip_type, DPO_PROTO_IP6, dpoi_index);
@@ -100,7 +106,7 @@ hicn_dpo_ip6_lock_from_local (dpo_id_t * dpo,
* address and returns its dpo. This method adds a lock on the face state.
*
* @param dpo: Result of the lookup
- * @param is_appface: Boolean that indicates whether the face is an application
+ * @param hicnb_flags: Flags that indicate whether the face is an application
* face or not
* @param local_addr: Ip v4 local address of the face
* @param remote_addr: Ip v4 remote address of the face
@@ -109,7 +115,7 @@ hicn_dpo_ip6_lock_from_local (dpo_id_t * dpo,
*/
always_inline void
hicn_dpo_ip4_add_and_lock_from_remote (dpo_id_t * dpo,
- u8 * is_appface,
+ u8 * hicnb_flags,
const ip4_address_t * local_addr,
const ip4_address_t * remote_addr,
u32 sw_if, u32 node_index)
@@ -125,7 +131,7 @@ hicn_dpo_ip4_add_and_lock_from_remote (dpo_id_t * dpo,
ip46_address_t remote_addr46 = to_ip46 (0, (u8 *) remote_addr);
hicn_iface_ip_add (&local_addr46, &remote_addr46, sw_if, &dpoi_index);
- *is_appface = 0;
+ *hicnb_flags = HICN_BUFFER_FLAGS_DEFAULT;
dpo_set (dpo, hicn_face_ip_type, DPO_PROTO_IP4, dpoi_index);
dpo->dpoi_next_node = node_index;
@@ -135,7 +141,10 @@ hicn_dpo_ip4_add_and_lock_from_remote (dpo_id_t * dpo,
}
/* Code replicated on purpose */
- *is_appface = face->shared.flags & HICN_FACE_FLAGS_APPFACE_PROD;
+ *hicnb_flags = HICN_BUFFER_FLAGS_DEFAULT;
+ *hicnb_flags |=
+ (face->shared.flags & HICN_FACE_FLAGS_APPFACE_PROD) >>
+ HICN_FACE_FLAGS_APPFACE_PROD_BIT;
hicn_face_id_t dpoi_index = hicn_dpoi_get_index (face);
dpo_set (dpo, hicn_face_ip_type, DPO_PROTO_IP4, dpoi_index);
@@ -148,7 +157,7 @@ hicn_dpo_ip4_add_and_lock_from_remote (dpo_id_t * dpo,
* address and returns its dpo. This method adds a lock on the face state.
*
* @param dpo: Result of the lookup
- * @param is_appface: Boolean that indicates whether the face is an application
+ * @param hicnb_flags: Flags that indicate whether the face is an application
* face or not
* @param local_addr: Ip v6 local address of the face
* @param remote_addr: Ip v6 remote address of the face
@@ -157,11 +166,15 @@ hicn_dpo_ip4_add_and_lock_from_remote (dpo_id_t * dpo,
*/
always_inline void
hicn_dpo_ip6_add_and_lock_from_remote (dpo_id_t * dpo,
- u8 * is_appface,
+ u8 * hicnb_flags,
const ip6_address_t * local_addr,
const ip6_address_t * remote_addr,
u32 sw_if, u32 node_index)
{
+ dpo->dpoi_type = DPO_FIRST;
+ dpo->dpoi_proto = DPO_PROTO_NONE;
+ dpo->dpoi_index = INDEX_INVALID;
+ dpo->dpoi_next_node = 0;
/*All (complete) faces are indexed by remote addess as well */
hicn_face_t *face =
hicn_face_ip6_get (remote_addr, sw_if, &hicn_face_ip_remote_hashtb);
@@ -172,7 +185,7 @@ hicn_dpo_ip6_add_and_lock_from_remote (dpo_id_t * dpo,
hicn_iface_ip_add ((ip46_address_t *) local_addr,
(ip46_address_t *) remote_addr, sw_if, &dpoi_index);
- *is_appface = 0;
+ *hicnb_flags = HICN_BUFFER_FLAGS_DEFAULT;
dpo_set (dpo, hicn_face_ip_type, DPO_PROTO_IP4, dpoi_index);
dpo->dpoi_next_node = node_index;
@@ -181,7 +194,10 @@ hicn_dpo_ip6_add_and_lock_from_remote (dpo_id_t * dpo,
return;
}
/* Code replicated on purpose */
- *is_appface = face->shared.flags & HICN_FACE_FLAGS_APPFACE_PROD;
+ *hicnb_flags = HICN_BUFFER_FLAGS_DEFAULT;
+ *hicnb_flags |=
+ (face->shared.flags & HICN_FACE_FLAGS_APPFACE_PROD) >>
+ HICN_FACE_FLAGS_APPFACE_PROD_BIT;
index_t dpoi_index = hicn_dpoi_get_index (face);
dpo_set (dpo, hicn_face_ip_type, DPO_PROTO_IP6, dpoi_index);
diff --git a/hicn-plugin/src/faces/ip/face_ip_node.c b/hicn-plugin/src/faces/ip/face_ip_node.c
index 6081e4737..b3577f65f 100755
--- a/hicn-plugin/src/faces/ip/face_ip_node.c
+++ b/hicn-plugin/src/faces/ip/face_ip_node.c
@@ -140,7 +140,7 @@ typedef enum
\
ret = LOCK_FROM_LOCAL_IP##ipv \
(&(hicnb0->face_dpo_id), \
- &hicnb0->is_appface, \
+ &hicnb0->flags, \
&(ip_hdr->dst_address), \
vnet_buffer (b0)->sw_if_index[VLIB_RX]); \
\
@@ -217,13 +217,13 @@ typedef enum
\
ret0 = LOCK_FROM_LOCAL_IP##ipv \
(&(hicnb0->face_dpo_id), \
- &hicnb0->is_appface, \
+ &hicnb0->flags, \
&(ip_hdr0->dst_address), \
vnet_buffer (b0)->sw_if_index[VLIB_RX]); \
\
ret1 = LOCK_FROM_LOCAL_IP##ipv \
(&(hicnb1->face_dpo_id), \
- &hicnb1->is_appface, \
+ &hicnb1->flags, \
&(ip_hdr1->dst_address), \
vnet_buffer (b1)->sw_if_index[VLIB_RX]); \
\
diff --git a/hicn-plugin/src/faces/ip/iface_ip_node.c b/hicn-plugin/src/faces/ip/iface_ip_node.c
index 8df0467f0..9ca00d7bf 100755
--- a/hicn-plugin/src/faces/ip/iface_ip_node.c
+++ b/hicn-plugin/src/faces/ip/iface_ip_node.c
@@ -143,7 +143,7 @@ typedef enum
{ \
vlib_buffer_t *b1; \
b1 = vlib_get_buffer (vm, from[1]); \
- CLIB_PREFETCH (b1, 2*CLIB_CACHE_LINE_BYTES, STORE); \
+ CLIB_PREFETCH (b1, 2*CLIB_CACHE_LINE_BYTES, STORE); \
CLIB_PREFETCH (b1->data, CLIB_CACHE_LINE_BYTES , LOAD); \
} \
/* Dequeue a packet buffer */ \
@@ -171,7 +171,7 @@ typedef enum
\
DPO_ADD_LOCK_IP##ipv \
(&(hicnb0->face_dpo_id), \
- &hicnb0->is_appface, \
+ &hicnb0->flags, \
local_address, \
&(ip_hdr->src_address), \
vnet_buffer(b0)->sw_if_index[VLIB_RX], \
@@ -248,7 +248,7 @@ typedef enum
\
DPO_ADD_LOCK_IP##ipv \
(&(hicnb0->face_dpo_id), \
- &hicnb0->is_appface, \
+ &hicnb0->flags, \
local_address0, \
&(ip_hdr0->src_address), \
vnet_buffer(b0)->sw_if_index[VLIB_RX], \
@@ -256,7 +256,7 @@ typedef enum
\
DPO_ADD_LOCK_IP##ipv \
(&(hicnb1->face_dpo_id), \
- &hicnb1->is_appface, \
+ &hicnb1->flags, \
local_address1, \
&(ip_hdr1->src_address), \
vnet_buffer(b1)->sw_if_index[VLIB_RX], \
diff --git a/hicn-plugin/src/faces/udp/dpo_udp.c b/hicn-plugin/src/faces/udp/dpo_udp.c
index e58fc9788..eadcb6abd 100755
--- a/hicn-plugin/src/faces/udp/dpo_udp.c
+++ b/hicn-plugin/src/faces/udp/dpo_udp.c
@@ -79,14 +79,14 @@ hicn_dpo_udp4_create (dpo_id_t * dpo,
u16 net_dst_port = clib_host_to_net_u16 (dst_port);
hicn_face_t *face = hicn_face_udp4_get (src_ip, dst_ip, src_port, dst_port);
- u8 is_appface;
+ u8 hicnb_flags;
/* ip_csum_t sum0; */
if (face != NULL)
return HICN_ERROR_FACE_ALREADY_CREATED;
hicn_dpo_udp4_add_and_lock (dpo, src_ip, dst_ip, net_src_port, net_dst_port,
- node_index, &is_appface);
+ node_index, &hicnb_flags);
face = hicn_dpoi_get_from_idx (dpo->dpoi_index);
@@ -118,13 +118,13 @@ hicn_dpo_udp6_create (dpo_id_t * dpo,
u16 net_dst_port = clib_host_to_net_u16 (dst_port);
hicn_face_t *face =
hicn_face_udp6_get (src_ip, dst_ip, net_src_port, net_dst_port);
- u8 is_appface;
+ u8 hicnb_flags;
if (face != NULL)
return HICN_ERROR_FACE_ALREADY_CREATED;
hicn_dpo_udp6_add_and_lock (dpo, src_ip, dst_ip, net_src_port, net_dst_port,
- node_index, &is_appface);
+ node_index, &hicnb_flags);
face = hicn_dpoi_get_from_idx (dpo->dpoi_index);
diff --git a/hicn-plugin/src/faces/udp/dpo_udp.h b/hicn-plugin/src/faces/udp/dpo_udp.h
index fdde4192b..33e4b5d46 100755
--- a/hicn-plugin/src/faces/udp/dpo_udp.h
+++ b/hicn-plugin/src/faces/udp/dpo_udp.h
@@ -64,8 +64,8 @@ hicn_dpo_udp4_create (dpo_id_t * dpo,
* @param remote_addr: Remote address of the UDP tunnel
* @param local_port: Local port of the UDP tunnel
* @param remote_port: Remote port of the UDP tunnel
- * @param is_appface: Boolean that indicates whether the face is an application
- * face or not. (Currently only IP faces can be appface)
+ * @param hicnb_flags: Flags that indicate whether the face is an application
+ * face or not in the hicn_buffer. (Currently only IP faces can be appface)
*
* @result HICN_ERROR_FACE_NOT_FOUND if the face does not exist, otherwise HICN_ERROR_NONE.
*/
@@ -73,7 +73,7 @@ always_inline int
hicn_dpo_udp4_lock (dpo_id_t * dpo,
const ip4_address_t * local_addr,
const ip4_address_t * remote_addr,
- u16 local_port, u16 remote_port, u8 * is_appface)
+ u16 local_port, u16 remote_port, u8 * hicnb_flags)
{
hicn_face_t *face =
hicn_face_udp4_get (local_addr, remote_addr, local_port, remote_port);
@@ -86,7 +86,7 @@ hicn_dpo_udp4_lock (dpo_id_t * dpo,
dpo->dpoi_next_node = ~0;
dpo_lock (dpo);
- *is_appface = 0;
+ *hicnb_flags = HICN_BUFFER_FLAGS_DEFAULT;
return HICN_ERROR_NONE;
}
@@ -101,7 +101,7 @@ hicn_dpo_udp4_lock (dpo_id_t * dpo,
* @param remote_addr: Remote address of the UDP tunnel
* @param local_port: Local port of the UDP tunnel
* @param remote_port: Remote port of the UDP tunnel
- * @param is_appface: Boolean that indicates whether the face is an application
+ * @param hicnb_flags: Flags that indicate whether the face is an application
* face or not. (Currently only IP faces can be appface)
* @param node_index: vlib edge index to use in the packet processing
*/
@@ -110,7 +110,7 @@ hicn_dpo_udp4_add_and_lock (dpo_id_t * dpo,
const ip4_address_t * local_addr,
const ip4_address_t * remote_addr,
u16 local_port, u16 remote_port,
- u32 node_index, u8 * is_appface)
+ u32 node_index, u8 * hicnb_flags)
{
hicn_face_t *face =
hicn_face_udp4_get (local_addr, remote_addr, local_port, remote_port);
@@ -145,7 +145,7 @@ hicn_dpo_udp4_add_and_lock (dpo_id_t * dpo,
mhash_set_mem (&hicn_face_udp_hashtb, &key, (uword *) & dpoi_index, 0);
face = face;
- *is_appface = 0;
+ *hicnb_flags = HICN_BUFFER_FLAGS_DEFAULT;
dpo_set (dpo, hicn_face_udp_type, DPO_PROTO_IP4, dpoi_index);
dpo->dpoi_next_node = node_index;
dpo_lock (dpo);
@@ -153,7 +153,7 @@ hicn_dpo_udp4_add_and_lock (dpo_id_t * dpo,
return;
}
- *is_appface = 0;
+ *hicnb_flags = HICN_BUFFER_FLAGS_DEFAULT;
hicn_face_id_t dpoi_index = hicn_dpoi_get_index (face);
dpo_set (dpo, hicn_face_udp_type, DPO_PROTO_IP4, dpoi_index);
@@ -196,7 +196,7 @@ hicn_dpo_udp6_create (dpo_id_t * dpo,
* @param remote_addr: Remote address of the UDP tunnel
* @param local_port: Local port of the UDP tunnel
* @param remote_port: Remote port of the UDP tunnel
- * @param is_appface: Boolean that indicates whether the face is an application
+ * @param hicnb_flags: Flags that indicate whether the face is an application
* face or not. (Currently only IP faces can be appface)
*
* @result HICN_ERROR_FACE_NOT_FOUND if the face does not exist, otherwise HICN_ERROR_NONE.
@@ -205,7 +205,7 @@ always_inline int
hicn_dpo_udp6_lock (dpo_id_t * dpo,
const ip6_address_t * local_addr,
const ip6_address_t * remote_addr,
- u16 local_port, u16 remote_port, u8 * is_appface)
+ u16 local_port, u16 remote_port, u8 * hicnb_flags)
{
hicn_face_t *face =
hicn_face_udp6_get (local_addr, remote_addr, local_port, remote_port);
@@ -218,7 +218,7 @@ hicn_dpo_udp6_lock (dpo_id_t * dpo,
dpo_set (dpo, hicn_face_udp_type, DPO_PROTO_IP4, dpoi_index);
dpo->dpoi_next_node = ~0;
dpo_lock (dpo);
- *is_appface = 0;
+ *hicnb_flags = HICN_BUFFER_FLAGS_DEFAULT;
return HICN_ERROR_NONE;
}
@@ -233,7 +233,7 @@ hicn_dpo_udp6_lock (dpo_id_t * dpo,
* @param remote_addr: Remote address of the UDP tunnel
* @param local_port: Local port of the UDP tunnel
* @param remote_port: Remote port of the UDP tunnel
- * @param is_appface: Boolean that indicates whether the face is an application
+ * @param hicnb_flags: Flags that indicate whether the face is an application
* face or not. (Currently only IP faces can be appface)
* @param node_index: vlib edge index to use in the packet processing
*/
@@ -242,7 +242,7 @@ hicn_dpo_udp6_add_and_lock (dpo_id_t * dpo,
const ip6_address_t * local_addr,
const ip6_address_t * remote_addr,
u16 local_port, u16 remote_port,
- u32 node_index, u8 * is_appface)
+ u32 node_index, u8 * hicnb_flags)
{
hicn_face_t *face =
hicn_face_udp6_get (local_addr, remote_addr, local_port, remote_port);
@@ -276,7 +276,7 @@ hicn_dpo_udp6_add_and_lock (dpo_id_t * dpo,
mhash_set_mem (&hicn_face_udp_hashtb, &key, (uword *) & dpoi_index, 0);
- *is_appface = 0;
+ *hicnb_flags = HICN_BUFFER_FLAGS_DEFAULT;
dpo_set (dpo, hicn_face_udp_type, DPO_PROTO_IP6, dpoi_index);
dpo->dpoi_next_node = node_index;
dpo_lock (dpo);
@@ -284,7 +284,7 @@ hicn_dpo_udp6_add_and_lock (dpo_id_t * dpo,
return;
}
- *is_appface = 0;
+ *hicnb_flags = HICN_BUFFER_FLAGS_DEFAULT;
hicn_face_id_t dpoi_index = hicn_dpoi_get_index (face);
dpo_set (dpo, hicn_face_udp_type, DPO_PROTO_IP6, dpoi_index);
diff --git a/hicn-plugin/src/faces/udp/face_udp_node.c b/hicn-plugin/src/faces/udp/face_udp_node.c
index 74d0b1864..ac7a63731 100755
--- a/hicn-plugin/src/faces/udp/face_udp_node.c
+++ b/hicn-plugin/src/faces/udp/face_udp_node.c
@@ -139,7 +139,7 @@ typedef enum
&(ip_hdr->src_address), \
(udp_hdr->dst_port), \
(udp_hdr->src_port), \
- &hicnb0->is_appface); \
+ &hicnb0->flags); \
\
if ( PREDICT_FALSE(ret != HICN_ERROR_NONE) ) \
{ \
@@ -233,7 +233,7 @@ typedef enum
&(ip_hdr0->src_address), \
(udp_hdr0->dst_port), \
(udp_hdr0->src_port), \
- &hicnb0->is_appface); \
+ &hicnb0->flags); \
\
ret1 = HICN_DPO_UDP_LOCK_IP##ipv \
(&(hicnb1->face_dpo_id), \
@@ -241,7 +241,7 @@ typedef enum
&(ip_hdr1->src_address), \
(udp_hdr1->dst_port), \
(udp_hdr1->src_port), \
- &hicnb1->is_appface); \
+ &hicnb1->flags); \
\
if ( PREDICT_FALSE(ret0 != HICN_ERROR_NONE) ) \
{ \
diff --git a/hicn-plugin/src/faces/udp/iface_udp_node.c b/hicn-plugin/src/faces/udp/iface_udp_node.c
index ddea31b4c..1f6dbd4ab 100755
--- a/hicn-plugin/src/faces/udp/iface_udp_node.c
+++ b/hicn-plugin/src/faces/udp/iface_udp_node.c
@@ -183,7 +183,7 @@ typedef enum
udp_hdr->src_port, \
GET_FACE_UDP##ipv \
(), \
- &hicnb0->is_appface); \
+ &hicnb0->flags); \
\
vlib_buffer_advance(b0, sizeof(IP_HEADER_##ipv) + \
sizeof(udp_header_t)); \
@@ -270,7 +270,7 @@ typedef enum
udp_hdr0->src_port, \
GET_FACE_UDP##ipv \
(), \
- &hicnb0->is_appface); \
+ &hicnb0->flags); \
\
\
HICN_IFACE_UDP_ADD_LOCK_IP##ipv \
@@ -281,7 +281,7 @@ typedef enum
udp_hdr1->src_port, \
GET_FACE_UDP##ipv \
(), \
- &hicnb1->is_appface); \
+ &hicnb1->flags); \
\
vlib_buffer_advance(b0, sizeof(IP_HEADER_##ipv) + \
sizeof(udp_header_t)); \