[RFC PATCH 2/3] net/ncsi: Fix several packet definitions

Joel Stanley joel at jms.id.au
Fri Aug 11 10:11:21 AEST 2017


On Fri, Aug 11, 2017 at 8:09 AM, Samuel Mendoza-Jonas
<sam at mendozajonas.com> wrote:
> On Thu, 2017-08-10 at 16:33 +0930, Joel Stanley wrote:
>> On Wed, Aug 9, 2017 at 6:24 PM, Samuel Mendoza-Jonas
>> <sam at mendozajonas.com> wrote:
>> > Signed-off-by: Samuel Mendoza-Jonas <sam at mendozajonas.com>
>> > ---
>> >  net/ncsi/ncsi-cmd.c | 10 +++++-----
>> >  net/ncsi/ncsi-pkt.h |  2 +-
>> >  2 files changed, 6 insertions(+), 6 deletions(-)
>> >
>> > diff --git a/net/ncsi/ncsi-cmd.c b/net/ncsi/ncsi-cmd.c
>> > index db7083bfd476..1fec9fda7f60 100644
>> > --- a/net/ncsi/ncsi-cmd.c
>> > +++ b/net/ncsi/ncsi-cmd.c
>> > @@ -146,9 +146,9 @@ static int ncsi_cmd_handler_svf(struct sk_buff *skb,
>> >
>> >         cmd = (struct ncsi_cmd_svf_pkt *)skb_put(skb, sizeof(*cmd));
>> >         memset(cmd, 0, sizeof(*cmd));
>> > -       cmd->vlan = htons(nca->words[0]);
>> > -       cmd->index = nca->bytes[2];
>> > -       cmd->enable = nca->bytes[3];
>> > +       cmd->vlan = htons(nca->words[1]);
>> > +       cmd->index = nca->bytes[6];
>> > +       cmd->enable = nca->bytes[7];
>>
>> These look like straight up bugs. Should we send them off as fixes?
>
> These are straight up bugs except... without my changes we never call
> this code. As Ben says as time provides a lot of the current definitions
> need to be gone over, there's a few command/response code paths that are
> never triggered and could be broken in similar ways.

Okay. So we can do the cleanup once the vlan fire has been put out?

Makes sense to me. Unless we start hitting strange bugs, in which case
the cleanup might expose other issues.

Cheers,

Joel


More information about the openbmc mailing list