summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/main.c
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2017-12-17 16:46:52 +0100
committerXavier Simonart <xavier.simonart@intel.com>2017-12-18 18:55:34 +0100
commit3fc7bd53eda521cfd428759481964db30883d99f (patch)
tree026f3b9eb09e1767121961f9bcfb7e8b37b4dea4 /VNFs/DPPD-PROX/main.c
parent65504ce40edc1a2f5ad154ed7935d93a3650e5b7 (diff)
Add l3 support for tasks without physical tx ports
This adds support for tasks in l3 submode receiving from ports but transmitting to rings. ARP related information is exchanged between tasks through master core. Tasks transmitting to physical ports are responsible to transmit arp related packets. Tasks not transmitting to physical ports (and using rings) should not try to transmit arp packets. Transmitting arp packets through ring would be more complex, as we would need extra information (within the mbuf) to distinguish for instance an arp reply comoing from the network and an arp reply coming from a core (as a reply to an arp request). Change-Id: Ib55dc8c39d5e55703a933faa16bcc008f1274929 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/main.c')
-rw-r--r--VNFs/DPPD-PROX/main.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/VNFs/DPPD-PROX/main.c b/VNFs/DPPD-PROX/main.c
index 2c362d6c..2c8517f0 100644
--- a/VNFs/DPPD-PROX/main.c
+++ b/VNFs/DPPD-PROX/main.c
@@ -148,6 +148,7 @@ static void check_missing_rx(void)
if (strcmp(targ->sub_mode_str, "l3") != 0)
continue;
+ PROX_PANIC((targ->nb_rxports == 0) && (targ->nb_txports == 0), "L3 task must have a RX or a TX port\n");
// If the L3 sub_mode receives from a port, check that there is at least one core/task
// transmitting to this port in L3 sub_mode
for (uint8_t i = 0; i < targ->nb_rxports; ++i) {
@@ -155,10 +156,8 @@ static void check_missing_rx(void)
ok = 0;
tx_lconf = NULL;
while (core_targ_next(&tx_lconf, &tx_targ, 0) == 0) {
- port = find_reachable_port(tx_targ);
- if (port == NULL)
+ if ((port_id = tx_targ->tx_port_queue[0].port) == OUT_DISCARD)
continue;
- port_id = port - prox_port_cfg;
if ((rx_port_id == port_id) && (tx_targ->flags & TASK_ARG_L3)){
ok = 1;
break;
@@ -169,10 +168,8 @@ static void check_missing_rx(void)
// If the L3 sub_mode transmits to a port, check that there is at least one core/task
// receiving from that port in L3 sub_mode.
- port = find_reachable_port(targ);
- if (port == NULL)
+ if ((port_id = targ->tx_port_queue[0].port) == OUT_DISCARD)
continue;
- port_id = port - prox_port_cfg;
rx_lconf = NULL;
ok = 0;
plog_info("\tCore %d task %d transmitting to port %d in L3 mode\n", lconf->id, targ->id, port_id);