ipmitool / test

0 stars 0 forks source link

msg size problem while bridging write FRU commands #61

Open AlexanderAmelkin opened 8 years ago

AlexanderAmelkin commented 8 years ago

Reported by: Björn Spruck Original Ticket: ipmitool/bugs/406

Hi,

I finally tracked down another problem for editing/wrinting FRU data.

If I use: ./src/ipmitool -vv -I lanplus -H xxxxxxxxxxxxxx -U user -P user -b 0 -t 0x98 fru write 0 ~/carrier9.bin (output see below) It will write the first 8 bytes and then stop (Bug #1). Without Error Message (Bug #2). Please notice that the second write is 22 Bytes. if I limit the write size to 13 (or lower) it is working!

(ipmi_fru.c line 455ff) / initialize request size only once / if (fru->max_write_size == 0) { uint16_t max_rq_size = ipmi_intf_get_max_request_data_size(intf);

What seems to be wrong: ipmi_intf_get_max_request_data_size() returns 25; But 16 is the maximum value which works for me. Not checked how ipmi_intf_get_max_request_data_size get this number (for bridged commands).

Remark: If the supported maximum msg (or payload) size is not detected correctly, this might have impact in other ipmi functions, too.

Cheers,

 Bjoern

--- output --- (skipping most of the output)

Writing 8 bytes (Bloc #0: Common Header Section)

Sending IPMI command payload netfn : 0x0a command : 0x12 data : 0x00 0x00 0x00 0x01 0x00 0x00 0x01 0x06 0x0c 0x00 0xec

Bridging RqAddr 0x10 transit 0:0 target 0x98:0 bridgePossible 1 Bridged command answer, waiting for next answer... Wrote 8 bytes Writing 22 bytes (Bloc #1: Board Section)

Sending IPMI command payload netfn : 0x0a command : 0x12 data : 0x00 0x08 0x00 0x01 0x05 0x19 0x7d 0x94 0x9d 0xc9 0x55 0x6e 0x69 0x20 0x4d 0x61 0x69 0x6e 0x7a 0xcb 0x42 0x65 0x6c 0x6c 0x65

Bridging RqAddr 0x10 transit 0:0 target 0x98:0 bridgePossible 1

(then the msg is resent a few times)

Bridging RqAddr 0x10 transit 0:0 target 0x98:0 bridgePossible 1 Done

Sending IPMI command payload netfn : 0x06 command : 0x3c data : 0x09 0x00 0x00 0x00

Local RqAddr 0x10 transit 0:0 target 0x20:0 bridgePossible 0 Closed Session 00000009

AlexanderAmelkin commented 8 years ago

Hello Bjoern,

feel free to write a patch for this.

Best regards, Z.

Original comment by: Zdenek Styblik