<div dir="ltr"><div>Thanks Jakub for your comments.</div><div><br></div><div>Please find my response inline below.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 19, 2021 at 8:22 PM Jakub Kicinski <<a href="mailto:kuba@kernel.org" target="_blank">kuba@kernel.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, 19 Oct 2021 20:11:27 +0530 Kumar Thangavel wrote:<br>
> len += sizeof(struct ncsi_cmd_pkt_hdr) + 4;<br>
> - if (nca->payload < 26)<br>
> + payload = ALIGN(nca->payload, 4)<br>
> + if (payload < 26)<br>
> len += 26;<br>
> else<br>
> - len += nca->payload;<br>
> + len += payload;<br>
<br>
You round up to 4 and then add 26 if the result is smaller. 26 is not<br>
a multiple of 4. Is this intentional?<br>
<br></blockquote><div> Kumar : This is intentional. The total number of bytes should be 64. This 64 bytes includes Ethernet header, NC-SI header and payload, pldm header and payload. </div><div> Some pldm commands payload is less than 26. So we added remaining bytes to match with 64 and which is 4 bytes aligned. </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Also you can write this on one line:<br>
<br>
len += max(payload, 26);<br></blockquote><div><br></div><div> Kumar : Ack. Will update in the next patch set.</div></div></div>