XDE may not receive multicast frames from physical underlay

未关闭
#908 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
rust
领域
networking

调研方向

从 XDE 的 DlsStream 和 MacSiphon 处理开始,然后跟踪 issue 中描述的 t4_mc_multicst 和 t4_set_rxmode 入口点。比较四种组播接收方案,包括 cxgbe 的过滤器上限以及 FW_VI_RXMODE_CMD 的 allmultien 选项。完成标准是:来自物理 underlay 的组播帧能够在不超过可用过滤器容量的情况下,可靠地到达 T6 硬件上预期的 XDE 流。

由索引模型根据 Issue 内容生成。

描述

Reading up on mc_multicst when reviewing #905 led me to look into t4_mc_multicst and toy around receipt of multicast frames on T6 hardware[^1]. Packets with arbitrary multicast MACs will not be handed from the NIC to the OS (and thus will not appear on any ring) unless the NIC is programmed with a corresponding multicast MAC filter by illumos. I ended up testing this out by having one half of sn9/sn14 transmit exclusively to a multicast destination MAC, and then turning snoop -d cxgbe1 on/off on the receiving side to shunt the NIC into/out of promiscuous mode. Simnets will typically ignore these limitations.

We need to do a little more work to ensure that packets are received at XDE, by one of the following:

  1. Have XDE call mac_multicast_add/mac_multicast_remove on the underlay devices according to each group's derived multicast addresses. Each multicast address on the client has a flow_entry_t created. However, it appears the cxgbe driver is unable to handle more than 336 entries on a given interface today.
  2. Have sled-agent open a socket for each underlay multicast group address of interest, via UdpSocket::join_multicast_v6. This ultimately results in the same calls being made to plumb multicast filters, and we expect that the socket should receive no packets due to XDE's siphon/flow hook structure. This will run into the same limitation as 1.
  3. Put the device into promiscuous mode. Since we control the upstream network we're not at risk of receiving additional unicast traffic (and paying a cost for doing so), but the main killer would be that this must be done by registering a callback on a client, for which illumos will duplicate all traffic.
  4. Configure the T6 to receive all multicast traffic via the t4_set_rxmode method (the allmultien bitfield of the FW_VI_RXMODE_CMD T6 firmware command). This avoids the filter table size limit, but there's not really a sane interface for configuring this today, but then we lose hardware filtering by multicast address.

@zeeshanlakhani I think 1. is probably the most reasonable approach, since we can pull the MAC client handle from either the DlsStream or MacSiphon. That may not be doable if we change things to send and receive on the MAC flow directly, but we can probably expose a client function to pull out the mac_client_handle_t. What do you think?

[^1]: My main motivation was in making sure that OPTE-bound packets would still transit from the ring to one OPTE's flows if it were to arrive on a multicast destination MAC in an IPD45 setting. This seems to be the case, but only if multicast packets arrive on the ring at all (i.e., via promisc mode).

主要语言
Rust
星标
82
派生
16
平均合并
3 天 6 小时
30 天内合并 PR
11

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

oxidecomputer/opte 的其他 Issue

查看 oxidecomputer/opte 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。