introduce kni isolate rx queue support#695
Conversation
5f36834 to
a9fcd98
Compare
a2c49fe to
e5b6d6d
Compare
|
请问一下:
|
|
说的是vip如果是kni ip?kni的流量会优先分流,业务流量走rss flow |
|
这个patch对dpdk版本有要求吗 需要至少哪个版本? dpdk 17.11版本对rte_flow支持的不太好 |
只要是能支持配置的rss queue region的 rte_flow就行,我们这都是18.11.2,17.11确实没试过 |
05d61dc to
4c8dc61
Compare
4c8dc61 to
fbf9245
Compare
|
1.add lock to protect the safty of netdev flow api. |
| ! } | ||
| } | ||
|
|
||
| <init> device bond0 { |
There was a problem hiding this comment.
Is rx_queue_id needed to config in kni worker type?
| * 1. local ip filter will make input set fixed on ixgbe/i40e. | ||
| * 2. dip filter is not supported by ixgbe and i40e under the | ||
| * premise of local ip filter. | ||
| * 3. use dip + dport + dst_port_mask filters to cover port range | ||
| * [0-65535] to replace dip filter on ixgbe/i40e. | ||
| * 4. kni fdir filter support tcp and udp, icmp not supported. | ||
| * 5. if (fdir_conf.mask.dst_port_mask & pkt.dport) equal to an | ||
| * element in the port_base_array, pkt will match kni fdir | ||
| * filter and redirected to kni rx queue. |
There was a problem hiding this comment.
Is there a solution to support both tcp/udp and IP protocols? Somebody may prefer OSPF (IP protocol 89) to BGP(TCP) for ECMP routes.
There was a problem hiding this comment.
flow支持ip粒度或者tcp/udp的,这里的注释是解释的ixgbe/i40e,intel卡有input set,一种filter/flow会固定input set,其他input set的filter/flow可能就不生效。
| && (dev->kni.rx_queue_id != NETIF_QUEUE_ID_INVALID)) | ||
| { |
There was a problem hiding this comment.
&& (dev->kni.rx_queue_id != NETIF_QUEUE_ID_INVALID)) {
| addr.in.s_addr = kni_ip->in.s_addr; | ||
| RTE_LOG(INFO, Kni, "[%s] success to add kni fdir ipv4 filter " | ||
| "on port: %s for kni_ip: %s\n", | ||
| __func__, dev->name, | ||
| inet_ntop(AF_INET, &addr, dst, sizeof(dst)) ? dst: ""); |
There was a problem hiding this comment.
addr.in.s_addr = kni_ip->in.s_addr isn't needed.
| int kni_addr_cnt; | ||
| struct kni_addr kni_ip[NETIF_KNI_ADDR_MAX_NUM]; /* ipv4 or ipv6 */ | ||
|
|
There was a problem hiding this comment.
Could it be better to add flows with the command tool dpip? For example dpip flow add ... dev ....
| && dev->type == PORT_TYPE_GENERAL) { | ||
| return true; |
There was a problem hiding this comment.
Doesn't it support bonding devices?
There was a problem hiding this comment.
也可以支持,需要在所有slave上下flow,内部没有用bond,所以做了判断;考虑bond,这里可能需要适配下
| if (fwd_mode == KNI_FWD_MODE_ISOLATE_RX) { | ||
| nb_rb = rte_eth_rx_burst(dev->id, dev->kni.rx_queue_id, | ||
| mbufs, NETIF_MAX_PKT_BURST); | ||
| } else { | ||
| nb_rb = rte_ring_dequeue_burst(dev->kni.rx_ring, (void**)mbufs, | ||
| NETIF_MAX_PKT_BURST, NULL); | ||
| } |
There was a problem hiding this comment.
Some packets are sent to kni from dpvs's protocol stack. I don't think the flow based kni rx can handle all these packets.
| case NETDEV_FLOW_TYPE_RSS: | ||
| /* setup rss queues info */ | ||
| netdev_flow_add_ingress_attribute(netdev_flow, &attr); | ||
| netdev_flow_add_rss_patterns(netdev_flow, patts); | ||
| netdev_flow_add_rss_actions(port_id, netdev_flow, acts); | ||
| break; |
There was a problem hiding this comment.
Does ixgbe devices support rss flow type? How does its performance compared to the global RSS?
There was a problem hiding this comment.
ixgbe支持rss flow,测试看性能没有明显区别;ixgbe上用ip粒度的rte flow,可能会不生效,因为ip + port粒度的local ip filter会让ixgbe input set固定,ixgbe上想实现kni 独立接收,可能用port range的方式覆盖所有端口比较合适。
introduce kni isolate rx queue support: