Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
fib: constify the adjacency in the rewrite nodes
[vpp.git]
/
src
/
plugins
/
pppoe
/
pppoe.c
diff --git
a/src/plugins/pppoe/pppoe.c
b/src/plugins/pppoe/pppoe.c
index
823fa1c
..
2d63b3e
100644
(file)
--- a/
src/plugins/pppoe/pppoe.c
+++ b/
src/plugins/pppoe/pppoe.c
@@
-65,14
+65,6
@@
format_pppoe_name (u8 * s, va_list * args)
return format (s, "pppoe_session%d", dev_instance);
}
return format (s, "pppoe_session%d", dev_instance);
}
-static uword
-dummy_interface_tx (vlib_main_t * vm,
- vlib_node_runtime_t * node, vlib_frame_t * frame)
-{
- clib_warning ("you shouldn't be here, leaking buffers...");
- return frame->n_vectors;
-}
-
static clib_error_t *
pppoe_interface_admin_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags)
{
static clib_error_t *
pppoe_interface_admin_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags)
{
@@
-85,9
+77,8
@@
pppoe_interface_admin_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags)
/* *INDENT-OFF* */
VNET_DEVICE_CLASS (pppoe_device_class,static) = {
/* *INDENT-OFF* */
VNET_DEVICE_CLASS (pppoe_device_class,static) = {
- .name = "PPP
PO
E",
+ .name = "PPP
o
E",
.format_device_name = format_pppoe_name,
.format_device_name = format_pppoe_name,
- .tx_function = dummy_interface_tx,
.admin_up_down_function = pppoe_interface_admin_up_down,
};
/* *INDENT-ON* */
.admin_up_down_function = pppoe_interface_admin_up_down,
};
/* *INDENT-ON* */
@@
-147,7
+138,7
@@
pppoe_build_rewrite (vnet_main_t * vnm,
*/
static void
pppoe_fixup (vlib_main_t * vm,
*/
static void
pppoe_fixup (vlib_main_t * vm,
- ip_adjacency_t * adj, vlib_buffer_t * b0, const void *data)
+
const
ip_adjacency_t * adj, vlib_buffer_t * b0, const void *data)
{
const pppoe_session_t *t;
pppoe_header_t *pppoe0;
{
const pppoe_session_t *t;
pppoe_header_t *pppoe0;
@@
-228,7
+219,7
@@
pppoe_update_adj (vnet_main_t * vnm, u32 sw_if_index, adj_index_t ai)
/* *INDENT-OFF* */
VNET_HW_INTERFACE_CLASS (pppoe_hw_class) =
{
/* *INDENT-OFF* */
VNET_HW_INTERFACE_CLASS (pppoe_hw_class) =
{
- .name = "PPP
PO
E",
+ .name = "PPP
o
E",
.format_header = format_pppoe_header_with_length,
.build_rewrite = pppoe_build_rewrite,
.update_adjacency = pppoe_update_adj,
.format_header = format_pppoe_header_with_length,
.build_rewrite = pppoe_build_rewrite,
.update_adjacency = pppoe_update_adj,
@@
-273,7
+264,7
@@
int vnet_pppoe_add_del_session
cached_key.raw = ~0;
cached_result.raw = ~0; /* warning be gone */
cached_key.raw = ~0;
cached_result.raw = ~0; /* warning be gone */
- memset (&pfx, 0, sizeof (pfx));
+
clib_
memset (&pfx, 0, sizeof (pfx));
if (!is_ip6)
{
if (!is_ip6)
{
@@
-320,7
+311,7
@@
int vnet_pppoe_add_del_session
return VNET_API_ERROR_INVALID_DECAP_NEXT;
pool_get_aligned (pem->sessions, t, CLIB_CACHE_LINE_BYTES);
return VNET_API_ERROR_INVALID_DECAP_NEXT;
pool_get_aligned (pem->sessions, t, CLIB_CACHE_LINE_BYTES);
- memset (t, 0, sizeof (*t));
+
clib_
memset (t, 0, sizeof (*t));
clib_memcpy (t->local_mac, hi->hw_address, 6);
clib_memcpy (t->local_mac, hi->hw_address, 6);
@@
-455,7
+446,7
@@
pppoe_add_del_session_command_fn (vlib_main_t * vm,
clib_error_t *error = NULL;
/* Cant "universally zero init" (={0}) due to GCC bug 53119 */
clib_error_t *error = NULL;
/* Cant "universally zero init" (={0}) due to GCC bug 53119 */
- memset (&client_ip, 0, sizeof client_ip);
+
clib_
memset (&client_ip, 0, sizeof client_ip);
/* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
/* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
@@
-527,7
+518,7
@@
pppoe_add_del_session_command_fn (vlib_main_t * vm,
goto done;
}
goto done;
}
- memset (a, 0, sizeof (*a));
+
clib_
memset (a, 0, sizeof (*a));
a->is_add = is_add;
a->is_ip6 = ipv6_set;
a->is_add = is_add;
a->is_ip6 = ipv6_set;
@@
-569,13
+560,13
@@
done:
}
/*?
}
/*?
- * Add or delete a PPP
PO
E Session.
+ * Add or delete a PPP
o
E Session.
*
* @cliexpar
*
* @cliexpar
- * Example of how to create a PPP
PO
E Session:
+ * Example of how to create a PPP
o
E Session:
* @cliexcmd{create pppoe session client-ip 10.0.3.1 session-id 13
* client-mac 00:01:02:03:04:05 }
* @cliexcmd{create pppoe session client-ip 10.0.3.1 session-id 13
* client-mac 00:01:02:03:04:05 }
- * Example of how to delete a PPP
PO
E Session:
+ * Example of how to delete a PPP
o
E Session:
* @cliexcmd{create pppoe session client-ip 10.0.3.1 session-id 13
* client-mac 00:01:02:03:04:05 del }
?*/
* @cliexcmd{create pppoe session client-ip 10.0.3.1 session-id 13
* client-mac 00:01:02:03:04:05 del }
?*/
@@
-611,10
+602,10
@@
show_pppoe_session_command_fn (vlib_main_t * vm,
/* *INDENT-ON* */
/*?
/* *INDENT-ON* */
/*?
- * Display all the PPP
PO
E Session entries.
+ * Display all the PPP
o
E Session entries.
*
* @cliexpar
*
* @cliexpar
- * Example of how to display the PPP
PO
E Session entries:
+ * Example of how to display the PPP
o
E Session entries:
* @cliexstart{show pppoe session}
* [0] client-ip 10.0.3.1 session_id 13 encap-if-index 0 decap-vrf-id 13 sw_if_index 5
* local-mac a0:b0:c0:d0:e0:f0 client-mac 00:01:02:03:04:05
* @cliexstart{show pppoe session}
* [0] client-ip 10.0.3.1 session_id 13 encap-if-index 0 decap-vrf-id 13 sw_if_index 5
* local-mac a0:b0:c0:d0:e0:f0 client-mac 00:01:02:03:04:05
@@
-738,7
+729,7
@@
VLIB_INIT_FUNCTION (pppoe_init);
/* *INDENT-OFF* */
VLIB_PLUGIN_REGISTER () = {
.version = VPP_BUILD_VER,
/* *INDENT-OFF* */
VLIB_PLUGIN_REGISTER () = {
.version = VPP_BUILD_VER,
- .description = "PPP
oE
",
+ .description = "PPP
over Ethernet (PPPoE)
",
};
/* *INDENT-ON* */
};
/* *INDENT-ON* */