If you really meant what you wrote: use the device-driver feature arc, and 
divert every RX packet [on all interfaces] to your graph that way. The sample 
(macswap) plugin shows how to do that. Here are the basic incantations:

/**
 * @brief Hook the sample plugin into the VPP graph hierarchy.
 */
VNET_FEATURE_INIT (sample, static) = 
{
  .arc_name = "device-input",
  .node_name = "sample",
  .runs_before = VNET_FEATURES ("ethernet-input"),
}; 

/**
 * @brief Enable/disable the macswap plugin. 
 *
 * Action function shared between message handler and debug CLI.
 */

int sample_macswap_enable_disable (sample_main_t * sm, u32 sw_if_index,
                                   int enable_disable)
{
  vnet_sw_interface_t * sw;
  int rv = 0;

  /* Utterly wrong? */
  if (pool_is_free_index (sm->vnet_main->interface_main.sw_interfaces, 
                          sw_if_index))
    return VNET_API_ERROR_INVALID_SW_IF_INDEX;

  /* Not a physical port? */
  sw = vnet_get_sw_interface (sm->vnet_main, sw_if_index);
  if (sw->type != VNET_SW_INTERFACE_TYPE_HARDWARE)
    return VNET_API_ERROR_INVALID_SW_IF_INDEX;

  vnet_feature_enable_disable ("device-input", "sample",
                               sw_if_index, enable_disable, 0, 0);

  return rv;
}

At least to begin with, there's no need to remove the standard data plane graph 
nodes.

HTH... Dave 

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Kallol Banerjee
Sent: Friday, April 27, 2018 8:33 PM
To: [email protected]
Subject: [vpp-dev] A custom node graph on VPP

Hi,

We are starting a project where team has decided to use VPP as the choice for 
the fast data path. But our requirement is quite different and we would like to 
build a complete custom node graph.

Please suggest if there is a document or example that we can start looking at 
how to do it. Also do we have to modify the Makefiles to not build and link 
with the base vnet node graphs.

Thanks,
Kallol



-=-=-=-=-=-=-=-=-=-=-=-
Links:

You receive all messages sent to this group.

View/Reply Online (#9103): https://lists.fd.io/g/vpp-dev/message/9103
View All Messages In Topic (2): https://lists.fd.io/g/vpp-dev/topic/18107988
Mute This Topic: https://lists.fd.io/mt/18107988/21656
New Topic: https://lists.fd.io/g/vpp-dev/post

Change Your Subscription: https://lists.fd.io/g/vpp-dev/editsub/21656
Group Home: https://lists.fd.io/g/vpp-dev
Contact Group Owner: [email protected]
Terms of Service: https://lists.fd.io/static/tos
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to