Sd_bus_call - ELOOP Issue

Kumar Thangavel kumarthangavel.hcl at gmail.com
Sat May 30 01:59:48 AEST 2020


Hi All,

        We are handing the ipmi commands (Bridge IC request) in the ipmi
module.

        Please find below the gerrit links for the Design and Sample code
implementation of BIC request handling in the ipmi.

        Design :
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-host-ipmid/+/32213
        Sample code implementation :
https://gerrit.openbmc-project.xyz/c/openbmc/fb-ipmi-oem/+/32215

        So, This is regarding the ipmi implementation issue as per the new
design of handling BIC request.

      1. We are handling the command "0x38 0 1 6 0x15 0xa0 0 0 6 1 0"
Netfn = 0x38, cmd =1 is from Bridge IC in the ipmi module. In the ipmid, we
are making new callback(ipmiOemBicHandler) to handle this BIC request.

       2. The Netfn= 0x38 and cmd=1 is verified, we are getting the
commands from the BIC, the same is received at ipmb and ipmid also. The
register call back is also  called. When we fill up the response from the
ipmiOemBicHandler works fine. The response is received at the BIC as well.

       3. But as per the new design, we need to call ipmid command handler
recursively. When we get the Netfn= 0x38 and cmd=1 command in
ipmiOemBicHandler, the handler needs to open the packet and there will be
an another command (for ex Netfn=6 and cmd=1 get_dev_id). ipmiOemBicHandler
needs to send this command

       4. In  ipmiOemBicHandler callback function we are using synchronous
method to create connection, using this connection we are calling "execute"
ipmid dbus method from the ipmid deamon.

       5.  While calling "execute" method, internally it calls sd_bus_call
function. Sd_bus_call returns ELOOP exception due to sender and receiver
         process are same.

       6. As per our understanding, current  sd_bus_call not supported for
connection with the same bus/clients. (sender  and receiver are same
           application name ). Please confirm.

            Log :
            yosemitev2 ipmid[370]: sd_bus_call function called..
            yosemitev2 ipmid[370]: sd_bus_call function ELOOP .
            yosemitev2 ipmid[370]:  unique name = :1.71
            yosemitev2 ipmid[370]:  incoming sender = :1.71
            yosemitev2 ipmid[370]: executeCallback called. catch block
            yosemitev2 ipmid[370]: EXCEPTION=sd_bus_call:
System.Error.ELOOP: Too many levels of symbolic links

       So,  Could you please confirm sd_bus_call does not support the same
bus/clients with in the same process.

       Also, Please let us know if any alternate method to  call the
execute dbus method with the same bus/connection.

Thanks,
Kumar.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20200529/b339f776/attachment.htm>


More information about the openbmc mailing list