Message ID | 7acf1f115fea63c4da47e19a54ed2ca71ad6247a.1520002437.git.swise@opengridcomputing.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On Thu, 2018-03-01 at 13:57 -0800, Steve Wise wrote: > diff --git a/drivers/infiniband/core/cma_priv.h b/drivers/infiniband/core/cma_priv.h > new file mode 100644 > index 0000000..11a41be > --- /dev/null > +++ b/drivers/infiniband/core/cma_priv.h > @@ -0,0 +1,79 @@ > +/* > + * Copyright (c) 2005 Voltaire Inc. All rights reserved. > + * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved. > + * Copyright (c) 1999-2005, Mellanox Technologies, Inc. All rights reserved. > + * Copyright (c) 2005-2006 Intel Corporation. All rights reserved. > + * > + * This software is available to you under a choice of one of two > + * licenses. You may choose to be licensed under the terms of the GNU > + * General Public License (GPL) Version 2, available from the file > + * COPYING in the main directory of this source tree, or the > + * OpenIB.org BSD license below: > + * > + * Redistribution and use in source and binary forms, with or > + * without modification, are permitted provided that the following > + * conditions are met: > + * > + * - Redistributions of source code must retain the above > + * copyright notice, this list of conditions and the following > + * disclaimer. > + * > + * - Redistributions in binary form must reproduce the above > + * copyright notice, this list of conditions and the following > + * disclaimer in the documentation and/or other materials > + * provided with the distribution. > + * > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, > + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF > + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND > + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS > + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN > + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN > + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE > + * SOFTWARE. > + */ Why the big copyright instead of the new copyright headers?
> On Thu, 2018-03-01 at 13:57 -0800, Steve Wise wrote: > > diff --git a/drivers/infiniband/core/cma_priv.h > b/drivers/infiniband/core/cma_priv.h > > new file mode 100644 > > index 0000000..11a41be > > --- /dev/null > > +++ b/drivers/infiniband/core/cma_priv.h > > @@ -0,0 +1,79 @@ > > +/* > > + * Copyright (c) 2005 Voltaire Inc. All rights reserved. > > + * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved. > > + * Copyright (c) 1999-2005, Mellanox Technologies, Inc. All rights reserved. > > + * Copyright (c) 2005-2006 Intel Corporation. All rights reserved. > > + * > > + * This software is available to you under a choice of one of two > > + * licenses. You may choose to be licensed under the terms of the GNU > > + * General Public License (GPL) Version 2, available from the file > > + * COPYING in the main directory of this source tree, or the > > + * OpenIB.org BSD license below: > > + * > > + * Redistribution and use in source and binary forms, with or > > + * without modification, are permitted provided that the following > > + * conditions are met: > > + * > > + * - Redistributions of source code must retain the above > > + * copyright notice, this list of conditions and the following > > + * disclaimer. > > + * > > + * - Redistributions in binary form must reproduce the above > > + * copyright notice, this list of conditions and the following > > + * disclaimer in the documentation and/or other materials > > + * provided with the distribution. > > + * > > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY > KIND, > > + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE > WARRANTIES OF > > + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND > > + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT > HOLDERS > > + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER > IN AN > > + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF > OR IN > > + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS > IN THE > > + * SOFTWARE. > > + */ > > Why the big copyright instead of the new copyright headers? I modeled it after core_priv.h -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, 2018-03-07 at 12:59 -0600, Steve Wise wrote: > > On Thu, 2018-03-01 at 13:57 -0800, Steve Wise wrote: > > > diff --git a/drivers/infiniband/core/cma_priv.h > > > > b/drivers/infiniband/core/cma_priv.h > > > new file mode 100644 > > > index 0000000..11a41be > > > --- /dev/null > > > +++ b/drivers/infiniband/core/cma_priv.h > > > @@ -0,0 +1,79 @@ > > > +/* > > > + * Copyright (c) 2005 Voltaire Inc. All rights reserved. > > > + * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved. > > > + * Copyright (c) 1999-2005, Mellanox Technologies, Inc. All rights reserved. > > > + * Copyright (c) 2005-2006 Intel Corporation. All rights reserved. > > > + * > > > + * This software is available to you under a choice of one of two > > > + * licenses. You may choose to be licensed under the terms of the GNU > > > + * General Public License (GPL) Version 2, available from the file > > > + * COPYING in the main directory of this source tree, or the > > > + * OpenIB.org BSD license below: > > > + * > > > + * Redistribution and use in source and binary forms, with or > > > + * without modification, are permitted provided that the following > > > + * conditions are met: > > > + * > > > + * - Redistributions of source code must retain the above > > > + * copyright notice, this list of conditions and the following > > > + * disclaimer. > > > + * > > > + * - Redistributions in binary form must reproduce the above > > > + * copyright notice, this list of conditions and the following > > > + * disclaimer in the documentation and/or other materials > > > + * provided with the distribution. > > > + * > > > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY > > > > KIND, > > > + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE > > > > WARRANTIES OF > > > + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND > > > + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT > > > > HOLDERS > > > + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER > > > > IN AN > > > + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF > > > > OR IN > > > + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS > > > > IN THE > > > + * SOFTWARE. > > > + */ > > > > Why the big copyright instead of the new copyright headers? > > I modeled it after core_priv.h It just makes another file we have to audit and change later. Anyway, I'll accept it as is, but I think we need to start using the kernel license indicators instead.
> On Wed, 2018-03-07 at 12:59 -0600, Steve Wise wrote: > > > On Thu, 2018-03-01 at 13:57 -0800, Steve Wise wrote: > > > > diff --git a/drivers/infiniband/core/cma_priv.h > > > > > > b/drivers/infiniband/core/cma_priv.h > > > > new file mode 100644 > > > > index 0000000..11a41be > > > > --- /dev/null > > > > +++ b/drivers/infiniband/core/cma_priv.h > > > > @@ -0,0 +1,79 @@ > > > > +/* > > > > + * Copyright (c) 2005 Voltaire Inc. All rights reserved. > > > > + * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved. > > > > + * Copyright (c) 1999-2005, Mellanox Technologies, Inc. All rights > reserved. > > > > + * Copyright (c) 2005-2006 Intel Corporation. All rights reserved. > > > > + * > > > > + * This software is available to you under a choice of one of two > > > > + * licenses. You may choose to be licensed under the terms of the > GNU > > > > + * General Public License (GPL) Version 2, available from the file > > > > + * COPYING in the main directory of this source tree, or the > > > > + * OpenIB.org BSD license below: > > > > + * > > > > + * Redistribution and use in source and binary forms, with or > > > > + * without modification, are permitted provided that the following > > > > + * conditions are met: > > > > + * > > > > + * - Redistributions of source code must retain the above > > > > + * copyright notice, this list of conditions and the following > > > > + * disclaimer. > > > > + * > > > > + * - Redistributions in binary form must reproduce the above > > > > + * copyright notice, this list of conditions and the following > > > > + * disclaimer in the documentation and/or other materials > > > > + * provided with the distribution. > > > > + * > > > > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY > > > > > > KIND, > > > > + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE > > > > > > WARRANTIES OF > > > > + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND > > > > + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR > COPYRIGHT > > > > > > HOLDERS > > > > + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, > WHETHER > > > > > > IN AN > > > > + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT > OF > > > > > > OR IN > > > > + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER > DEALINGS > > > > > > IN THE > > > > + * SOFTWARE. > > > > + */ > > > > > > Why the big copyright instead of the new copyright headers? > > > > I modeled it after core_priv.h > > It just makes another file we have to audit and change later. Anyway, > I'll accept it as is, but I think we need to start using the kernel > license indicators instead. I wasn't aware of the new license indicators. Feel free to fix it up. Steve. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, 2018-03-07 at 14:01 -0600, Steve Wise wrote: > > > > Why the big copyright instead of the new copyright headers? > > > > > > I modeled it after core_priv.h > > > > It just makes another file we have to audit and change later. Anyway, > > I'll accept it as is, but I think we need to start using the kernel > > license indicators instead. > > I wasn't aware of the new license indicators. Feel free to fix it up. There's only a few things I won't fixup when I'm taking a patch. A maintainer should never add a SoB line, and they shouldn't set anyone's copyright license. It's because these two acts are actually legally binding. It's like signing someone else' signature on a contract.
On Wed, 2018-03-07 at 15:05 -0500, Doug Ledford wrote: > On Wed, 2018-03-07 at 14:01 -0600, Steve Wise wrote: > > > > > Why the big copyright instead of the new copyright headers? > > > > > > > > I modeled it after core_priv.h > > > > > > It just makes another file we have to audit and change later. Anyway, > > > I'll accept it as is, but I think we need to start using the kernel > > > license indicators instead. > > > > I wasn't aware of the new license indicators. Feel free to fix it up. > > There's only a few things I won't fixup when I'm taking a patch. A > maintainer should never add a SoB line, and they shouldn't set anyone's > copyright license. It's because these two acts are actually legally > binding. It's like signing someone else' signature on a contract. > BTW, if you can get a v5 of just this patch using the license indicators before Leon responds to my email, we can get things in the right way from the beginning ;-)
> > BTW, if you can get a v5 of just this patch using the license indicators > before Leon responds to my email, we can get things in the right way > from the beginning ;-) > So it would look something like this? The copyrights are from cma.c, which is the origin of the contents of this new header. /* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */ /* Copyright (c) 2005 Voltaire Inc. All rights reserved. * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved. * Copyright (c) 1999-2005, Mellanox Technologies, Inc. All rights reserved. * Copyright (c) 2005-2006 Intel Corporation. All rights reserved. */ -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, 2018-03-07 at 14:36 -0600, Steve Wise wrote: > > > > BTW, if you can get a v5 of just this patch using the license indicators > > before Leon responds to my email, we can get things in the right way > > from the beginning ;-) > > > > So it would look something like this? The copyrights are from cma.c, which is the origin of the contents of this new header. > > /* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */ > /* Copyright (c) 2005 Voltaire Inc. All rights reserved. > * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved. > * Copyright (c) 1999-2005, Mellanox Technologies, Inc. All rights reserved. > * Copyright (c) 2005-2006 Intel Corporation. All rights reserved. > */ > > Yep, pretty much. Although, I think the BSD in the file might have been the BSD 2 clause. Jason is more familiar with the BSD variants than I am. Jason?
> On Wed, 2018-03-07 at 14:36 -0600, Steve Wise wrote: > > > > > > BTW, if you can get a v5 of just this patch using the license indicators > > > before Leon responds to my email, we can get things in the right way > > > from the beginning ;-) > > > > > > > So it would look something like this? The copyrights are from cma.c, which > is the origin of the contents of this new header. > > > > /* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */ > > /* Copyright (c) 2005 Voltaire Inc. All rights reserved. > > * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved. > > * Copyright (c) 1999-2005, Mellanox Technologies, Inc. All rights reserved. > > * Copyright (c) 2005-2006 Intel Corporation. All rights reserved. > > */ > > > > > > Yep, pretty much. Although, I think the BSD in the file might have been > the BSD 2 clause. Jason is more familiar with the BSD variants than I > am. Jason? > Yes, it looks like the BSD clause in cma.c is BSD-2 not 3. Steve. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Mar 07, 2018 at 03:39:53PM -0500, Doug Ledford wrote: > On Wed, 2018-03-07 at 14:36 -0600, Steve Wise wrote: > > > > > > BTW, if you can get a v5 of just this patch using the license indicators > > > before Leon responds to my email, we can get things in the right way > > > from the beginning ;-) > > > > > > > So it would look something like this? The copyrights are from cma.c, which is the origin of the contents of this new header. > > > > /* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */ > > /* Copyright (c) 2005 Voltaire Inc. All rights reserved. > > * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved. > > * Copyright (c) 1999-2005, Mellanox Technologies, Inc. All rights reserved. > > * Copyright (c) 2005-2006 Intel Corporation. All rights reserved. > > */ > > > > > > Yep, pretty much. Although, I think the BSD in the file might have been > the BSD 2 clause. Jason is more familiar with the BSD variants than I > am. Jason? Hmm.. Actually no, the OpenIB license we use does not match any existing SPDX identifier, so we can't take code covered under that license and apply SPDX at this time. The issue is that the standard license in the kernel is the start of the standard BSD 2 clause license followed by the end of the standard MIT license. From what I understand about the SPDX rules on their web site, this means it is no match to any existing license I can find (and I checked the raw text in their git repo) I supposed we should talk to the SPDX people and get the tags we need? Maybe I'll look at that.. Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, 2018-03-07 at 13:54 -0700, Jason Gunthorpe wrote: > On Wed, Mar 07, 2018 at 03:39:53PM -0500, Doug Ledford wrote: > > On Wed, 2018-03-07 at 14:36 -0600, Steve Wise wrote: > > > > > > > > BTW, if you can get a v5 of just this patch using the license indicators > > > > before Leon responds to my email, we can get things in the right way > > > > from the beginning ;-) > > > > > > > > > > So it would look something like this? The copyrights are from cma.c, which is the origin of the contents of this new header. > > > > > > /* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */ > > > /* Copyright (c) 2005 Voltaire Inc. All rights reserved. > > > * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved. > > > * Copyright (c) 1999-2005, Mellanox Technologies, Inc. All rights reserved. > > > * Copyright (c) 2005-2006 Intel Corporation. All rights reserved. > > > */ > > > > > > > > > > Yep, pretty much. Although, I think the BSD in the file might have been > > the BSD 2 clause. Jason is more familiar with the BSD variants than I > > am. Jason? > > Hmm.. > > Actually no, the OpenIB license we use does not match any existing > SPDX identifier, so we can't take code covered under that license and > apply SPDX at this time. > > The issue is that the standard license in the kernel is the start of > the standard BSD 2 clause license followed by the end of the standard > MIT license. > > From what I understand about the SPDX rules on their web site, this > means it is no match to any existing license I can find (and I checked > the raw text in their git repo) > > I supposed we should talk to the SPDX people and get the tags we need? > Maybe I'll look at that.. > > Jason That being the case Steve, we obviously will have to fix this up later, and the current patch is fine.
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index e66963c..203519e 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -62,6 +62,7 @@ #include <rdma/iw_cm.h> #include "core_priv.h" +#include "cma_priv.h" MODULE_AUTHOR("Sean Hefty"); MODULE_DESCRIPTION("Generic RDMA CM Agent"); @@ -327,46 +328,6 @@ struct ib_device *cma_get_ib_dev(struct cma_device *cma_dev) * We do this by disabling removal notification while a callback is in process, * and reporting it after the callback completes. */ -struct rdma_id_private { - struct rdma_cm_id id; - - struct rdma_bind_list *bind_list; - struct hlist_node node; - struct list_head list; /* listen_any_list or cma_device.list */ - struct list_head listen_list; /* per device listens */ - struct cma_device *cma_dev; - struct list_head mc_list; - - int internal_id; - enum rdma_cm_state state; - spinlock_t lock; - struct mutex qp_mutex; - - struct completion comp; - atomic_t refcount; - struct mutex handler_mutex; - - int backlog; - int timeout_ms; - struct ib_sa_query *query; - int query_id; - union { - struct ib_cm_id *ib; - struct iw_cm_id *iw; - } cm_id; - - u32 seq_num; - u32 qkey; - u32 qp_num; - pid_t owner; - u32 options; - u8 srq; - u8 tos; - bool tos_set; - u8 reuseaddr; - u8 afonly; - enum ib_gid_type gid_type; -}; struct cma_multicast { struct rdma_id_private *id_priv; diff --git a/drivers/infiniband/core/cma_priv.h b/drivers/infiniband/core/cma_priv.h new file mode 100644 index 0000000..11a41be --- /dev/null +++ b/drivers/infiniband/core/cma_priv.h @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2005 Voltaire Inc. All rights reserved. + * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved. + * Copyright (c) 1999-2005, Mellanox Technologies, Inc. All rights reserved. + * Copyright (c) 2005-2006 Intel Corporation. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU + * General Public License (GPL) Version 2, available from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#ifndef _CMA_PRIV_H +#define _CMA_PRIV_H + +struct rdma_id_private { + struct rdma_cm_id id; + + struct rdma_bind_list *bind_list; + struct hlist_node node; + struct list_head list; /* listen_any_list or cma_device.list */ + struct list_head listen_list; /* per device listens */ + struct cma_device *cma_dev; + struct list_head mc_list; + + int internal_id; + enum rdma_cm_state state; + spinlock_t lock; + struct mutex qp_mutex; + + struct completion comp; + atomic_t refcount; + struct mutex handler_mutex; + + int backlog; + int timeout_ms; + struct ib_sa_query *query; + int query_id; + union { + struct ib_cm_id *ib; + struct iw_cm_id *iw; + } cm_id; + + u32 seq_num; + u32 qkey; + u32 qp_num; + pid_t owner; + u32 options; + u8 srq; + u8 tos; + bool tos_set; + u8 reuseaddr; + u8 afonly; + enum ib_gid_type gid_type; +}; +#endif /* _CMA_PRIV_H */
Move struct rdma_id_private to a new header cma_priv.h so the resource tracking services in core/nldev.c can read useful information about cm_ids. Signed-off-by: Steve Wise <swise@opengridcomputing.com> --- drivers/infiniband/core/cma.c | 41 +------------------- drivers/infiniband/core/cma_priv.h | 79 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 40 deletions(-) create mode 100644 drivers/infiniband/core/cma_priv.h