Skip to contentSkip to conversation

libcxgb4: header file/copyright clean up

PATCH In review Steve Wise 2 participants 7 messages Sep 30, 2016 – Oct 2, 2016 1 message not in the archive InfiniBand

lore
Share & tools
lore

Steve Wise

author
#0 lore raw

cover libcxgb4: header file/copyright clean up

These patches clean up the header files in libcxgb4 by synching them with the equivalent upstream versions. The net result of this is proper dual license copyrights. I also got rid of the libcxgb4/src/queue.h and replaced it with the ccan list header.

Steve Wise (4):
libcxgb4: align header files with upstream kernel
libcxgb4: align t4_regs.h with upstream kernel version.
libcxgb4: replace t4fw_interface.h with upstream kernel headers
libcxgb4: use ccan lists

 libcxgb4/src/dev.c            |     9 +-
 libcxgb4/src/libcxgb4.h       |     4 +-
 libcxgb4/src/qp.c             |     4 +-
 libcxgb4/src/queue.h          |   650 -
 libcxgb4/src/t4.h             |    31 +-
 libcxgb4/src/t4_chip_type.h   |    98 +-
 libcxgb4/src/t4_pci_id_tbl.h  |   127 +-
 libcxgb4/src/t4_regs.h        | 64797 ++--------------------------------------
 libcxgb4/src/t4fw_api.h       |  3258 ++
 libcxgb4/src/t4fw_interface.h |  8770 ------
 libcxgb4/src/t4fw_ri_api.h    |   756 +
 11 files changed, 6711 insertions(+), 71793 deletions(-)
 delete mode 100644 libcxgb4/src/queue.h
 create mode 100644 libcxgb4/src/t4fw_api.h
 delete mode 100644 libcxgb4/src/t4fw_interface.h
 create mode 100644 libcxgb4/src/t4fw_ri_api.h
Signature · 6 lines
2.7.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): cover.1475253317.git.swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org

author
#2 lore raw

PATCH 1/4 libcxgb4: align header files with upstream kernel

Align these files with the upstream kernel:
t4_chip_type.h
t4_pci_id_tbl.h

This also fixes the incorrect copyright headers in the libcxb4 versions of these files.

---
 libcxgb4/src/dev.c           |   2 +-
 libcxgb4/src/t4_chip_type.h  |  98 +++++++++++----------------------
 libcxgb4/src/t4_pci_id_tbl.h | 127 +++++++++++++++++--------------------------
 3 files changed, 82 insertions(+), 145 deletions(-)
libcxgb4/src/dev.c +1 -1
index 8c3ecdd..284238d 100644
@@ -473,7 +473,7 @@ found:
 
 	pthread_spin_init(&dev->lock, PTHREAD_PROCESS_PRIVATE);
 	dev->ibv_dev.ops = c4iw_dev_ops;
-	dev->chip_version = CHELSIO_PCI_ID_CHIP_VERSION(hca_table[i].device);
+	dev->chip_version = CHELSIO_CHIP_VERSION(hca_table[i].device >> 8);
 	dev->abi_version = abi_version;
 
 	PDBG("%s device claimed\n", __FUNCTION__);
libcxgb4/src/t4_chip_type.h +31 -67

130 lines not on this page · raw message

libcxgb4/src/t4_pci_id_tbl.h +50 -77

205 lines not on this page · raw message

Signature · 6 lines
2.7.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
author
#3 lore raw

PATCH 3/4 libcxgb4: replace t4fw_interface.h with upstream kernel headers

In reply to a message not in the archive

Upstream has 2 header files that map to t4fw_interface.h, so pull them in and make the needed changes. Also remove t4fw_interface.h.

This fixes the copyright, which is driving this work.

---
 libcxgb4/src/qp.c             |    4 +-
 libcxgb4/src/t4.h             |    3 +-
 libcxgb4/src/t4fw_api.h       | 3258 +++++++++++++++
 libcxgb4/src/t4fw_interface.h | 8770 -----------------------------------------
 libcxgb4/src/t4fw_ri_api.h    |  756 ++++
 5 files changed, 4018 insertions(+), 8773 deletions(-)
 create mode 100644 libcxgb4/src/t4fw_api.h
 delete mode 100644 libcxgb4/src/t4fw_interface.h
 create mode 100644 libcxgb4/src/t4fw_ri_api.h
libcxgb4/src/qp.c +2 -2
index 5444137..621faba 100644
@@ -149,10 +149,10 @@ static int build_rdma_send(struct t4_sq *sq, union t4_wr *wqe,
 		return -EINVAL;
 	if (wr->send_flags & IBV_SEND_SOLICITED)
 		wqe->send.sendop_pkd = cpu_to_be32(
-			V_FW_RI_SEND_WR_SENDOP(FW_RI_SEND_WITH_SE));
+			FW_RI_SEND_WR_SENDOP_V(FW_RI_SEND_WITH_SE));
 	else
 		wqe->send.sendop_pkd = cpu_to_be32(
-			V_FW_RI_SEND_WR_SENDOP(FW_RI_SEND));
+			FW_RI_SEND_WR_SENDOP_V(FW_RI_SEND));
 	wqe->send.stag_inv = 0;
 	wqe->send.r3 = 0;
 	wqe->send.r4 = 0;
libcxgb4/src/t4.h +2 -1
index d96a17e..06c7c84 100644
@@ -75,7 +75,8 @@
 #include <arpa/inet.h> 			/* For htonl() and friends */
 #include "t4_regs.h"
 #include "t4_chip_type.h"
-#include "t4fw_interface.h"
+#include "t4fw_api.h"
+#include "t4fw_ri_api.h"
 
 #ifdef DEBUG
 #define DBGLOG(s)
libcxgb4/src/t4fw_api.h new file +3258 -0

2,979 lines not on this page · raw message

libcxgb4/src/t4fw_interface.h deleted +0 -8770

8,770 lines not on this page · raw message

libcxgb4/src/t4fw_ri_api.h new file +756 -0

756 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 6 lines
2.7.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Part of the diff is not shown here. View the raw message.

author
#4 lore raw

PATCH 4/4 libcxgb4: use ccan lists

In reply to a message not in the archive
---
 libcxgb4/src/dev.c      |   7 +-
 libcxgb4/src/libcxgb4.h |   4 +-
 libcxgb4/src/queue.h    | 650 ------------------------------------------------
 3 files changed, 6 insertions(+), 655 deletions(-)
 delete mode 100644 libcxgb4/src/queue.h
libcxgb4/src/dev.c +4 -3
index 284238d..f8339e0 100644
@@ -77,7 +77,7 @@ unsigned long c4iw_page_mask;
 int ma_wr;
 int t5_en_wc = 1;
 
-SLIST_HEAD(devices_struct, c4iw_dev) devices;
+static LIST_HEAD(devices);
 
 static struct ibv_context_ops c4iw_ctx_ops = {
 	.query_device = c4iw_query_device,
@@ -367,7 +367,7 @@ void dump_state()
 	int i;
 
 	fprintf(stderr, "STALL DETECTED:\n");
-	SLIST_FOREACH(dev, &devices, list) {
+	list_for_each(&devices, dev, list) {
 		//pthread_spin_lock(&dev->lock);
 		fprintf(stderr, "Device %s\n", dev->ibv_dev.name);
 		for (i=0; i < dev->max_cq; i++) {
@@ -475,9 +475,10 @@ found:
 	dev->ibv_dev.ops = c4iw_dev_ops;
 	dev->chip_version = CHELSIO_CHIP_VERSION(hca_table[i].device >> 8);
 	dev->abi_version = abi_version;
+	list_node_init(&dev->list);
 
 	PDBG("%s device claimed\n", __FUNCTION__);
-	SLIST_INSERT_HEAD(&devices, dev, list);
+	list_add_tail(&devices, &dev->list);
 #ifdef STALL_DETECTION
 {
 	char *c = getenv("CXGB4_STALL_TIMEOUT");
libcxgb4/src/libcxgb4.h +2 -2
index add46e0..4c83832 100644
@@ -41,7 +41,7 @@
 #include <sys/time.h>
 #include <infiniband/driver.h>
 #include <infiniband/arch.h>
-#include "queue.h"
+#include <ccan/list.h>
 #include "t4.h"
 
 extern unsigned long c4iw_page_size;
@@ -60,7 +60,7 @@ struct c4iw_dev {
 	int max_cq;
 	struct c4iw_cq **cqid2ptr;
 	pthread_spinlock_t lock;
-	SLIST_ENTRY(c4iw_dev) list;
+	struct list_node list;
 	int abi_version;
 };
 
libcxgb4/src/queue.h deleted +0 -650

650 lines not on this page · raw message

Signature · 6 lines
2.7.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
author
#5 lore raw
In reply to a message not in the archive
Quoted 4 lines

These patches clean up the header files in libcxgb4 by synching them with the equivalent upstream versions. The net result of this is proper dual license copyrights. I also got rid of the libcxgb4/src/queue.h and replaced it with the ccan list header.

I also create a pull request on github. I _think_ it is correct :)

https://github.com/linux-rdma/rdma-core/pull/11

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

author
#6 lore raw
Quoted 8 lines
Quoted 4 lines

These patches clean up the header files in libcxgb4 by synching them with the equivalent upstream versions. The net result of this is proper dual license copyrights. I also got rid of the libcxgb4/src/queue.h and replaced it with the ccan list header.

I also create a pull request on github. I _think_ it is correct :)

https://github.com/linux-rdma/rdma-core/pull/11

And patch 2 didn't make it, probably due to its size. You can review it via the pull request if you wish.

Steve

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#7 lore raw
Quoted 11 lines · Steve Wise
Quoted 8 lines
Quoted 4 lines

These patches clean up the header files in libcxgb4 by synching them with the equivalent upstream versions. The net result of this is proper dual license copyrights. I also got rid of the libcxgb4/src/queue.h and replaced it with the ccan list header.

I also create a pull request on github. I _think_ it is correct :)

https://github.com/linux-rdma/rdma-core/pull/11

And patch 2 didn't make it, probably due to its size. You can review it via the pull request if you wish.

I don't even notice that any more. If you send it to both me and the list, then my mail filter deletes the copy from the list and moves the copy to me into my list folder. As a result, I don't notice when items don't make it to the list. In any case, I merged your pull request, thanks.

Signature · 2 lines
Doug Ledford <[email protected]>
    GPG Key ID: 0E572FDD