freeipmi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Freeipmi-devel] fiid release


From: Albert Chu
Subject: Re: [Freeipmi-devel] fiid release
Date: Fri, 19 Dec 2003 11:16:54 -0800

Hey AB,

Just a few thoughts/questions based on my initial skim.  I haven't
looked at it super-thoroughly yet ... 

1) Given the new framework, I think passing in  u_int8_t ** pointers
   and having the function return a buffer may be better than having
   the user create the u_int8_t * buffer.  I prefer the later,  but
   given your framework style, I think the former fits better.  I
   dunno, maybe we should wait until later to decide, no need to
   decide now.

2) Where are the kcs_hdr_t and get_dev_id_t structures?  Or have you
   just not added the code for converting between fiid and
   structures?? I noticed a lack of freeming memory too ... but I
   guess you're just ignoring that stuff right now.

Overall I think the code is good and I like the framework.  There are
some API things I think we can cleanup, but they are minor.  Like:

    cmd_len = fiid_obj_len (fiid_cmd_get_dev_id_rq);
    hdr_len = fiid_obj_len (fiid_kcs_hdr);
    pkt_len = hdr_len + cmd_len;
    hdr = fiid_obj_alloc (fiid_kcs_hdr);
    cmd = fiid_obj_alloc (fiid_cmd_get_dev_id_rq);
    pkt = alloca (BITS_ROUND_BYTES (pkt_len));

But I think we hide this from the user easily later on. 

I think the overal goal is to still have something like:

kcs_hdr_t hdr;
ipmi_get_dev_id_t dev;
u_int8_t **pkt;

ipmi_kcs_rq_hdr (IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, &hdr);
ipmi_get_dev_id_rq (&cmd);
pkt_len = assemble_kcs_packet (&hdr, &dev, IPMI_GET_DEV_ID_KEY, pkt);
    // or user creates buffer instead of passing in u_int8_t **      
ipmi_kcs_write(pkt, pkt_len);

and all of the fiid stuff is hidden within those functions.

Al


--
Albert Chu
address@hidden
Lawrence Livermore National Laboratory

----- Original Message -----
From: Anand Babu <address@hidden>
Date: Friday, December 19, 2003 10:29 am
Subject: [Freeipmi-devel] fiid release

> Hi Al,
> Please download 
> ftp://ftp.cdclinux.com/pub/ipmi/libfreeipmi-0.0.0-fiid.tar.gz
> ftp://ftp.cdclinux.com/pub/ipmi/freeipmi-utils-fiid.tgz
> 
> Surprisingly fiid model is easier than struct model but is built on
> top of byte-array. No more messing with bits stuff. Its all easy now.
> 
> Go through
> libfreeipmi:
> ipmi-kcs-interface.{c,h}, fiid.{c,h}, bit-ops.{c,h},
> ipmi-dev-global-cmds.{c,h}
> 
> freeipmi-utils:
> bmc-info.c
> 
> Later today, I will release complete freeipmi-utils tools including
> DHCP option. SR870BN4 supports DHCP as an OEM option.
> 
> Ian, you need some info which is not in the IPMI spec to implement
> bmc-config commands. I know those values. I will take care.
> 
> Happy Hacking
> -- 
> _.|_ 
> (_||_)
> Free as in Freedom <www.gnu.org>
> 
> 
> _______________________________________________
> Freeipmi-devel mailing list
> address@hidden
> http://mail.nongnu.org/mailman/listinfo/freeipmi-devel
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]