lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <46806cc6-4008-467e-8ebf-cb70d1b8118c@habana.ai>
Date: Tue, 18 Jun 2024 19:39:12 +0000
From: Omer Shpigelman <oshpigelman@...ana.ai>
To: Stephen Hemminger <stephen@...workplumber.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        "ogabbay@...nel.org" <ogabbay@...nel.org>,
        Zvika Yehudai <zyehudai@...ana.ai>
Subject: Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

On 6/15/24 03:16, Stephen Hemminger wrote:
> [You don't often get email from stephen@...workplumber.org. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
> 
>> +
>> +/* get the src IP as it is done in devinet_ioctl() */
>> +static int hbl_en_get_src_ip(struct hbl_aux_dev *aux_dev, u32 port_idx, u32 *src_ip)
>> +{
>> +     struct hbl_en_port *port = HBL_EN_PORT(aux_dev, port_idx);
>> +     struct net_device *ndev = port->ndev;
>> +     struct in_device *in_dev;
>> +     struct in_ifaddr *ifa;
>> +     int rc = 0;
>> +
>> +     /* for the case where no src IP is configured */
>> +     *src_ip = 0;
>> +
>> +     /* rtnl lock should be acquired in relevant flows before taking configuration lock */
>> +     if (!rtnl_is_locked()) {
>> +             netdev_err(port->ndev, "Rtnl lock is not acquired, can't proceed\n");
>> +             rc = -EFAULT;
>> +             goto out;
>> +     }
>> +
>> +     in_dev = __in_dev_get_rtnl(ndev);
>> +     if (!in_dev) {
>> +             netdev_err(port->ndev, "Failed to get IPv4 struct\n");
>> +             rc = -EFAULT;
>> +             goto out;
>> +     }
>> +
>> +     ifa = rtnl_dereference(in_dev->ifa_list);
>> +
>> +     while (ifa) {
>> +             if (!strcmp(ndev->name, ifa->ifa_label)) {
>> +                     /* convert the BE to native and later on it will be
>> +                      * written to the HW as LE in QPC_SET
>> +                      */
>> +                     *src_ip = be32_to_cpu(ifa->ifa_local);
>> +                     break;
>> +             }
>> +             ifa = rtnl_dereference(ifa->ifa_next);
>> +     }
>> +out:
>> +     return rc;
>> +}
> 
> Does this device require IPv4? What about users and infrastructures that use IPv6 only?
> IPv4 is legacy at this point.

Gaudi2 supports IPv4 only.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ