diff options
| author | Lu Qiuwen <[email protected]> | 2021-06-25 14:02:41 +0800 |
|---|---|---|
| committer | Lu Qiuwen <[email protected]> | 2021-06-25 14:02:41 +0800 |
| commit | cea4bb9d1fb42dada398d51949e4913284ae75e3 (patch) | |
| tree | f1979b04c9b31a89d71c86cd278c1b34047f0df4 | |
| parent | cebe25a498088ac8de8de9664e700072de1aed5c (diff) | |
增加allmulticast选项的配置,适配DPDK-20.11后的fm10k PMD驱动。v4.4.7-20210628v4.4.6-20210625
| -rw-r--r-- | service/include/sc_phydev.h | 1 | ||||
| -rw-r--r-- | service/src/phydev.c | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/service/include/sc_phydev.h b/service/include/sc_phydev.h index c479451..d51e23a 100644 --- a/service/include/sc_phydev.h +++ b/service/include/sc_phydev.h @@ -208,6 +208,7 @@ struct phydev /* 选项 */ unsigned int promisc; + unsigned int allmulticast; unsigned int en_vlan_strip; unsigned int en_vlan_filter; unsigned int en_drop; diff --git a/service/src/phydev.c b/service/src/phydev.c index c328efa..fb8e27e 100644 --- a/service/src/phydev.c +++ b/service/src/phydev.c @@ -297,6 +297,10 @@ static int phydev_setup(struct sc_main * sc, MR_WARNING("Physical device %s MTU setup failed : %s", dev->symbol, strerror(-retval)); } + /* Multicast */ + if (dev->allmulticast) rte_eth_allmulticast_enable(dev->port_id); + else rte_eth_allmulticast_disable(dev->port_id); + /* 混杂模式设置 */ if (dev->promisc) rte_eth_promiscuous_enable(dev->port_id); else rte_eth_promiscuous_disable(dev->port_id); @@ -576,6 +580,8 @@ void phydev_config_by_g_cfg(struct phydev * phydev, const char * cfg) MESA_load_profile_short_def(cfg, str_section, "mtu", (short *) &phydev->mtu, (short) phydev->mtu); // 读混杂模式 MESA_load_profile_uint_def(cfg, str_section, "promisc", &phydev->promisc, phydev->promisc); + // MULTICAST + MESA_load_profile_uint_def(cfg, str_section, "allmulticast", &phydev->allmulticast, 0); // 读报文缓冲区名称 memset(phydev->str_direct_pool, 0, sizeof(phydev->str_direct_pool)); |
