public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: benve-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org,
	dgoodell-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org,
	dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v1] {net,IB}/{rxe,usnic}: Utilize generic mac to eui32 function
Date: Mon, 6 Mar 2017 13:54:02 +0200	[thread overview]
Message-ID: <20170306115401.GA5230@yuval-lap> (raw)
In-Reply-To: <20170306051529.GN14379-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>

> > > > >
> > > > >  	/*
> > > > >  	 * The zSeries OSA network cards can be shared among various
> > > > > @@ -128,11 +137,8 @@ static inline int addrconf_ifid_eui48(u8 *eui, struct net_device *dev)
> > > > >  	if (dev->dev_id) {
> > > > >  		eui[3] = (dev->dev_id >> 8) & 0xFF;
> > > > >  		eui[4] = dev->dev_id & 0xFF;
> > > > > -	} else {
> > > > > -		eui[3] = 0xFF;
> > > > > -		eui[4] = 0xFE;
> > > > > -		eui[0] ^= 2;
> > > >
> > > > Sorry, but NAK.
> > > > You missed the assignment below. In original code it WASN'T for dev->dev_id != NULL, and now it is.
> > >
> > > s/below/above
> >
> > I'm sorry but which assignment is missing? Default values for 0, 3 and 4
> > are set in genaddrconf_ifid_eui48 then override here in case dev->dev_id is
> > set.
> 
> Not really, in original code of addrconf_ifid_eui48(), the eui[0] is set
> conditionally to be "eui[0] ^= 2" or stays without change. In your
> proposed code, eui[0] will be always changed to be "eui[0] ^= 2".

Thanks!
I was confused by the "missing", you should have used "extra assignment" or
even "wrong extra assignment" in your first comment.

Appreciate if you can review v2 which will reset eui[0] to default if
dev_id is used.

> 
> 
> >

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2017-03-06 11:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-03 20:49 [PATCH v1] {net,IB}/{rxe,usnic}: Utilize generic mac to eui32 function Yuval Shaia
     [not found] ` <1488574145-27179-1-git-send-email-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-03-05  7:46   ` Leon Romanovsky
     [not found]     ` <20170305074650.GH14379-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-03-05  8:12       ` Leon Romanovsky
     [not found]         ` <20170305081244.GJ14379-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-03-05 19:49           ` Yuval Shaia
2017-03-06  5:15             ` Leon Romanovsky
     [not found]               ` <20170306051529.GN14379-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-03-06 11:54                 ` Yuval Shaia [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170306115401.GA5230@yuval-lap \
    --to=yuval.shaia-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=benve-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=dgoodell-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox