Skip to content

Commit

Permalink
delete part of init codes to fix this syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
Iolop committed Dec 26, 2023
1 parent b6302a6 commit 693b6b0
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
indent_size = 4
trim_trailing_whitespace = true
# Unix-style newlines with a newline ending every file
end_of_line = lf
6 changes: 1 addition & 5 deletions _posts/2023-12-25-dpdk-初学-17-vmdq-forward.md
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@ port_init(portid, mbuf_pool);
```
由于每一个网卡的配置可能有所不同,所以这里给出了一个默认配置,具体的选项得自己配置,从`rte_eth_dev_info_get`获取后来设置相应的结构体。
下面的结构体在初始化`.vmdq_rx_conf`的时候,被删除了`.pool`的初始化,因为这将导致Liquid解析失败,离了谱。
```c
static const struct rte_eth_conf vmdq_conf_default = {
@@ -28,16 +29,11 @@ static const struct rte_eth_conf vmdq_conf_default = {
.mq_mode = RTE_ETH_MQ_TX_NONE,
},
.rx_adv_conf = {
/*
* should be overridden separately in code with
* appropriate values
*/
.vmdq_rx_conf = {
.nb_queue_pools = RTE_ETH_8_POOLS,
.enable_default_pool = 0,
.default_pool = 0,
.nb_pool_maps = 0,
.pool_map = {{0, 0}},/*can't use {0,0}, the second comma will cause error in Liquid!*/
},
},
};

0 comments on commit 693b6b0

Please sign in to comment.