diff options
author | Xavier Simonart <xavier.simonart@intel.com> | 2019-06-24 17:01:54 +0200 |
---|---|---|
committer | Xavier Simonart <xavier.simonart@intel.com> | 2019-10-09 19:09:34 +0200 |
commit | 48f8c3d212644a33dd0abaaa1a0c71d4decaafdf (patch) | |
tree | 515043d3dc43025bb5ce5e6cb842afd68ae891e9 /VNFs/DPPD-PROX/prox_port_cfg.c | |
parent | 4cc4dabe80eb7d19c20920b7ec20899d6a76a1dd (diff) |
Add support for igmp and multicast
Multicast can be enabled through configuration or through command line
- Through configuration
Add multicast=mcast_address (e.g. multicast=01:00:5e:01:02:03) in the port
section
- Through command line
run enable multicast port_id mcast_address (e.g. enable multicast 1 01:00:5e:01:02:03)
IGMP join message is sent unsollicited through command line:
join igmp core_id task_id ip (e.g. join igmp 1 0 224.1.1.3)
To enable swap answering IGMP Query (w/ IGMP Join)
- Through configuration
Add igmp ipv4=ip_address within the core/task section
- Through command line
join igmp core_id task_id ip (e.g. join igmp 1 0 224.1.1.3)
(this will 1st initiate an unsollicated join, then answer any subsequent query)
UDP/TCP packets received on a multicast address (224.0.0.0 => 239.255.255.255) are discarded
To stop sending responses to IGMP query:
leave igmp core_id task_id
Change-Id: I3808ccabf3b38b5a1e10e1b044db63aa05bcd7b5
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/prox_port_cfg.c')
-rw-r--r-- | VNFs/DPPD-PROX/prox_port_cfg.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/VNFs/DPPD-PROX/prox_port_cfg.c b/VNFs/DPPD-PROX/prox_port_cfg.c index c335ee10..ac0ba0f3 100644 --- a/VNFs/DPPD-PROX/prox_port_cfg.c +++ b/VNFs/DPPD-PROX/prox_port_cfg.c @@ -41,6 +41,7 @@ #include "prox_cksum.h" #include "stats_irq.h" #include "prox_compat.h" +#include "rte_ethdev.h" struct prox_port_cfg prox_port_cfg[PROX_MAX_PORTS]; rte_atomic32_t lsc; @@ -518,7 +519,7 @@ static void init_port(struct prox_port_cfg *port_cfg) #if RTE_VERSION >= RTE_VERSION_NUM(2,0,0,0) port_cfg->port_conf.rx_adv_conf.rss_conf.rss_hf &= port_cfg->dev_info.flow_type_rss_offloads; #endif - plog_info("\t\t Enabling RSS rss_hf = 0x%lx (requested 0x%llx)\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_hf, ETH_RSS_IP|ETH_RSS_UDP); + plog_info("\t\t Enabling RSS rss_hf = 0x%lx (requested 0x%llx, supported 0x%lx)\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_hf, ETH_RSS_IP|ETH_RSS_UDP, port_cfg->dev_info.flow_type_rss_offloads); // rxmode such as hw src strip #if RTE_VERSION >= RTE_VERSION_NUM(18,8,0,1) @@ -689,6 +690,18 @@ static void init_port(struct prox_port_cfg *port_cfg) } } } + if (port_cfg->nb_mc_addr) { + rte_eth_allmulticast_enable(port_id); + if ((ret = rte_eth_dev_set_mc_addr_list(port_id, port_cfg->mc_addr, port_cfg->nb_mc_addr)) != 0) { + plog_err("\t\trte_eth_dev_set_mc_addr_list returns %d on port %u\n", ret, port_id); + port_cfg->nb_mc_addr = 0; + rte_eth_allmulticast_disable(port_id); + plog_info("\t\tport %u NOT in multicast mode as failed to add mcast address\n", port_id); + } else { + plog_info("\t\trte_eth_dev_set_mc_addr_list(%d addr) on port %u\n", port_cfg->nb_mc_addr, port_id); + plog_info("\t\tport %u in multicast mode\n", port_id); + } + } } void init_port_all(void) |