Linux内核支持ARP卸载

发布于 2025-02-14 00:46:37 字数 337 浏览 0 评论 0 原文

我正在尝试在Linux上启用DW XGMAC功能。 MAC支持ARP卸载功能,该功能基本上生成ARP回复数据包。我可以看到一个函数()在xgmac驱动程序中启用此功能。但是我无法找到调用此功能的方法。 Ethtool实用程序不支持ARP的卸载。 Linux内核是否支持这一点,如果是这样,如何启用它?

I'm trying to enable DW XGMAC features on Linux. The MAC supports ARP offloading feature, which basically generates ARP reply packets. I can see a function(dwxgmac2_set_arp_offload) in the XGMAC driver to enable this feature. But I couldn't able to find a way to invoke this function.
ethtool utility is not supporting offloading of ARP. Does the Linux kernel support that, and if so, how can it be enabled?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

静谧 2025-02-21 00:46:37

目前无法从用户空间访问它。某些网络功能可能取决于注意到ARP请求。 自我测试演示了内核模块(或补丁)可用于实现用户空间激活。

static int stmmac_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
        struct stmmac_priv *priv = netdev_priv (dev);
        int ret = -EOPNOTSUPP;


        switch (cmd) {
        case SIOCGMIIPHY:
        /* ... */
        case SIOARPBYPASS:
          u32 ip = rq->sock_addr...;
          ret = stmmac_set_arp_offload(priv, priv->hw, ip ? true: false, ip);
          break;

您需要使SioarpBypass定义并传递IP地址以响应。如果节点响应多个地址,例如IPv6,则不会卸载。它仍然适用于该特定地址。

It is not currently accessible from user space. Some network features may depend on ARP requests being noted. The selftest demonstrates how a kernel module (or patch) could be used to implement user space activation.

static int stmmac_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
        struct stmmac_priv *priv = netdev_priv (dev);
        int ret = -EOPNOTSUPP;


        switch (cmd) {
        case SIOCGMIIPHY:
        /* ... */
        case SIOARPBYPASS:
          u32 ip = rq->sock_addr...;
          ret = stmmac_set_arp_offload(priv, priv->hw, ip ? true: false, ip);
          break;

You need to make the SIOARPBYPASS define and pass an IP address to respond to. It won't offload if the node responds to multiple addresses, such as IPv6. It still work for that particular address.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文