Re: [rdma-next 8/8] RDMA: Use defines instead of hard coded value for phys_state

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

 



On Thu, Aug 24, 2017 at 12:56:29PM +0000, Boyer, Andrew wrote:
> On 8/23/17, 11:29 AM, "Leon Romanovsky" <leon@xxxxxxxxxx> wrote:
>
> >On Wed, Aug 23, 2017 at 02:59:52PM +0000, Boyer, Andrew wrote:
> >>
> >>
> >> On 8/15/17, 5:14 AM, "linux-rdma-owner@xxxxxxxxxxxxxxx on behalf of Leon
> >> Romanovsky" <linux-rdma-owner@xxxxxxxxxxxxxxx on behalf of
> >> leon@xxxxxxxxxx> wrote:
> >>
> >> >From: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> >> >
> >> >There are new defines to express the physical state of the link, so
> >> >let's reuse them instead hard-coded values.
> >> >
> >> >Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> >> >---
> >> >diff --git a/drivers/infiniband/sw/rxe/rxe_param.h
> >> >b/drivers/infiniband/sw/rxe/rxe_param.h
> >> >index 1b596fbbe251..475767262102 100644
> >> >--- a/drivers/infiniband/sw/rxe/rxe_param.h
> >> >+++ b/drivers/infiniband/sw/rxe/rxe_param.h
> >> >@@ -157,7 +157,7 @@ enum rxe_port_param {
> >> > 	RXE_PORT_ACTIVE_WIDTH		= IB_WIDTH_1X,
> >> > 	RXE_PORT_ACTIVE_SPEED		= 1,
> >> > 	RXE_PORT_PKEY_TBL_LEN		= 64,
> >> >-	RXE_PORT_PHYS_STATE		= 2,
> >> >+	RXE_PORT_PHYS_STATE		= RDMA_LINK_PHYS_STATE_POLLING,
> >> > 	RXE_PORT_SUBNET_PREFIX		= 0xfe80000000000000ULL,
> >> > };
> >>
> >> You can also remove IB_PHYS_STATE_* from rxe.h and the places where
> >> they¹re used.
> >
> >At the end, I found the way to avoid the whole this series.
> >This series is dropped.
> >
> >Thanks
>
> Would you object if I added similar / matching defines in ib_verbs.h?

Of course not, it will be good to see most of the cleanups from this
pull request, so feel free to resend/base your work on it.

>
> The phys_state field allows userspace to distinguish between a link that’s
> down and a link that’s turned off, but only a few drivers seem to support
> it.
>
> -Andrew
>
>

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux