Re: [PATCH] infiniband-diags: add rdma-ndd daemon

2014-11-11 Thread Hal Rosenstock
On 11/10/2014 1:32 PM, Weiny, Ira wrote: > I think changing the default is a worthwhile change. In addition, alternate > admin policies are aided by the > general use of the %h specifier. > > 1) SM's which periodically scan the Node Description always get up to > date hostname info. >

Re: [PATCH] infiniband-diags: add rdma-ndd daemon

2014-11-10 Thread Jason Gunthorpe
On Mon, Nov 10, 2014 at 06:32:18PM +, Weiny, Ira wrote: > > I don't know if this is practical, but it is the only race free way to > > properly > > address all of this. > > I don't think it is practical at all. > > Assuming that we can hold the link from transitioning to Init how PortInfo

RE: [PATCH] infiniband-diags: add rdma-ndd daemon

2014-11-10 Thread Weiny, Ira
> > On Mon, Nov 10, 2014 at 12:28:27AM +, Weiny, Ira wrote: > > > > > > Sadly, I think the proper way to address this is the same way netdev > > > addresses it - do not activate the interface on module load, wait > > > for an explicit enablement so userspace can configure before it tries to >

Re: [PATCH] infiniband-diags: add rdma-ndd daemon

2014-11-09 Thread Jason Gunthorpe
On Mon, Nov 10, 2014 at 12:28:27AM +, Weiny, Ira wrote: > > > > Sadly, I think the proper way to address this is the same way netdev > > addresses > > it - do not activate the interface on module load, wait for an explicit > > enablement so userspace can configure before it tries to link up.

RE: [PATCH] infiniband-diags: add rdma-ndd daemon

2014-11-09 Thread Weiny, Ira
> > Sadly, I think the proper way to address this is the same way netdev addresses > it - do not activate the interface on module load, wait for an explicit > enablement so userspace can configure before it tries to link up. > > (Not to say that is even possible considering RDMA's history, but st

Re: [PATCH] infiniband-diags: add rdma-ndd daemon

2014-11-07 Thread Jason Gunthorpe
On Thu, Oct 30, 2014 at 07:54:30PM -0400, ira.we...@intel.com wrote: > From: Ira Weiny > > rdma-ndd is a system daemon which watches the procfs hostname file for > updates. > > Upon detecting an update it will update the Node Descriptions of the RDMA > devices in the system. > > This deamon is

RE: [PATCH] infiniband-diags: add rdma-ndd daemon

2014-10-31 Thread Weiny, Ira
> > > How about the following? > > > > @@ -155,8 +156,8 @@ int read_and_set_hostname(int fd) > > { > > int rc; > > char buf[128]; > > - if (read(fd, buf, 65) >= 0) { > > - buf[65] = '\0'; > > + memset(buf, 0, sizeof(buf)); > > + if (read(fd, buf,

Re: [PATCH] infiniband-diags: add rdma-ndd daemon

2014-10-31 Thread Bart Van Assche
On 10/31/14 10:24, Weiny, Ira wrote: On 10/31/14 00:54, ira.we...@intel.com wrote: > +int read_and_set_hostname(int fd) > +{ > +int rc; > +char buf[128]; > +if (read(fd, buf, 65) >= 0) { > +buf[65] = '\0'; > +newline_to_null(bu

RE: [PATCH] infiniband-diags: add rdma-ndd daemon

2014-10-31 Thread Weiny, Ira
> > On 10/31/14 00:54, ira.we...@intel.com wrote: > > +int set_rdma_device_names(const char *hostname) { > > + DIR *class_dir; > > + struct dirent *dent; > > + > > + class_dir = opendir(SYS_INFINIBAND); > > + if (!class_dir) { > > + syslog(LOG_INFO, "Failed to open %s", SYS_INFIN

Re: [PATCH] infiniband-diags: add rdma-ndd daemon

2014-10-30 Thread Bart Van Assche
On 10/31/14 00:54, ira.we...@intel.com wrote: +int set_rdma_device_names(const char *hostname) +{ + DIR *class_dir; + struct dirent *dent; + + class_dir = opendir(SYS_INFINIBAND); + if (!class_dir) { + syslog(LOG_INFO, "Failed to open %s", SYS_INFINIBAND); +

[PATCH] infiniband-diags: add rdma-ndd daemon

2014-10-30 Thread ira . weiny
From: Ira Weiny rdma-ndd is a system daemon which watches the procfs hostname file for updates. Upon detecting an update it will update the Node Descriptions of the RDMA devices in the system. This deamon is intended to work with kernels which support polling of the procfs hostname file. If yo