Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next v2 04/13] nfp: add nfp_net_pf_free_vnic() function
From: Jakub Kicinski @ 2017-05-22 17:59 UTC (permalink / raw)
  To: netdev; +Cc: oss-drivers, Jakub Kicinski
In-Reply-To: <20170522175934.27447-1-jakub.kicinski@netronome.com>

Soon a third place will need to free a struct nfp_net.  Add a free
counterpart to nfp_net_pf_alloc_vnic().

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
---
 drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_main.c b/drivers/net/ethernet/netronome/nfp/nfp_net_main.c
index 532371940fd6..5f0c58a56182 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net_main.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net_main.c
@@ -268,16 +268,20 @@ static u8 __iomem *nfp_net_pf_map_ctrl_bar(struct nfp_pf *pf)
 	return ctrl_bar;
 }
 
+static void nfp_net_pf_free_vnic(struct nfp_pf *pf, struct nfp_net *nn)
+{
+	list_del(&nn->vnic_list);
+	pf->num_vnics--;
+	nfp_net_free(nn);
+}
+
 static void nfp_net_pf_free_vnics(struct nfp_pf *pf)
 {
 	struct nfp_net *nn;
 
 	while (!list_empty(&pf->vnics)) {
 		nn = list_first_entry(&pf->vnics, struct nfp_net, vnic_list);
-		list_del(&nn->vnic_list);
-		pf->num_vnics--;
-
-		nfp_net_free(nn);
+		nfp_net_pf_free_vnic(pf, nn);
 	}
 }
 
@@ -518,9 +522,7 @@ static void nfp_net_refresh_vnics(struct work_struct *work)
 		nfp_net_debugfs_dir_clean(&nn->debugfs_dir);
 		nfp_net_clean(nn);
 
-		list_del(&nn->vnic_list);
-		pf->num_vnics--;
-		nfp_net_free(nn);
+		nfp_net_pf_free_vnic(pf, nn);
 	}
 
 	if (list_empty(&pf->vnics))
-- 
2.11.0

^ permalink raw reply related

* [PATCH net-next v2 03/13] nfp: rename netdev/port to vNIC
From: Jakub Kicinski @ 2017-05-22 17:59 UTC (permalink / raw)
  To: netdev; +Cc: oss-drivers, Jakub Kicinski
In-Reply-To: <20170522175934.27447-1-jakub.kicinski@netronome.com>

vNIC is a PCIe-side abstraction NFP firmwares supported by this
driver use.  It was initially meant to represent a device port
and therefore a netdev but today should be thought of as a way
of grouping descriptor rings and associated state.  Advanced apps
will have vNICs without netdevs and ports without a vNIC (using
representors instead).

Make sure code refers to vNICs as vNICs and not ports or netdevs.
No functional changes.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
---
 drivers/net/ethernet/netronome/nfp/nfp_main.c      |   2 +-
 drivers/net/ethernet/netronome/nfp/nfp_main.h      |  22 +--
 drivers/net/ethernet/netronome/nfp/nfp_net.h       |  10 +-
 .../net/ethernet/netronome/nfp/nfp_net_debugfs.c   |   4 +-
 drivers/net/ethernet/netronome/nfp/nfp_net_main.c  | 150 ++++++++++-----------
 .../net/ethernet/netronome/nfp/nfp_netvf_main.c    |   4 +-
 6 files changed, 95 insertions(+), 97 deletions(-)

diff --git a/drivers/net/ethernet/netronome/nfp/nfp_main.c b/drivers/net/ethernet/netronome/nfp/nfp_main.c
index dde35dae35c5..9fbc7eedc017 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_main.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_main.c
@@ -340,7 +340,7 @@ static int nfp_pci_probe(struct pci_dev *pdev,
 		err = -ENOMEM;
 		goto err_rel_regions;
 	}
-	INIT_LIST_HEAD(&pf->ports);
+	INIT_LIST_HEAD(&pf->vnics);
 	pci_set_drvdata(pdev, pf);
 	pf->pdev = pdev;
 
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_main.h b/drivers/net/ethernet/netronome/nfp/nfp_main.h
index b57de047b002..1ca1c61450c1 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_main.h
+++ b/drivers/net/ethernet/netronome/nfp/nfp_main.h
@@ -57,27 +57,27 @@ struct nfp_eth_table;
  * struct nfp_pf - NFP PF-specific device structure
  * @pdev:		Backpointer to PCI device
  * @cpp:		Pointer to the CPP handle
- * @ctrl_area:		Pointer to the CPP area for the control BAR
+ * @data_vnic_bar:	Pointer to the CPP area for the data vNICs' BARs
  * @tx_area:		Pointer to the CPP area for the TX queues
  * @rx_area:		Pointer to the CPP area for the FL/RX queues
- * @irq_entries:	Array of MSI-X entries for all ports
+ * @irq_entries:	Array of MSI-X entries for all vNICs
  * @limit_vfs:		Number of VFs supported by firmware (~0 for PCI limit)
  * @num_vfs:		Number of SR-IOV VFs enabled
  * @fw_loaded:		Is the firmware loaded?
  * @eth_tbl:		NSP ETH table
  * @ddir:		Per-device debugfs directory
- * @num_ports:		Number of adapter ports app firmware supports
- * @num_netdevs:	Number of netdevs spawned
- * @ports:		Linked list of port structures (struct nfp_net)
- * @port_lock:		Protects @ports, @num_ports, @num_netdevs
+ * @max_data_vnics:	Number of data vNICs app firmware supports
+ * @num_vnics:		Number of vNICs spawned
+ * @vnics:		Linked list of vNIC structures (struct nfp_net)
  * @port_refresh_work:	Work entry for taking netdevs out
+ * @lock:		Protects all fields which may change after probe
  */
 struct nfp_pf {
 	struct pci_dev *pdev;
 
 	struct nfp_cpp *cpp;
 
-	struct nfp_cpp_area *ctrl_area;
+	struct nfp_cpp_area *data_vnic_bar;
 	struct nfp_cpp_area *tx_area;
 	struct nfp_cpp_area *rx_area;
 
@@ -92,12 +92,12 @@ struct nfp_pf {
 
 	struct dentry *ddir;
 
-	unsigned int num_ports;
-	unsigned int num_netdevs;
+	unsigned int max_data_vnics;
+	unsigned int num_vnics;
 
-	struct list_head ports;
+	struct list_head vnics;
 	struct work_struct port_refresh_work;
-	struct mutex port_lock;
+	struct mutex lock;
 };
 
 extern struct pci_driver nfp_netvf_pci_driver;
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net.h b/drivers/net/ethernet/netronome/nfp/nfp_net.h
index 04609191ca88..1d41be9b2309 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net.h
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net.h
@@ -84,7 +84,7 @@
 #define NFP_NET_NON_Q_VECTORS		2
 #define NFP_NET_IRQ_LSC_IDX		0
 #define NFP_NET_IRQ_EXN_IDX		1
-#define NFP_NET_MIN_PORT_IRQS		(NFP_NET_NON_Q_VECTORS + 1)
+#define NFP_NET_MIN_VNIC_IRQS		(NFP_NET_NON_Q_VECTORS + 1)
 
 /* Queue/Ring definitions */
 #define NFP_NET_MAX_TX_RINGS	64	/* Max. # of Tx rings per device */
@@ -555,7 +555,7 @@ struct nfp_net_dp {
  * @rx_bar:             Pointer to mapped FL/RX queues
  * @debugfs_dir:	Device directory in debugfs
  * @ethtool_dump_flag:	Ethtool dump flag
- * @port_list:		Entry on device port list
+ * @vnic_list:		Entry on device vNIC list
  * @pdev:		Backpointer to PCI device
  * @cpp:		CPP device handle if available
  * @eth_port:		Translated ETH Table port entry
@@ -625,7 +625,7 @@ struct nfp_net {
 	struct dentry *debugfs_dir;
 	u32 ethtool_dump_flag;
 
-	struct list_head port_list;
+	struct list_head vnic_list;
 
 	struct pci_dev *pdev;
 	struct nfp_cpp *cpp;
@@ -842,7 +842,7 @@ void nfp_net_refresh_port_table(struct nfp_net *nn);
 void nfp_net_debugfs_create(void);
 void nfp_net_debugfs_destroy(void);
 struct dentry *nfp_net_debugfs_device_add(struct pci_dev *pdev);
-void nfp_net_debugfs_port_add(struct nfp_net *nn, struct dentry *ddir, int id);
+void nfp_net_debugfs_vnic_add(struct nfp_net *nn, struct dentry *ddir, int id);
 void nfp_net_debugfs_dir_clean(struct dentry **dir);
 #else
 static inline void nfp_net_debugfs_create(void)
@@ -859,7 +859,7 @@ static inline struct dentry *nfp_net_debugfs_device_add(struct pci_dev *pdev)
 }
 
 static inline void
-nfp_net_debugfs_port_add(struct nfp_net *nn, struct dentry *ddir, int id)
+nfp_net_debugfs_vnic_add(struct nfp_net *nn, struct dentry *ddir, int id)
 {
 }
 
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c b/drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c
index 4077c59bf782..6cf1b234eecd 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c
@@ -200,7 +200,7 @@ static const struct file_operations nfp_xdp_q_fops = {
 	.llseek = seq_lseek
 };
 
-void nfp_net_debugfs_port_add(struct nfp_net *nn, struct dentry *ddir, int id)
+void nfp_net_debugfs_vnic_add(struct nfp_net *nn, struct dentry *ddir, int id)
 {
 	struct dentry *queues, *tx, *rx, *xdp;
 	char name[20];
@@ -209,7 +209,7 @@ void nfp_net_debugfs_port_add(struct nfp_net *nn, struct dentry *ddir, int id)
 	if (IS_ERR_OR_NULL(nfp_dir))
 		return;
 
-	sprintf(name, "port%d", id);
+	sprintf(name, "vnic%d", id);
 	nn->debugfs_dir = debugfs_create_dir(name, ddir);
 	if (IS_ERR_OR_NULL(nn->debugfs_dir))
 		return;
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_main.c b/drivers/net/ethernet/netronome/nfp/nfp_net_main.c
index 55d916cb04fe..532371940fd6 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net_main.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net_main.c
@@ -197,10 +197,10 @@ static unsigned int nfp_net_pf_get_num_ports(struct nfp_pf *pf)
 		 nfp_cppcore_pcie_unit(pf->cpp));
 
 	val = nfp_rtsym_read_le(pf->cpp, name, &err);
-	/* Default to one port */
+	/* Default to one port/vNIC */
 	if (err) {
 		if (err != -ENOENT)
-			nfp_err(pf->cpp, "Unable to read adapter port count\n");
+			nfp_err(pf->cpp, "Unable to read adapter vNIC count\n");
 		val = 1;
 	}
 
@@ -216,7 +216,7 @@ nfp_net_pf_total_qcs(struct nfp_pf *pf, void __iomem *ctrl_bar,
 	min_qc = readl(ctrl_bar + start_off);
 	max_qc = min_qc;
 
-	for (i = 0; i < pf->num_ports; i++) {
+	for (i = 0; i < pf->max_data_vnics; i++) {
 		/* To make our lives simpler only accept configuration where
 		 * queues are allocated to PFs in order (queues of PFn all have
 		 * indexes lower than PFn+1).
@@ -248,17 +248,17 @@ static u8 __iomem *nfp_net_pf_map_ctrl_bar(struct nfp_pf *pf)
 		return NULL;
 	}
 
-	if (ctrl_sym->size < pf->num_ports * NFP_PF_CSR_SLICE_SIZE) {
+	if (ctrl_sym->size < pf->max_data_vnics * NFP_PF_CSR_SLICE_SIZE) {
 		dev_err(&pf->pdev->dev,
-			"PF BAR0 too small to contain %d ports\n",
-			pf->num_ports);
+			"PF BAR0 too small to contain %d vNICs\n",
+			pf->max_data_vnics);
 		return NULL;
 	}
 
 	ctrl_bar = nfp_net_map_area(pf->cpp, "net.ctrl",
 				    ctrl_sym->domain, ctrl_sym->target,
 				    ctrl_sym->addr, ctrl_sym->size,
-				    &pf->ctrl_area);
+				    &pf->data_vnic_bar);
 	if (IS_ERR(ctrl_bar)) {
 		dev_err(&pf->pdev->dev, "Failed to map PF BAR0: %ld\n",
 			PTR_ERR(ctrl_bar));
@@ -268,24 +268,24 @@ static u8 __iomem *nfp_net_pf_map_ctrl_bar(struct nfp_pf *pf)
 	return ctrl_bar;
 }
 
-static void nfp_net_pf_free_netdevs(struct nfp_pf *pf)
+static void nfp_net_pf_free_vnics(struct nfp_pf *pf)
 {
 	struct nfp_net *nn;
 
-	while (!list_empty(&pf->ports)) {
-		nn = list_first_entry(&pf->ports, struct nfp_net, port_list);
-		list_del(&nn->port_list);
-		pf->num_netdevs--;
+	while (!list_empty(&pf->vnics)) {
+		nn = list_first_entry(&pf->vnics, struct nfp_net, vnic_list);
+		list_del(&nn->vnic_list);
+		pf->num_vnics--;
 
 		nfp_net_free(nn);
 	}
 }
 
 static struct nfp_net *
-nfp_net_pf_alloc_port_netdev(struct nfp_pf *pf, void __iomem *ctrl_bar,
-			     void __iomem *tx_bar, void __iomem *rx_bar,
-			     int stride, struct nfp_net_fw_version *fw_ver,
-			     struct nfp_eth_table_port *eth_port)
+nfp_net_pf_alloc_vnic(struct nfp_pf *pf, void __iomem *ctrl_bar,
+		      void __iomem *tx_bar, void __iomem *rx_bar,
+		      int stride, struct nfp_net_fw_version *fw_ver,
+		      struct nfp_eth_table_port *eth_port)
 {
 	u32 n_tx_rings, n_rx_rings;
 	struct nfp_net *nn;
@@ -293,7 +293,7 @@ nfp_net_pf_alloc_port_netdev(struct nfp_pf *pf, void __iomem *ctrl_bar,
 	n_tx_rings = readl(ctrl_bar + NFP_NET_CFG_MAX_TXRINGS);
 	n_rx_rings = readl(ctrl_bar + NFP_NET_CFG_MAX_RXRINGS);
 
-	/* Allocate and initialise the netdev */
+	/* Allocate and initialise the vNIC */
 	nn = nfp_net_alloc(pf->pdev, n_tx_rings, n_rx_rings);
 	if (IS_ERR(nn))
 		return nn;
@@ -312,8 +312,7 @@ nfp_net_pf_alloc_port_netdev(struct nfp_pf *pf, void __iomem *ctrl_bar,
 }
 
 static int
-nfp_net_pf_init_port_netdev(struct nfp_pf *pf, struct nfp_net *nn,
-			    unsigned int id)
+nfp_net_pf_init_vnic(struct nfp_pf *pf, struct nfp_net *nn, unsigned int id)
 {
 	int err;
 
@@ -330,7 +329,7 @@ nfp_net_pf_init_port_netdev(struct nfp_pf *pf, struct nfp_net *nn,
 	if (err)
 		return err;
 
-	nfp_net_debugfs_port_add(nn, pf->ddir, id);
+	nfp_net_debugfs_vnic_add(nn, pf->ddir, id);
 
 	nfp_net_info(nn);
 
@@ -338,9 +337,9 @@ nfp_net_pf_init_port_netdev(struct nfp_pf *pf, struct nfp_net *nn,
 }
 
 static int
-nfp_net_pf_alloc_netdevs(struct nfp_pf *pf, void __iomem *ctrl_bar,
-			 void __iomem *tx_bar, void __iomem *rx_bar,
-			 int stride, struct nfp_net_fw_version *fw_ver)
+nfp_net_pf_alloc_vnics(struct nfp_pf *pf, void __iomem *ctrl_bar,
+		       void __iomem *tx_bar, void __iomem *rx_bar,
+		       int stride, struct nfp_net_fw_version *fw_ver)
 {
 	u32 prev_tx_base, prev_rx_base, tgt_tx_base, tgt_rx_base;
 	struct nfp_eth_table_port *eth_port;
@@ -351,7 +350,7 @@ nfp_net_pf_alloc_netdevs(struct nfp_pf *pf, void __iomem *ctrl_bar,
 	prev_tx_base = readl(ctrl_bar + NFP_NET_CFG_START_TXQ);
 	prev_rx_base = readl(ctrl_bar + NFP_NET_CFG_START_RXQ);
 
-	for (i = 0; i < pf->num_ports; i++) {
+	for (i = 0; i < pf->max_data_vnics; i++) {
 		tgt_tx_base = readl(ctrl_bar + NFP_NET_CFG_START_TXQ);
 		tgt_rx_base = readl(ctrl_bar + NFP_NET_CFG_START_RXQ);
 		tx_bar += (tgt_tx_base - prev_tx_base) * NFP_QCP_QUEUE_ADDR_SZ;
@@ -363,49 +362,48 @@ nfp_net_pf_alloc_netdevs(struct nfp_pf *pf, void __iomem *ctrl_bar,
 		if (eth_port && eth_port->override_changed) {
 			nfp_warn(pf->cpp, "Config changed for port #%d, reboot required before port will be operational\n", i);
 		} else {
-			nn = nfp_net_pf_alloc_port_netdev(pf, ctrl_bar, tx_bar,
-							  rx_bar, stride,
-							  fw_ver, eth_port);
+			nn = nfp_net_pf_alloc_vnic(pf, ctrl_bar, tx_bar, rx_bar,
+						   stride, fw_ver, eth_port);
 			if (IS_ERR(nn)) {
 				err = PTR_ERR(nn);
 				goto err_free_prev;
 			}
-			list_add_tail(&nn->port_list, &pf->ports);
-			pf->num_netdevs++;
+			list_add_tail(&nn->vnic_list, &pf->vnics);
+			pf->num_vnics++;
 		}
 
 		ctrl_bar += NFP_PF_CSR_SLICE_SIZE;
 	}
 
-	if (list_empty(&pf->ports))
+	if (list_empty(&pf->vnics))
 		return -ENODEV;
 
 	return 0;
 
 err_free_prev:
-	nfp_net_pf_free_netdevs(pf);
+	nfp_net_pf_free_vnics(pf);
 	return err;
 }
 
 static int
-nfp_net_pf_spawn_netdevs(struct nfp_pf *pf,
-			 void __iomem *ctrl_bar, void __iomem *tx_bar,
-			 void __iomem *rx_bar, int stride,
-			 struct nfp_net_fw_version *fw_ver)
+nfp_net_pf_spawn_vnics(struct nfp_pf *pf,
+		       void __iomem *ctrl_bar, void __iomem *tx_bar,
+		       void __iomem *rx_bar, int stride,
+		       struct nfp_net_fw_version *fw_ver)
 {
-	unsigned int id, wanted_irqs, num_irqs, ports_left, irqs_left;
+	unsigned int id, wanted_irqs, num_irqs, vnics_left, irqs_left;
 	struct nfp_net *nn;
 	int err;
 
-	/* Allocate the netdevs and do basic init */
-	err = nfp_net_pf_alloc_netdevs(pf, ctrl_bar, tx_bar, rx_bar,
-				       stride, fw_ver);
+	/* Allocate the vnics and do basic init */
+	err = nfp_net_pf_alloc_vnics(pf, ctrl_bar, tx_bar, rx_bar,
+				     stride, fw_ver);
 	if (err)
 		return err;
 
 	/* Get MSI-X vectors */
 	wanted_irqs = 0;
-	list_for_each_entry(nn, &pf->ports, port_list)
+	list_for_each_entry(nn, &pf->vnics, vnic_list)
 		wanted_irqs += NFP_NET_NON_Q_VECTORS + nn->dp.num_r_vecs;
 	pf->irq_entries = kcalloc(wanted_irqs, sizeof(*pf->irq_entries),
 				  GFP_KERNEL);
@@ -415,7 +413,7 @@ nfp_net_pf_spawn_netdevs(struct nfp_pf *pf,
 	}
 
 	num_irqs = nfp_net_irqs_alloc(pf->pdev, pf->irq_entries,
-				      NFP_NET_MIN_PORT_IRQS * pf->num_netdevs,
+				      NFP_NET_MIN_VNIC_IRQS * pf->num_vnics,
 				      wanted_irqs);
 	if (!num_irqs) {
 		nn_warn(nn, "Unable to allocate MSI-X Vectors. Exiting\n");
@@ -423,23 +421,23 @@ nfp_net_pf_spawn_netdevs(struct nfp_pf *pf,
 		goto err_vec_free;
 	}
 
-	/* Distribute IRQs to ports */
+	/* Distribute IRQs to vNICs */
 	irqs_left = num_irqs;
-	ports_left = pf->num_netdevs;
-	list_for_each_entry(nn, &pf->ports, port_list) {
+	vnics_left = pf->num_vnics;
+	list_for_each_entry(nn, &pf->vnics, vnic_list) {
 		unsigned int n;
 
-		n = DIV_ROUND_UP(irqs_left, ports_left);
+		n = DIV_ROUND_UP(irqs_left, vnics_left);
 		nfp_net_irqs_assign(nn, &pf->irq_entries[num_irqs - irqs_left],
 				    n);
 		irqs_left -= n;
-		ports_left--;
+		vnics_left--;
 	}
 
-	/* Finish netdev init and register */
+	/* Finish vNIC init and register */
 	id = 0;
-	list_for_each_entry(nn, &pf->ports, port_list) {
-		err = nfp_net_pf_init_port_netdev(pf, nn, id);
+	list_for_each_entry(nn, &pf->vnics, vnic_list) {
+		err = nfp_net_pf_init_vnic(pf, nn, id);
 		if (err)
 			goto err_prev_deinit;
 
@@ -449,7 +447,7 @@ nfp_net_pf_spawn_netdevs(struct nfp_pf *pf,
 	return 0;
 
 err_prev_deinit:
-	list_for_each_entry_continue_reverse(nn, &pf->ports, port_list) {
+	list_for_each_entry_continue_reverse(nn, &pf->vnics, vnic_list) {
 		nfp_net_debugfs_dir_clean(&nn->debugfs_dir);
 		nfp_net_clean(nn);
 	}
@@ -457,7 +455,7 @@ nfp_net_pf_spawn_netdevs(struct nfp_pf *pf,
 err_vec_free:
 	kfree(pf->irq_entries);
 err_nn_free:
-	nfp_net_pf_free_netdevs(pf);
+	nfp_net_pf_free_vnics(pf);
 	return err;
 }
 
@@ -470,23 +468,23 @@ static void nfp_net_pci_remove_finish(struct nfp_pf *pf)
 
 	nfp_cpp_area_release_free(pf->rx_area);
 	nfp_cpp_area_release_free(pf->tx_area);
-	nfp_cpp_area_release_free(pf->ctrl_area);
+	nfp_cpp_area_release_free(pf->data_vnic_bar);
 }
 
-static void nfp_net_refresh_netdevs(struct work_struct *work)
+static void nfp_net_refresh_vnics(struct work_struct *work)
 {
 	struct nfp_pf *pf = container_of(work, struct nfp_pf,
 					 port_refresh_work);
 	struct nfp_eth_table *eth_table;
 	struct nfp_net *nn, *next;
 
-	mutex_lock(&pf->port_lock);
+	mutex_lock(&pf->lock);
 
 	/* Check for nfp_net_pci_remove() racing against us */
-	if (list_empty(&pf->ports))
+	if (list_empty(&pf->vnics))
 		goto out;
 
-	list_for_each_entry(nn, &pf->ports, port_list)
+	list_for_each_entry(nn, &pf->vnics, vnic_list)
 		nfp_net_link_changed_read_clear(nn);
 
 	eth_table = nfp_eth_read_ports(pf->cpp);
@@ -496,7 +494,7 @@ static void nfp_net_refresh_netdevs(struct work_struct *work)
 	}
 
 	rtnl_lock();
-	list_for_each_entry(nn, &pf->ports, port_list) {
+	list_for_each_entry(nn, &pf->vnics, vnic_list) {
 		if (!nn->eth_port)
 			continue;
 		nn->eth_port = nfp_net_find_port(eth_table,
@@ -507,7 +505,7 @@ static void nfp_net_refresh_netdevs(struct work_struct *work)
 	kfree(pf->eth_tbl);
 	pf->eth_tbl = eth_table;
 
-	list_for_each_entry_safe(nn, next, &pf->ports, port_list) {
+	list_for_each_entry_safe(nn, next, &pf->vnics, vnic_list) {
 		if (!nn->eth_port) {
 			nfp_warn(pf->cpp, "Warning: port not present after reconfig\n");
 			continue;
@@ -520,15 +518,15 @@ static void nfp_net_refresh_netdevs(struct work_struct *work)
 		nfp_net_debugfs_dir_clean(&nn->debugfs_dir);
 		nfp_net_clean(nn);
 
-		list_del(&nn->port_list);
-		pf->num_netdevs--;
+		list_del(&nn->vnic_list);
+		pf->num_vnics--;
 		nfp_net_free(nn);
 	}
 
-	if (list_empty(&pf->ports))
+	if (list_empty(&pf->vnics))
 		nfp_net_pci_remove_finish(pf);
 out:
-	mutex_unlock(&pf->port_lock);
+	mutex_unlock(&pf->lock);
 }
 
 void nfp_net_refresh_port_table(struct nfp_net *nn)
@@ -576,8 +574,8 @@ int nfp_net_pci_probe(struct nfp_pf *pf)
 	int stride;
 	int err;
 
-	INIT_WORK(&pf->port_refresh_work, nfp_net_refresh_netdevs);
-	mutex_init(&pf->port_lock);
+	INIT_WORK(&pf->port_refresh_work, nfp_net_refresh_vnics);
+	mutex_init(&pf->lock);
 
 	/* Verify that the board has completed initialization */
 	if (!nfp_is_ready(pf->cpp)) {
@@ -585,8 +583,8 @@ int nfp_net_pci_probe(struct nfp_pf *pf)
 		return -EINVAL;
 	}
 
-	mutex_lock(&pf->port_lock);
-	pf->num_ports = nfp_net_pf_get_num_ports(pf);
+	mutex_lock(&pf->lock);
+	pf->max_data_vnics = nfp_net_pf_get_num_ports(pf);
 
 	ctrl_bar = nfp_net_pf_map_ctrl_bar(pf);
 	if (!ctrl_bar) {
@@ -661,12 +659,12 @@ int nfp_net_pci_probe(struct nfp_pf *pf)
 
 	pf->ddir = nfp_net_debugfs_device_add(pf->pdev);
 
-	err = nfp_net_pf_spawn_netdevs(pf, ctrl_bar, tx_bar, rx_bar,
-				       stride, &fw_ver);
+	err = nfp_net_pf_spawn_vnics(pf, ctrl_bar, tx_bar, rx_bar,
+				     stride, &fw_ver);
 	if (err)
 		goto err_clean_ddir;
 
-	mutex_unlock(&pf->port_lock);
+	mutex_unlock(&pf->lock);
 
 	return 0;
 
@@ -676,9 +674,9 @@ int nfp_net_pci_probe(struct nfp_pf *pf)
 err_unmap_tx:
 	nfp_cpp_area_release_free(pf->tx_area);
 err_ctrl_unmap:
-	nfp_cpp_area_release_free(pf->ctrl_area);
+	nfp_cpp_area_release_free(pf->data_vnic_bar);
 err_unlock:
-	mutex_unlock(&pf->port_lock);
+	mutex_unlock(&pf->lock);
 	return err;
 }
 
@@ -686,21 +684,21 @@ void nfp_net_pci_remove(struct nfp_pf *pf)
 {
 	struct nfp_net *nn;
 
-	mutex_lock(&pf->port_lock);
-	if (list_empty(&pf->ports))
+	mutex_lock(&pf->lock);
+	if (list_empty(&pf->vnics))
 		goto out;
 
-	list_for_each_entry(nn, &pf->ports, port_list) {
+	list_for_each_entry(nn, &pf->vnics, vnic_list) {
 		nfp_net_debugfs_dir_clean(&nn->debugfs_dir);
 
 		nfp_net_clean(nn);
 	}
 
-	nfp_net_pf_free_netdevs(pf);
+	nfp_net_pf_free_vnics(pf);
 
 	nfp_net_pci_remove_finish(pf);
 out:
-	mutex_unlock(&pf->port_lock);
+	mutex_unlock(&pf->lock);
 
 	cancel_work_sync(&pf->port_refresh_work);
 }
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c b/drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c
index 856a76bdfc24..3f1c7f0f392e 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c
@@ -267,7 +267,7 @@ static int nfp_netvf_pci_probe(struct pci_dev *pdev,
 	nfp_netvf_get_mac_addr(nn);
 
 	num_irqs = nfp_net_irqs_alloc(pdev, vf->irq_entries,
-				      NFP_NET_MIN_PORT_IRQS,
+				      NFP_NET_MIN_VNIC_IRQS,
 				      NFP_NET_NON_Q_VECTORS +
 				      nn->dp.num_r_vecs);
 	if (!num_irqs) {
@@ -289,7 +289,7 @@ static int nfp_netvf_pci_probe(struct pci_dev *pdev,
 
 	nfp_net_info(nn);
 	vf->ddir = nfp_net_debugfs_device_add(pdev);
-	nfp_net_debugfs_port_add(nn, vf->ddir, 0);
+	nfp_net_debugfs_vnic_add(nn, vf->ddir, 0);
 
 	return 0;
 
-- 
2.11.0

^ permalink raw reply related

* [PATCH net-next v2 02/13] nfp: make nfp_net alloc/init/cleanup/free not depend on netdevs
From: Jakub Kicinski @ 2017-05-22 17:59 UTC (permalink / raw)
  To: netdev; +Cc: oss-drivers, Jakub Kicinski
In-Reply-To: <20170522175934.27447-1-jakub.kicinski@netronome.com>

struct nfp_net represents a vNIC, we will be moving away from the
requirement for every vNIC to have a netdev associated with it.
Remove "netdev" from some function names and prefer passing
struct nfp_net pointer as argument instead of struct net_device *.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
---
 drivers/net/ethernet/netronome/nfp/nfp_net.h       | 12 ++++----
 .../net/ethernet/netronome/nfp/nfp_net_common.c    | 35 ++++++++++------------
 drivers/net/ethernet/netronome/nfp/nfp_net_main.c  | 14 ++++-----
 .../net/ethernet/netronome/nfp/nfp_netvf_main.c    | 10 +++----
 4 files changed, 35 insertions(+), 36 deletions(-)

diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net.h b/drivers/net/ethernet/netronome/nfp/nfp_net.h
index 7b9518cbe965..04609191ca88 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net.h
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net.h
@@ -807,11 +807,13 @@ void nfp_net_get_fw_version(struct nfp_net_fw_version *fw_ver,
 			    void __iomem *ctrl_bar);
 
 struct nfp_net *
-nfp_net_netdev_alloc(struct pci_dev *pdev,
-		     unsigned int max_tx_rings, unsigned int max_rx_rings);
-void nfp_net_netdev_free(struct nfp_net *nn);
-int nfp_net_netdev_init(struct net_device *netdev);
-void nfp_net_netdev_clean(struct net_device *netdev);
+nfp_net_alloc(struct pci_dev *pdev,
+	      unsigned int max_tx_rings, unsigned int max_rx_rings);
+void nfp_net_free(struct nfp_net *nn);
+
+int nfp_net_init(struct nfp_net *nn);
+void nfp_net_clean(struct nfp_net *nn);
+
 void nfp_net_set_ethtool_ops(struct net_device *netdev);
 void nfp_net_info(struct nfp_net *nn);
 int nfp_net_reconfig(struct nfp_net *nn, u32 update);
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
index da83e17b8b20..b427c95c5acd 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
@@ -516,11 +516,10 @@ nfp_net_rx_ring_init(struct nfp_net_rx_ring *rx_ring,
 
 /**
  * nfp_net_vecs_init() - Assign IRQs and setup rvecs.
- * @netdev:   netdev structure
+ * @nn:		NFP Network structure
  */
-static void nfp_net_vecs_init(struct net_device *netdev)
+static void nfp_net_vecs_init(struct nfp_net *nn)
 {
-	struct nfp_net *nn = netdev_priv(netdev);
 	struct nfp_net_r_vector *r_vec;
 	int r;
 
@@ -3087,7 +3086,7 @@ void nfp_net_info(struct nfp_net *nn)
 }
 
 /**
- * nfp_net_netdev_alloc() - Allocate netdev and related structure
+ * nfp_net_alloc() - Allocate netdev and related structure
  * @pdev:         PCI device
  * @max_tx_rings: Maximum number of TX rings supported by device
  * @max_rx_rings: Maximum number of RX rings supported by device
@@ -3097,9 +3096,9 @@ void nfp_net_info(struct nfp_net *nn)
  *
  * Return: NFP Net device structure, or ERR_PTR on error.
  */
-struct nfp_net *nfp_net_netdev_alloc(struct pci_dev *pdev,
-				     unsigned int max_tx_rings,
-				     unsigned int max_rx_rings)
+struct nfp_net *nfp_net_alloc(struct pci_dev *pdev,
+			      unsigned int max_tx_rings,
+			      unsigned int max_rx_rings)
 {
 	struct net_device *netdev;
 	struct nfp_net *nn;
@@ -3144,10 +3143,10 @@ struct nfp_net *nfp_net_netdev_alloc(struct pci_dev *pdev,
 }
 
 /**
- * nfp_net_netdev_free() - Undo what @nfp_net_netdev_alloc() did
+ * nfp_net_free() - Undo what @nfp_net_alloc() did
  * @nn:      NFP Net device to reconfigure
  */
-void nfp_net_netdev_free(struct nfp_net *nn)
+void nfp_net_free(struct nfp_net *nn)
 {
 	free_netdev(nn->dp.netdev);
 }
@@ -3221,14 +3220,14 @@ static void nfp_net_irqmod_init(struct nfp_net *nn)
 }
 
 /**
- * nfp_net_netdev_init() - Initialise/finalise the netdev structure
- * @netdev:      netdev structure
+ * nfp_net_init() - Initialise/finalise the nfp_net structure
+ * @nn:		NFP Net device structure
  *
  * Return: 0 on success or negative errno on error.
  */
-int nfp_net_netdev_init(struct net_device *netdev)
+int nfp_net_init(struct nfp_net *nn)
 {
-	struct nfp_net *nn = netdev_priv(netdev);
+	struct net_device *netdev = nn->dp.netdev;
 	int err;
 
 	nn->dp.rx_dma_dir = DMA_FROM_DEVICE;
@@ -3367,19 +3366,17 @@ int nfp_net_netdev_init(struct net_device *netdev)
 	netif_carrier_off(netdev);
 
 	nfp_net_set_ethtool_ops(netdev);
-	nfp_net_vecs_init(netdev);
+	nfp_net_vecs_init(nn);
 
 	return register_netdev(netdev);
 }
 
 /**
- * nfp_net_netdev_clean() - Undo what nfp_net_netdev_init() did.
- * @netdev:      netdev structure
+ * nfp_net_clean() - Undo what nfp_net_init() did.
+ * @nn:		NFP Net device structure
  */
-void nfp_net_netdev_clean(struct net_device *netdev)
+void nfp_net_clean(struct nfp_net *nn)
 {
-	struct nfp_net *nn = netdev_priv(netdev);
-
 	unregister_netdev(nn->dp.netdev);
 
 	if (nn->dp.xdp_prog)
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_main.c b/drivers/net/ethernet/netronome/nfp/nfp_net_main.c
index 16115973112c..55d916cb04fe 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net_main.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net_main.c
@@ -277,7 +277,7 @@ static void nfp_net_pf_free_netdevs(struct nfp_pf *pf)
 		list_del(&nn->port_list);
 		pf->num_netdevs--;
 
-		nfp_net_netdev_free(nn);
+		nfp_net_free(nn);
 	}
 }
 
@@ -294,7 +294,7 @@ nfp_net_pf_alloc_port_netdev(struct nfp_pf *pf, void __iomem *ctrl_bar,
 	n_rx_rings = readl(ctrl_bar + NFP_NET_CFG_MAX_RXRINGS);
 
 	/* Allocate and initialise the netdev */
-	nn = nfp_net_netdev_alloc(pf->pdev, n_tx_rings, n_rx_rings);
+	nn = nfp_net_alloc(pf->pdev, n_tx_rings, n_rx_rings);
 	if (IS_ERR(nn))
 		return nn;
 
@@ -326,7 +326,7 @@ nfp_net_pf_init_port_netdev(struct nfp_pf *pf, struct nfp_net *nn,
 	 */
 	nn->me_freq_mhz = 1200;
 
-	err = nfp_net_netdev_init(nn->dp.netdev);
+	err = nfp_net_init(nn);
 	if (err)
 		return err;
 
@@ -451,7 +451,7 @@ nfp_net_pf_spawn_netdevs(struct nfp_pf *pf,
 err_prev_deinit:
 	list_for_each_entry_continue_reverse(nn, &pf->ports, port_list) {
 		nfp_net_debugfs_dir_clean(&nn->debugfs_dir);
-		nfp_net_netdev_clean(nn->dp.netdev);
+		nfp_net_clean(nn);
 	}
 	nfp_net_irqs_disable(pf->pdev);
 err_vec_free:
@@ -518,11 +518,11 @@ static void nfp_net_refresh_netdevs(struct work_struct *work)
 		nn_warn(nn, "Port config changed, unregistering. Reboot required before port will be operational again.\n");
 
 		nfp_net_debugfs_dir_clean(&nn->debugfs_dir);
-		nfp_net_netdev_clean(nn->dp.netdev);
+		nfp_net_clean(nn);
 
 		list_del(&nn->port_list);
 		pf->num_netdevs--;
-		nfp_net_netdev_free(nn);
+		nfp_net_free(nn);
 	}
 
 	if (list_empty(&pf->ports))
@@ -693,7 +693,7 @@ void nfp_net_pci_remove(struct nfp_pf *pf)
 	list_for_each_entry(nn, &pf->ports, port_list) {
 		nfp_net_debugfs_dir_clean(&nn->debugfs_dir);
 
-		nfp_net_netdev_clean(nn->dp.netdev);
+		nfp_net_clean(nn);
 	}
 
 	nfp_net_pf_free_netdevs(pf);
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c b/drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c
index 86e61be6f35c..856a76bdfc24 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c
@@ -202,7 +202,7 @@ static int nfp_netvf_pci_probe(struct pci_dev *pdev,
 	rx_bar_off = NFP_PCIE_QUEUE(startq);
 
 	/* Allocate and initialise the netdev */
-	nn = nfp_net_netdev_alloc(pdev, max_tx_rings, max_rx_rings);
+	nn = nfp_net_alloc(pdev, max_tx_rings, max_rx_rings);
 	if (IS_ERR(nn)) {
 		err = PTR_ERR(nn);
 		goto err_ctrl_unmap;
@@ -283,7 +283,7 @@ static int nfp_netvf_pci_probe(struct pci_dev *pdev,
 	 */
 	nn->me_freq_mhz = 1200;
 
-	err = nfp_net_netdev_init(nn->dp.netdev);
+	err = nfp_net_init(nn);
 	if (err)
 		goto err_irqs_disable;
 
@@ -304,7 +304,7 @@ static int nfp_netvf_pci_probe(struct pci_dev *pdev,
 	else
 		iounmap(vf->q_bar);
 err_netdev_free:
-	nfp_net_netdev_free(nn);
+	nfp_net_free(nn);
 err_ctrl_unmap:
 	iounmap(ctrl_bar);
 err_pci_regions:
@@ -328,7 +328,7 @@ static void nfp_netvf_pci_remove(struct pci_dev *pdev)
 	nfp_net_debugfs_dir_clean(&nn->debugfs_dir);
 	nfp_net_debugfs_dir_clean(&vf->ddir);
 
-	nfp_net_netdev_clean(nn->dp.netdev);
+	nfp_net_clean(nn);
 
 	nfp_net_irqs_disable(pdev);
 
@@ -340,7 +340,7 @@ static void nfp_netvf_pci_remove(struct pci_dev *pdev)
 	}
 	iounmap(nn->dp.ctrl_bar);
 
-	nfp_net_netdev_free(nn);
+	nfp_net_free(nn);
 
 	pci_release_regions(pdev);
 	pci_disable_device(pdev);
-- 
2.11.0

^ permalink raw reply related

* [PATCH net-next v2 01/13] nfp: add nfp_cppcore_pcie_unit() helper
From: Jakub Kicinski @ 2017-05-22 17:59 UTC (permalink / raw)
  To: netdev; +Cc: oss-drivers, Simon Horman
In-Reply-To: <20170522175934.27447-1-jakub.kicinski@netronome.com>

From: Simon Horman <simon.horman@netronome.com>

Add nfp_cppcore_pcie_unit() helper to retrieve the PCIE unit of a CPP
handle and use the new helper as appropriate.

Signed-off-by: Simon Horman <simon.horman@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
---
 drivers/net/ethernet/netronome/nfp/nfp_net_main.c    | 16 ++++------------
 drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cpp.h | 11 +++++++++++
 2 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_main.c b/drivers/net/ethernet/netronome/nfp/nfp_net_main.c
index 8cb87cbe1120..16115973112c 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net_main.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net_main.c
@@ -190,15 +190,11 @@ nfp_net_find_port(struct nfp_eth_table *eth_tbl, unsigned int id)
 static unsigned int nfp_net_pf_get_num_ports(struct nfp_pf *pf)
 {
 	char name[256];
-	u16 interface;
-	int pcie_pf;
 	int err = 0;
 	u64 val;
 
-	interface = nfp_cpp_interface(pf->cpp);
-	pcie_pf = NFP_CPP_INTERFACE_UNIT_of(interface);
-
-	snprintf(name, sizeof(name), "nfd_cfg_pf%d_num_ports", pcie_pf);
+	snprintf(name, sizeof(name), "nfd_cfg_pf%u_num_ports",
+		 nfp_cppcore_pcie_unit(pf->cpp));
 
 	val = nfp_rtsym_read_le(pf->cpp, name, &err);
 	/* Default to one port */
@@ -241,13 +237,9 @@ static u8 __iomem *nfp_net_pf_map_ctrl_bar(struct nfp_pf *pf)
 	const struct nfp_rtsym *ctrl_sym;
 	u8 __iomem *ctrl_bar;
 	char pf_symbol[256];
-	u16 interface;
-	int pcie_pf;
-
-	interface = nfp_cpp_interface(pf->cpp);
-	pcie_pf = NFP_CPP_INTERFACE_UNIT_of(interface);
 
-	snprintf(pf_symbol, sizeof(pf_symbol), "_pf%d_net_bar0", pcie_pf);
+	snprintf(pf_symbol, sizeof(pf_symbol), "_pf%u_net_bar0",
+		 nfp_cppcore_pcie_unit(pf->cpp));
 
 	ctrl_sym = nfp_rtsym_lookup(pf->cpp, pf_symbol);
 	if (!ctrl_sym) {
diff --git a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cpp.h b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cpp.h
index edecc0a27485..154b0b594184 100644
--- a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cpp.h
+++ b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cpp.h
@@ -289,6 +289,17 @@ int nfp_cpp_mutex_lock(struct nfp_cpp_mutex *mutex);
 int nfp_cpp_mutex_unlock(struct nfp_cpp_mutex *mutex);
 int nfp_cpp_mutex_trylock(struct nfp_cpp_mutex *mutex);
 
+/**
+ * nfp_cppcore_pcie_unit() - Get PCI Unit of a CPP handle
+ * @cpp:	CPP handle
+ *
+ * Return: PCI unit for the NFP CPP handle
+ */
+static inline u8 nfp_cppcore_pcie_unit(struct nfp_cpp *cpp)
+{
+	return NFP_CPP_INTERFACE_UNIT_of(nfp_cpp_interface(cpp));
+}
+
 struct nfp_cpp_explicit;
 
 struct nfp_cpp_explicit_command {
-- 
2.11.0

^ permalink raw reply related

* [PATCH net-next v2 00/13] nfp: introduce nfp_port and nfp_app
From: Jakub Kicinski @ 2017-05-22 17:59 UTC (permalink / raw)
  To: netdev; +Cc: oss-drivers, Jakub Kicinski

Hi!

This series builds foundation for upcoming development.  So far the nfp
driver was focused on delivering basic NIC-like functionality.  We want
to switch gears a bit going forward and support more advanced applications.

First few patches are naming clean ups and reshuffling.  The two main 
structures this series adds are nfp_port and nfp_app.  

nfp_port represents a device port, where port can mean external port,
VF or PF.  For now only external port/MAC/PHY port is added.  nfp_port
is supposed to make it easy to share ethtool and devlink code regardless
of netdev type (full vNIC vs representors).

nfp_app is an abstraction which should allow easier development of new
applications.  So far we have relied fully on port capabilities to detect
which offloads and features are available.  The usual development model
for NFP is that people start with one of our "core NIC" FW apps (C one, 
or a macro assembler one) and build advanced functionality on top of that.
Therefore basic netdev code is shared, but the higher-level logic is 
usually more project specific.  The higher-level logic is also per-adapter
rather than per-port, so creating per-adapter control entity makes sense.
Hopefully the separation of lower-level netdev code and application logic
will help us limit interdependencies and accelerate parallel projects
(e.g. TC flower offloads vs eBPF offload).

v2:
 - don't hide definition of nfp_app to avoid silly function calls (Dave);
 - reorder kdoc of nfp_main (Simon);
 - make nfp_netdev_is_nfp_net() static inline as well.

Jakub Kicinski (12):
  nfp: make nfp_net alloc/init/cleanup/free not depend on netdevs
  nfp: rename netdev/port to vNIC
  nfp: add nfp_net_pf_free_vnic() function
  nfp: introduce very minimal nfp_app
  nfp: disallow mixing vNICs with and without NSP port entry
  nfp: introduce nfp_port
  nfp: update port state in place
  nfp: move refresh tracking into the port structure
  nfp: provide linking on port structures
  nfp: mark port state as stale after reconfig
  nfp: mark port state as stale if update failed
  nfp: refresh port state before reporting autonegotiation

Simon Horman (1):
  nfp: add nfp_cppcore_pcie_unit() helper

 drivers/net/ethernet/netronome/nfp/Makefile        |   4 +-
 drivers/net/ethernet/netronome/nfp/nfp_app.c       |  57 ++++
 drivers/net/ethernet/netronome/nfp/nfp_app.h       |  56 ++++
 drivers/net/ethernet/netronome/nfp/nfp_main.c      |   1 +
 drivers/net/ethernet/netronome/nfp/nfp_main.h      |  25 +-
 drivers/net/ethernet/netronome/nfp/nfp_net.h       |  44 +--
 .../net/ethernet/netronome/nfp/nfp_net_common.c    |  76 ++---
 .../net/ethernet/netronome/nfp/nfp_net_debugfs.c   |   4 +-
 .../net/ethernet/netronome/nfp/nfp_net_ethtool.c   |  62 ++--
 drivers/net/ethernet/netronome/nfp/nfp_net_main.c  | 346 ++++++++++++---------
 .../net/ethernet/netronome/nfp/nfp_netvf_main.c    |  14 +-
 drivers/net/ethernet/netronome/nfp/nfp_port.c      | 121 +++++++
 drivers/net/ethernet/netronome/nfp/nfp_port.h      | 102 ++++++
 .../net/ethernet/netronome/nfp/nfpcore/nfp_cpp.h   |  11 +
 14 files changed, 658 insertions(+), 265 deletions(-)
 create mode 100644 drivers/net/ethernet/netronome/nfp/nfp_app.c
 create mode 100644 drivers/net/ethernet/netronome/nfp/nfp_app.h
 create mode 100644 drivers/net/ethernet/netronome/nfp/nfp_port.c
 create mode 100644 drivers/net/ethernet/netronome/nfp/nfp_port.h

-- 
2.11.0

^ permalink raw reply

* Re: [PATCH net-next 01/11] qede: Fix sparse warnings
From: Mintz, Yuval @ 2017-05-22 17:44 UTC (permalink / raw)
  To: David Miller; +Cc: netdev@vger.kernel.org, Chopra, Manish
In-Reply-To: <20170522.125430.1296201768191613727.davem@davemloft.net>

> >> Please.
> >> 
> >> This is exactly the problem when such a terse commit message, or lack of any
> >> message at all as is the case here, occurs.
> >> 
> >> I have no idea what removing this method assignment has to do with fixing
> >> sparse warnings.
> > 
> > It's currently defined twice in the qede_dcbnl_ops struct -

> >Ok, so what's important is that you don't just post a patch with no
> commit message, just saying "sparse warning fixes."

> At a minimum, if you're too lazy to explain what exactly each thing
> is fixing, provide the sparse warnings you are eliminating in the
> commit message.

Well, this time it was intentional lazines; Thought it would have been
wasted reading. But sure, here it is:

drivers/net/ethernet/qlogic/qede/qede_fp.c:349:34: warning: invalid assignment: |=
drivers/net/ethernet/qlogic/qede/qede_fp.c:349:34:    left side has type restricted __le16
drivers/net/ethernet/qlogic/qede/qede_fp.c:349:34:    right side has type int
drivers/net/ethernet/qlogic/qede/qede_fp.c:1516:50: warning: invalid assignment: |=
drivers/net/ethernet/qlogic/qede/qede_fp.c:1516:50:    left side has type restricted __le16
drivers/net/ethernet/qlogic/qede/qede_fp.c:1516:50:    right side has type int
drivers/net/ethernet/qlogic/qede/qede_fp.c:1525:50: warning: invalid assignment: ^=
drivers/net/ethernet/qlogic/qede/qede_fp.c:1525:50:    left side has type restricted __le16
drivers/net/ethernet/qlogic/qede/qede_fp.c:1525:50:    right side has type int
drivers/net/ethernet/qlogic/qede/qede_fp.c:1590:42: warning: invalid assignment: |=
drivers/net/ethernet/qlogic/qede/qede_fp.c:1590:42:    left side has type restricted __le16
drivers/net/ethernet/qlogic/qede/qede_fp.c:1590:42:    right side has type unsigned int
drivers/net/ethernet/qlogic/qede/qede_ethtool.c:1315:34: warning: invalid assignment: |=
drivers/net/ethernet/qlogic/qede/qede_ethtool.c:1315:34:    left side has type restricted __le16
drivers/net/ethernet/qlogic/qede/qede_ethtool.c:1315:34:    right side has type int
drivers/net/ethernet/qlogic/qede/qede_ethtool.c:1330:13: warning: incorrect type in assignment (different base types)
drivers/net/ethernet/qlogic/qede/qede_ethtool.c:1330:13:    expected int [signed] [assigned] val
drivers/net/ethernet/qlogic/qede/qede_ethtool.c:1330:13:    got restricted __le16 [usertype] <noident>
drivers/net/ethernet/qlogic/qede/qede_ethtool.c:1331:33: warning: incorrect type in assignment (different base types)
drivers/net/ethernet/qlogic/qede/qede_ethtool.c:1331:33:    expected restricted __le16 [usertype] bd_prod
drivers/net/ethernet/qlogic/qede/qede_ethtool.c:1331:33:    got int [signed] [assigned] val
drivers/net/ethernet/qlogic/qede/qede_roce.c:224:29: warning: symbol 'qede_roce_get_free_event_node' was not declared. Should it be static?

Do you want us to re-spin the series with the updated commit message?

 

^ permalink raw reply

* Re: network performance degradation in virtio_net in 4.12-rc
From: Michael S. Tsirkin @ 2017-05-22 17:42 UTC (permalink / raw)
  To: Mikulas Patocka; +Cc: Jason Wang, kvm, virtualization, netdev
In-Reply-To: <alpine.LRH.2.02.1705221003450.20076@file01.intranet.prod.int.rdu2.redhat.com>

On Mon, May 22, 2017 at 10:25:19AM -0400, Mikulas Patocka wrote:
> Hi
> 
> I see severe network performance degradation with the kernels 4.12-rc1 and 
> 4.12-rc2 in the network virtio driver. Download rate drops down to about 
> 100kB/s.
> 
> I bisected it and it is caused by patch 
> d85b758f72b05a774045545f24d70980e3e9aac4 ("virtio_net: fix support for 
> small rings"). When I revert this patch, the problem goes away.
> 
> The host is Debian Jessie with kernel 4.4.62, the guest is Debian Sid with 
> kernel 4.12-rc.
> 
> Mikulas

Thanks for the report!
I'm not sure what causes it on this host. I'll try to reproduce.
Meanwhile, could you please locate this line of code:
+               vi->rq[i].min_buf_len = mergeable_min_buf_len(vi, vi->rq[i].vq);

and add something like
	printk(KERN_ERR, "min buf = 0x%x expected 0x%x size 0x%x big %d\n",
	       vi->rq[i].min_buf_len, GOOD_PACKET_LEN,
	       virtqueue_get_vring_size(vi->rq[i].vq),
	       (int)vi->big_packets);

after it?
Then boot and capture the output.

Thanks!

-- 
MST

^ permalink raw reply

* Re: New Coverity defect in BPF verifier
From: Stephen Hemminger @ 2017-05-22 17:26 UTC (permalink / raw)
  To: David Miller; +Cc: netdev
In-Reply-To: <20170522.121604.2157216252893063658.davem@davemloft.net>

On Mon, 22 May 2017 12:16:04 -0400 (EDT)
David Miller <davem@davemloft.net> wrote:

> Stephen, if you had even lightly scanned netdev today, you can see
> that we are discussing this already and there are at least two
> patches proposed.
> 
> Thank you.

Sorry hadn't gotten that far. Doing full scan of 100's of messages
a day is not always possible.

^ permalink raw reply

* Re: [PATCH 2/2] Add missing <sys/types.h> include
From: Stephen Hemminger @ 2017-05-22 17:24 UTC (permalink / raw)
  To: Baruch Siach; +Cc: netdev, Thomas Petazzoni
In-Reply-To: <5cdba9c8dc972d25219517ade6129faf73f459b3.1495459674.git.baruch@tkos.co.il>

On Mon, 22 May 2017 16:27:54 +0300
Baruch Siach <baruch@tkos.co.il> wrote:

> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> The u_intXX_t types are defined in <sys/types.h>, so it should be
> included before using those types. Otherwise, with certain C
> libraries, the build fails with:
> 
> In file included from ../include/iptables.h:4:0,
>                  from m_ipt.c:18:
> ../include/iptables_common.h:47:16: error: unknown type name ‘u_int32_t’
>  #define __le32 u_int32_t
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
>  include/iptables_common.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/iptables_common.h b/include/iptables_common.h
> index 9099667ffa6d..2c27a4b61fcd 100644
> --- a/include/iptables_common.h
> +++ b/include/iptables_common.h
> @@ -43,6 +43,8 @@ extern char *lib_dir;
>    extern void init_extensions(void);
>  #endif
>  
> +#include <sys/types.h>
> +
>  #define __be32	u_int32_t
>  #define __le32	u_int32_t
>  #define __be16	u_int16_t

This include file comes from netfilter, so not going to change it in iproute2 repo.

^ permalink raw reply

* Re: [PATCH 1/3] stmmac: pci: Overcome stmmac_pci_info structure
From: Andy Shevchenko @ 2017-05-22 17:09 UTC (permalink / raw)
  To: Jan Kiszka
  Cc: Giuseppe Cavallaro, Alexandre Torgue, David Miller, netdev,
	linux-kernel@vger.kernel.org
In-Reply-To: <5d7b7aa99a04e86196ff7eea11f0ede7a95deac1.1495451529.git.jan.kiszka@siemens.com>

On Mon, May 22, 2017 at 2:12 PM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> First, pass the PCI device reference as function parameter. Then the
> setup function knows which stmmac_pci_dmi_data structure to use.
> Finally, we are left with a setup function in stmmac_pci_info and can
> convert the structure into a function pointer. By converting
> stmmac_default_data to that type, we can make a setup function
> mandatory, and probing becomes more regular.

I don't see any good reason for this patch. Besides that it will not
compile (as David noticed already).

Can we modify structures with less intrusion?
I'm pretty sure we can convert (if you wish, however I would leave it
for now, there is no issue with current approach) with as twice less
lines.


-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply

* Re: [RFC net-next PATCH 3/5] net: introduce XDP driver features interface
From: Daniel Borkmann @ 2017-05-22 17:07 UTC (permalink / raw)
  To: Jesper Dangaard Brouer; +Cc: Daniel Borkmann, Alexei Starovoitov, netdev
In-Reply-To: <20170522164958.52fb3b3d@redhat.com>

On 05/22/2017 04:49 PM, Jesper Dangaard Brouer wrote:
> On Sun, 21 May 2017 02:58:19 +0200
> Daniel Borkmann <daniel@iogearbox.net> wrote:
>> On 05/20/2017 09:53 AM, Jesper Dangaard Brouer wrote:
>>> On Fri, 19 May 2017 19:13:29 +0200
>>> Daniel Borkmann <daniel@iogearbox.net> wrote:
>>>> On 05/18/2017 05:41 PM, Jesper Dangaard Brouer wrote:
>>>>> There is a fundamental difference between normal eBPF programs
>>>>> and (XDP) eBPF programs getting attached in a driver. For normal
>>>>> eBPF programs it is easy to add a new bpf feature, like a bpf
>>>>> helper, because is it strongly tied to the feature being
>>>>> available in the current core kernel code.  When drivers invoke a
>>>>> bpf_prog, then it is not sufficient to simply relying on whether
>>>>> a bpf_helper exists or not.  When a driver haven't implemented a
>>>>> given feature yet, then it is possible to expose uninitialized
>>>>> parts of xdp_buff.  The driver pass in a pointer to xdp_buff,
>>>>> usually "allocated" on the stack, which must not be exposed.
>>>>
>>>> When xdp_buff is being extended, then we should at least zero
>>>> initialize all in-tree users that don't support or populate this
>>>> field, thus that it's not uninitialized memory. Better would be
>>>> to have a way to reject the prog in the first place until it's
>>>> implemented (but further comments on feature bits below).
>>>
>>> Going down a path where we need to zero out the xdp_buff looks a lot
>>> like the sk_buff zeroing, which is the top perf cost associated with
>>> SKBs see[1].  XDP is is about not repeating the same issue we had with
>>> the SKB...
>>
>> But if we agree on implementing a certain feature that requires to
>> add a new member, then basic requirement should be that it needs to
>> be implementable by all XDP enabled drivers, so that users eventually
>> don't need to worry which driver they run to access a XDP feature.
>> In that case, zeroing that member until it gets properly implemented
>> is just temporary (and could be an incentive perhaps).
>>
>>> [1] https://prototype-kernel.readthedocs.io/en/latest/blogposts/xdp25_eval_generic_xdp_tx.html#analyzing-build-skb-and-memset
>>>
>>>>> Only two user visible NETIF_F_XDP_* net_device feature flags are
>>>>> exposed via ethtool (-k) seen as "xdp" and "xdp-partial".
>>>>> The "xdp-partial" is detected when there is not feature equality
>>>>> between kernel and driver, and a netdev_warn is given.
>>>>
>>>> I think having something like a NETIF_F_XDP_BIT for ethtool to
>>>> indicate support as "xdp" is quite useful. Avoids having to grep
>>>> the kernel tree for ndo_xdp callback. ;) A "xdp-partial" would
>>>> still be unclear/confusing to the user whether his program loads
>>>> or doesn't which is the only thing a user (or some loading infra)
>>>> cares about eventually, so one still needs to go trying to load
>>>> the XDP code to see whether that fails for the native case.
>>>
>>> Good that we agree on usefulness of the NETIF_F_XDP_BIT.  The
>>> "xdp-partial" or "xdp-challenged" is an early indication to the user
>>> that they should complain to the vendor.  I tried to keep it simple
>>> towards the user. Do you think every feature bit should be exposed to
>>> userspace?
>>
>> That would potentially require us to go down that path and expose
>> feature bits for everything, even something as silly as new flags
>> for a specific helper that requires some sort of additional support.
>> We probably rather want to keep such thing in the kernel for now
>> and potentially reject loads instead.
>>
>>>>> The idea is that XDP_DRV_* feature bits define a contract between
>>>>> the driver and the kernel, giving a reliable way to know that XDP
>>>>> features a driver promised to implement. Thus, knowing what bpf
>>>>> side features are safe to allow.
>>>>>
>>>>> There are 3 levels of features: "required", "devel" and "optional".
>>>>>
>>>>> The motivation is pushing driver vendors forward to support all
>>>>> the new XDP features.  Once a given feature bit is moved into
>>>>> the "required" features, the kernel will reject loading XDP
>>>>> program if feature isn't implemented by driver.  Features under
>>>>> developement, require help from the bpf infrastrucure to detect
>>>>> when a given helper or direct-access is used, using a bpf_prog
>>>>> bit to mark a need for the feature, and pulling in this bit in
>>>>> the xdp_features_check().  When all drivers have implemented
>>>>> a "devel" feature, it can be moved to the "required" feature and
>>>>
>>>> The problem is that once you add bits markers to bpf_prog like we
>>>> used to do in the past, then as you do in patch 4/5 with the
>>>> xdp_rxhash_needed bit, they will need to be turned /on/ unconditionally
>>>> when a prog has tail calls.
>>>
>>> Yes, with tail calls, we have to enable all features.  But that is a
>>> good thing, as it forces vendors to quickly implement all features.
>>> And it is no different from moving a feature into the "required" bits,
>>> once all drivers implement it.  It is only a limitation for tail calls,
>>> and something we can fix later (for handling this for tail calls).
>>
>> But the issue I pointed out with this approach is that XDP programs
>> using tail calls will suddenly break and get rejected from one
>> version to another.
>>
>> That's basically breaking the contract we have today where it must
>> be guaranteed that older programs keep working on newer kernels,
>> exactly the same with uapi. Breaking user programs is a no-go,
>> not a good thing at all (it will hurt users and they move on with
>> something else). So it's not something we can 'fix' at some later
>> point in time; such feature detection would need to consider this
>> from day 1.
>
> This is a very good point Daniel, that older program should be able to
> run. But this will only happen when tail calls are in-use, and NIC
> vendors don't keep their drivers up-to-date.  Creating a strong
> incentive for drivers implementing all XDP features (which you have
> argue for). Still I see your point.

The issue is that such chaining model as presented in [1] might be
quite typical in deployments.

Another strong argument for using tail calls is that when drivers
still don't support atomic updates of BPF programs. Usually a config
reload is needed when transitioning from no XDP -> XDP and XDP -> no XDP
mode, respectively, but not from XDP -> XDP. Last time I checked however,
there are drivers like qede, that would always do a reconfig. So for
that case having an init prog that then just tail calls into a main
prog would help as well as a work-around until driver finally supports
this.

All in all, I'm trying to say that tail calls are not a niche function
and we shouldn't have such window that when a feature update doesn't
make it in time, things not using the feature break.

   [1] slide 11, http://netdevconf.org/2.1/slides/apr6/zhou-netdev-xdp-2017.pdf

>>> BPF have some nice features of evaluating the input program
>>> "load-time", which is what I'm taking advantage of as an optimization
>>> here (let use this nice bpf property).   It is only tail calls that
>>> cannot evaluate this "load-time".  Thus, if you care about tail calls,
>>> supporting intermediate features, we could later fix that by adding a
>>> runtime feature check in the case of tail calls.
>
> How do we move forward from here?

If we introduce such feature bits one day, one possibility I see
that more or less could work is to propagate this into tail call
maps in a similar way like we do today with bpf_prog_array_compatible().
Latter checks the prog type and whether a prog was jited, as both
really cannot be mixed among each other.

So, once you load the program, either we somehow need to tell the
verifier upfront about our requirements, or the verifier detects
them based on the programs that are loaded (not sure about this
one though), and besides prog, it needs to mark the tail call map
with the same mask, such that any programs added later on to this
tail call map are guaranteed to use the same set of features or
just a subset of them. This also means that later updates cannot
use features outside of this set anymore (even if the driver could
support it). Then, the 'root' program which is to be attached to
the device can check against the driver's capabilities eventually,
since any program reachable from the root program would be guaranteed
to not use features outside of this set.

Still big question-mark wrt exposing these feature bits, and how
the set would be determined eventually, e.g. the loader would somehow
need to transparently calc the superset of features based on all
progs residing in the object file, and then pass them into the kernel
on prog load, where verifier checks them against the prog and if the
prog makes use of the same set or a subset, then we mark it and related
maps with the superset.

Just a quick thought, probably we can come up with something better.
The ugly bit is that we would expose bits for each silly thing and
need to determine them in the loader, which gets messy very quickly,
we should try hard to avoid that in the first place.

I guess would we add something similar like xdp_adjust_head() in
the future we might just add a uapi hidden dev pointer along which
we then access from the kernel's struct xdp_buff representation
inside the helper and bail out with an error should the device not
support it. And once we have all devices supporting it, we'd remove
it again, so that we wouldn't need such huge complexity with feature
bits.

> Let me try to restate the problem: There is a general disconnect
> between bpf and what XDP drivers support.
>
> The bpf model (AFAIK) is that your bpf program will get rejected when
> loading your bpf_prog.  This happens if you are using a bpf_helper or
> direct-ctx-access which is not supported/avail in the kernel. Right??
> (This also happens for tail-call programs, right?)  (I do like this
> model of failing the program when the feature is not avail).
>
> I guess, new bpf features are discovered by looking at uapi/bpf.h and
> then try to use the feature, and see if your program loads.
>
> The disconnect is that when writing XDP-bpf programs, then you will
> not get any feedback when you are calling a bpf-helper that the XDP
> driver doesn't support.  The XDP bpf-program loads and can happily run
> calling core-kernel XDP helpers.  Now, how will the XDP program author
> know that his call to the helper is valid?
>
> For rxhash, we could init the fields to zero (in drivers not
> supporting it), but how will the XDP bpf_prog author know whether or
> not a NIC driver supports XDP-rxhash?  (I guess, he could write a XDP
> program, that sets the XDP software hash, and then add a match via TC
> meta match or another cls_bpf program that read the skb->hash value,
> to see if changing the rxhash works... it seem clumpsy)
>
> For xdp_adjust_head, it was even-worse, as a boundry check against
> data_end with e.g. zero is no boundry, and would allow unbounded
> memory access from the xdp.data_end pointer.  We actually have
> released kernels with this bug, which can be triggered with a bpf
> tail-call.
>
> I just did a quick check on linux-stable.git for v4.10.17 and it looks
> like commit c2002f983767 ("bpf: fix checking xdp_adjust_head on tail
> calls") is missing, meaning drivers nfp, mlx5, nfp and virtio_net is
> likely subject to the adjust_head unbounded memory access bug via tail
> calls. I really wish we had a reliable way of avoiding these kind of
> bpf vs. XDP-driver mismatches.

Yeah :/, I think we might need to pass these to 4.10 stable:

   c2002f983767 ("bpf: fix checking xdp_adjust_head on tail calls")
   6b1bb01bcc5b ("bpf: fix cb access in socket filter programs on tail calls")

^ permalink raw reply

* Re: [PATCH 0/3] stmmac: pci: Refactor DMI probing
From: Jan Kiszka @ 2017-05-22 17:06 UTC (permalink / raw)
  To: David Miller
  Cc: peppe.cavallaro, alexandre.torgue, netdev, linux-kernel,
	andy.shevchenko
In-Reply-To: <20170522.123555.2260863464877381826.davem@davemloft.net>

On 2017-05-22 18:35, David Miller wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> Date: Mon, 22 May 2017 13:12:06 +0200
> 
>> Some cleanups of the way we probe DMI platforms in the driver. Reduces
>> a bit of open-coding and makes the logic easier reusable for any
>> potential DMI platform != Quark.
>>
>> Tested on IOT2000 and Galileo Gen2.
> 
> This doesn't compile:
> 
> drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:285:3: error: initializer element is not computable at load time
>    (kernel_ulong_t)&stmmac_default_setup,
>    ^
> drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:285:3: note: (near initialization for ‘stmmac_id_table[0].class’)
> drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:289:3: error: initializer element is not computable at load time
>    (kernel_ulong_t)&stmmac_default_setup,
>    ^
> drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:289:3: note: (near initialization for ‘stmmac_id_table[1].class’)
> scripts/Makefile.build:302: recipe for target 'drivers/net/ethernet/stmicro/stmmac/stmmac_pci.o' failed
> make[5]: *** [drivers/net/ethernet/stmicro/stmmac/stmmac_pci.o] Error 1
> 

Hmm. Which arch is this?

Jan

^ permalink raw reply

* Re: arch: arm: bpf: Converting cBPF to eBPF for arm 32 bit
From: Shubham Bansal @ 2017-05-22 17:04 UTC (permalink / raw)
  To: Daniel Borkmann
  Cc: Kees Cook, David Miller, Mircea Gherzan, Network Development,
	kernel-hardening@lists.openwall.com,
	linux-arm-kernel@lists.infradead.org, ast
In-Reply-To: <5922E11C.4070307@iogearbox.net>

Hi Daniel,

Here are the benchmarks.

1) Interpreter:

[root@vexpress modules]# insmod test_bpf.ko
[   37.244999] test_bpf: #0 TAX jited:0 757 645 650 PASS
[   37.272577] test_bpf: #1 TXA jited:0 366 334 336 PASS
[   37.283507] test_bpf: #2 ADD_SUB_MUL_K jited:0 543 PASS
[   37.289542] test_bpf: #3 DIV_MOD_KX jited:0 1509 PASS
[   37.305374] test_bpf: #4 AND_OR_LSH_K jited:0 539 559 PASS
[   37.317209] test_bpf: #5 LD_IMM_0 jited:0 412 PASS
[   37.321820] test_bpf: #6 LD_IND jited:0 428 376 389 PASS
[   37.334327] test_bpf: #7 LD_ABS jited:0 509 405 358 PASS
[   37.350596] test_bpf: #8 LD_ABS_LL jited:0 542 783 PASS
[   37.364340] test_bpf: #9 LD_IND_LL jited:0 524 496 723 PASS
[   37.382352] test_bpf: #10 LD_ABS_NET jited:0 527 545 PASS
[   37.393642] test_bpf: #11 LD_IND_NET jited:0 650 495 647 PASS
[   37.412228] test_bpf: #12 LD_PKTTYPE jited:0 686 901 PASS
[   37.428818] test_bpf: #13 LD_MARK jited:0 305 291 PASS
[   37.435349] test_bpf: #14 LD_RXHASH jited:0 257 259 PASS
[   37.440850] test_bpf: #15 LD_QUEUE jited:0 255 254 PASS
[   37.446254] test_bpf: #16 LD_PROTOCOL jited:0 593 603 PASS
[   37.458570] test_bpf: #17 LD_VLAN_TAG jited:0 288 292 PASS
[   37.464821] test_bpf: #18 LD_VLAN_TAG_PRESENT jited:0 335 421 PASS
[   37.472817] test_bpf: #19 LD_IFINDEX jited:0 8568 606 PASS
[   37.565163] test_bpf: #20 LD_HATYPE jited:0 618 695 PASS
[   37.579457] test_bpf: #21 LD_CPU jited:0 1200 1172 PASS
[   37.604424] test_bpf: #22 LD_NLATTR jited:0 979 1124 PASS
[   37.626345] test_bpf: #23 LD_NLATTR_NEST jited:0 12232 3593 PASS
[   37.785251] test_bpf: #24 LD_PAYLOAD_OFF jited:0 3697 4834 PASS
[   37.871224] test_bpf: #25 LD_ANC_XOR jited:0 314 344 PASS
[   37.878210] test_bpf: #26 SPILL_FILL jited:0 757 850 903 PASS
[   37.903954] test_bpf: #27 JEQ jited:0 380 420 426 PASS
[   37.916756] test_bpf: #28 JGT jited:0 376 467 448 PASS
[   37.930276] test_bpf: #29 JGE jited:0 446 590 498 PASS
[   37.946729] test_bpf: #30 JSET jited:0 571 787 1003 PASS
[   37.970896] test_bpf: #31 tcpdump port 22 jited:0 358 1079 1190 PASS
[   37.997814] test_bpf: #32 tcpdump complex jited:0 319 1061 2324 PASS
[   38.035596] test_bpf: #33 RET_A jited:0 253 249 PASS
[   38.041262] test_bpf: #34 INT: ADD trivial jited:0 414 PASS
[   38.045777] test_bpf: #35 INT: MUL_X jited:0 336 PASS
[   38.049402] test_bpf: #36 INT: MUL_X2 jited:0 431 PASS
[   38.054178] test_bpf: #37 INT: MUL32_X jited:0 523 PASS
[   38.059902] test_bpf: #38 INT: ADD 64-bit jited:0 5263 PASS
[   38.113069] test_bpf: #39 INT: ADD 32-bit jited:0 4127 PASS
[   38.154754] test_bpf: #40 INT: SUB jited:0 4218 PASS
[   38.197294] test_bpf: #41 INT: XOR jited:0 2252 PASS
[   38.220159] test_bpf: #42 INT: MUL jited:0 1986 PASS
[   38.240410] test_bpf: #43 MOV REG64 jited:0 1103 PASS
[   38.251796] test_bpf: #44 MOV REG32 jited:0 1140 PASS
[   38.263614] test_bpf: #45 LD IMM64 jited:0 1182 PASS
[   38.276031] test_bpf: #46 INT: ALU MIX jited:0 1068 PASS
[   38.287319] test_bpf: #47 INT: shifts by register jited:0 1125 PASS
[   38.298913] test_bpf: #48 INT: DIV + ABS jited:0 570 850 PASS
[   38.313745] test_bpf: #49 INT: DIV by zero jited:0 350 305 PASS
[   38.320829] test_bpf: #50 check: missing ret PASS
[   38.321186] test_bpf: #51 check: div_k_0 PASS
[   38.321350] test_bpf: #52 check: unknown insn PASS
[   38.321492] test_bpf: #53 check: out of range spill/fill PASS
[   38.321665] test_bpf: #54 JUMPS + HOLES jited:0 863 PASS
[   38.330763] test_bpf: #55 check: RET X PASS
[   38.331060] test_bpf: #56 check: LDX + RET X PASS
[   38.331292] test_bpf: #57 M[]: alt STX + LDX jited:0 3990 PASS
[   38.373667] test_bpf: #58 M[]: full STX + full LDX jited:0 2819 PASS
[   38.410225] test_bpf: #59 check: SKF_AD_MAX PASS
[   38.410461] test_bpf: #60 LD [SKF_AD_OFF-1] jited:0 313 PASS
[   38.413785] test_bpf: #61 load 64-bit immediate jited:0 579 PASS
[   38.419764] test_bpf: #62 nmap reduced jited:0 1860 PASS
[   38.439016] test_bpf: #63 ALU_MOV_X: dst = 2 jited:0 249 PASS
[   38.441990] test_bpf: #64 ALU_MOV_X: dst = 4294967295 jited:0 264 PASS
[   38.445000] test_bpf: #65 ALU64_MOV_X: dst = 2 jited:0 229 PASS
[   38.447602] test_bpf: #66 ALU64_MOV_X: dst = 4294967295 jited:0 213 PASS
[   38.450011] test_bpf: #67 ALU_MOV_K: dst = 2 jited:0 167 PASS
[   38.451963] test_bpf: #68 ALU_MOV_K: dst = 4294967295 jited:0 149 PASS
[   38.453694] test_bpf: #69 ALU_MOV_K: 0x0000ffffffff0000 =
0x00000000ffffffff jited:0 358 PASS
[   38.457572] test_bpf: #70 ALU64_MOV_K: dst = 2 jited:0 158 PASS
[   38.459546] test_bpf: #71 ALU64_MOV_K: dst = 2147483647 jited:0 156 PASS
[   38.461364] test_bpf: #72 ALU64_OR_K: dst = 0x0 jited:0 306 PASS
[   38.464652] test_bpf: #73 ALU64_MOV_K: dst = -1 jited:0 327 PASS
[   38.468154] test_bpf: #74 ALU_ADD_X: 1 + 2 = 3 jited:0 212 PASS
[   38.470551] test_bpf: #75 ALU_ADD_X: 1 + 4294967294 = 4294967295
jited:0 231 PASS
[   38.473187] test_bpf: #76 ALU_ADD_X: 2 + 4294967294 = 0 jited:0 309 PASS
[   38.476618] test_bpf: #77 ALU64_ADD_X: 1 + 2 = 3 jited:0 280 PASS
[   38.479675] test_bpf: #78 ALU64_ADD_X: 1 + 4294967294 = 4294967295
jited:0 286 PASS
[   38.482755] test_bpf: #79 ALU64_ADD_X: 2 + 4294967294 = 4294967296
jited:0 460 PASS
[   38.487670] test_bpf: #80 ALU_ADD_K: 1 + 2 = 3 jited:0 210 PASS
[   38.490042] test_bpf: #81 ALU_ADD_K: 3 + 0 = 3 jited:0 208 PASS
[   38.492331] test_bpf: #82 ALU_ADD_K: 1 + 4294967294 = 4294967295
jited:0 205 PASS
[   38.494604] test_bpf: #83 ALU_ADD_K: 4294967294 + 2 = 0 jited:0 323 PASS
[   38.498071] test_bpf: #84 ALU_ADD_K: 0 + (-1) = 0x00000000ffffffff
jited:0 338 PASS
[   38.501674] test_bpf: #85 ALU_ADD_K: 0 + 0xffff = 0xffff jited:0 347 PASS
[   38.505355] test_bpf: #86 ALU_ADD_K: 0 + 0x7fffffff = 0x7fffffff
jited:0 360 PASS
[   38.509197] test_bpf: #87 ALU_ADD_K: 0 + 0x80000000 = 0x80000000
jited:0 345 PASS
[   38.512873] test_bpf: #88 ALU_ADD_K: 0 + 0x80008000 = 0x80008000
jited:0 377 PASS
[   38.516924] test_bpf: #89 ALU64_ADD_K: 1 + 2 = 3 jited:0 184 PASS
[   38.519053] test_bpf: #90 ALU64_ADD_K: 3 + 0 = 3 jited:0 185 PASS
[   38.521246] test_bpf: #91 ALU64_ADD_K: 1 + 2147483646 = 2147483647
jited:0 186 PASS
[   38.523414] test_bpf: #92 ALU64_ADD_K: 4294967294 + 2 = 4294967296
jited:0 353 PASS
[   38.527276] test_bpf: #93 ALU64_ADD_K: 2147483646 + -2147483647 =
-1 jited:0 182 PASS
[   38.529353] test_bpf: #94 ALU64_ADD_K: 1 + 0 = 1 jited:0 311 PASS
[   38.532680] test_bpf: #95 ALU64_ADD_K: 0 + (-1) =
0xffffffffffffffff jited:0 339 PASS
[   38.536308] test_bpf: #96 ALU64_ADD_K: 0 + 0xffff = 0xffff jited:0 310 PASS
[   38.539652] test_bpf: #97 ALU64_ADD_K: 0 + 0x7fffffff = 0x7fffffff
jited:0 313 PASS
[   38.543022] test_bpf: #98 ALU64_ADD_K: 0 + 0x80000000 =
0xffffffff80000000 jited:0 340 PASS
[   38.546651] test_bpf: #99 ALU_ADD_K: 0 + 0x80008000 =
0xffffffff80008000 jited:0 311 PASS
[   38.549994] test_bpf: #100 ALU_SUB_X: 3 - 1 = 2 jited:0 213 PASS
[   38.552326] test_bpf: #101 ALU_SUB_X: 4294967295 - 4294967294 = 1
jited:0 212 PASS
[   38.554661] test_bpf: #102 ALU64_SUB_X: 3 - 1 = 2 jited:0 237 PASS
[   38.557278] test_bpf: #103 ALU64_SUB_X: 4294967295 - 4294967294 = 1
jited:0 221 PASS
[   38.559713] test_bpf: #104 ALU_SUB_K: 3 - 1 = 2 jited:0 177 PASS
[   38.561682] test_bpf: #105 ALU_SUB_K: 3 - 0 = 3 jited:0 179 PASS
[   38.563692] test_bpf: #106 ALU_SUB_K: 4294967295 - 4294967294 = 1
jited:0 195 PASS
[   38.565891] test_bpf: #107 ALU64_SUB_K: 3 - 1 = 2 jited:0 183 PASS
[   38.567926] test_bpf: #108 ALU64_SUB_K: 3 - 0 = 3 jited:0 177 PASS
[   38.569901] test_bpf: #109 ALU64_SUB_K: 4294967294 - 4294967295 =
-1 jited:0 181 PASS
[   38.571925] test_bpf: #110 ALU64_ADD_K: 2147483646 - 2147483647 =
-1 jited:0 177 PASS
[   38.573910] test_bpf: #111 ALU_MUL_X: 2 * 3 = 6 jited:0 241 PASS
[   38.576535] test_bpf: #112 ALU_MUL_X: 2 * 0x7FFFFFF8 = 0xFFFFFFF0
jited:0 220 PASS
[   38.578948] test_bpf: #113 ALU_MUL_X: -1 * -1 = 1 jited:0 224 PASS
[   38.581387] test_bpf: #114 ALU64_MUL_X: 2 * 3 = 6 jited:0 213 PASS
[   38.583715] test_bpf: #115 ALU64_MUL_X: 1 * 2147483647 = 2147483647
jited:0 230 PASS
[   38.586253] test_bpf: #116 ALU_MUL_K: 2 * 3 = 6 jited:0 191 PASS
[   38.588392] test_bpf: #117 ALU_MUL_K: 3 * 1 = 3 jited:0 189 PASS
[   38.590487] test_bpf: #118 ALU_MUL_K: 2 * 0x7FFFFFF8 = 0xFFFFFFF0
jited:0 192 PASS
[   38.592616] test_bpf: #119 ALU_MUL_K: 1 * (-1) = 0x00000000ffffffff
jited:0 333 PASS
[   38.596172] test_bpf: #120 ALU64_MUL_K: 2 * 3 = 6 jited:0 185 PASS
[   38.598224] test_bpf: #121 ALU64_MUL_K: 3 * 1 = 3 jited:0 185 PASS
[   38.600287] test_bpf: #122 ALU64_MUL_K: 1 * 2147483647 = 2147483647
jited:0 184 PASS
[   38.602369] test_bpf: #123 ALU64_MUL_K: 1 * -2147483647 =
-2147483647 jited:0 183 PASS
[   38.604421] test_bpf: #124 ALU64_MUL_K: 1 * (-1) =
0xffffffffffffffff jited:0 336 PASS
[   38.608002] test_bpf: #125 ALU_DIV_X: 6 / 2 = 3 jited:0 316 PASS
[   38.611394] test_bpf: #126 ALU_DIV_X: 4294967295 / 4294967295 = 1
jited:0 315 PASS
[   38.614753] test_bpf: #127 ALU64_DIV_X: 6 / 2 = 3 jited:0 439 PASS
[   38.619370] test_bpf: #128 ALU64_DIV_X: 2147483647 / 2147483647 = 1
jited:0 420 PASS
[   38.623844] test_bpf: #129 ALU64_DIV_X: 0xffffffffffffffff / (-1) =
0x0000000000000001 jited:0 604 PASS
[   38.630156] test_bpf: #130 ALU_DIV_K: 6 / 2 = 3 jited:0 249 PASS
[   38.632858] test_bpf: #131 ALU_DIV_K: 3 / 1 = 3 jited:0 240 PASS
[   38.635647] test_bpf: #132 ALU_DIV_K: 4294967295 / 4294967295 = 1
jited:0 254 PASS
[   38.638408] test_bpf: #133 ALU_DIV_K: 0xffffffffffffffff / (-1) =
0x1 jited:0 379 PASS
[   38.642450] test_bpf: #134 ALU64_DIV_K: 6 / 2 = 3 jited:0 346 PASS
[   38.646123] test_bpf: #135 ALU64_DIV_K: 3 / 1 = 3 jited:0 323 PASS
[   38.649558] test_bpf: #136 ALU64_DIV_K: 2147483647 / 2147483647 = 1
jited:0 329 PASS
[   38.653061] test_bpf: #137 ALU64_DIV_K: 0xffffffffffffffff / (-1) =
0x0000000000000001 jited:0 477 PASS
[   38.658065] test_bpf: #138 ALU_MOD_X: 3 % 2 = 1 jited:0 421 PASS
[   38.662580] test_bpf: #139 ALU_MOD_X: 4294967295 % 4294967293 = 2
jited:0 453 PASS
[   38.667414] test_bpf: #140 ALU64_MOD_X: 3 % 2 = 1 jited:0 553 PASS
[   38.673235] test_bpf: #141 ALU64_MOD_X: 2147483647 % 2147483645 = 2
jited:0 583 PASS
[   38.679343] test_bpf: #142 ALU_MOD_K: 3 % 2 = 1 jited:0 380 PASS
[   38.683374] test_bpf: #143 ALU_MOD_K: 3 % 1 = 0 jited:0 PASS
[   38.683586] test_bpf: #144 ALU_MOD_K: 4294967295 % 4294967293 = 2
jited:0 467 PASS
[   38.688672] test_bpf: #145 ALU64_MOD_K: 3 % 2 = 1 jited:0 492 PASS
[   38.694058] test_bpf: #146 ALU64_MOD_K: 3 % 1 = 0 jited:0 PASS
[   38.694359] test_bpf: #147 ALU64_MOD_K: 2147483647 % 2147483645 = 2
jited:0 571 PASS
[   38.700389] test_bpf: #148 ALU_AND_X: 3 & 2 = 2 jited:0 225 PASS
[   38.702952] test_bpf: #149 ALU_AND_X: 0xffffffff & 0xffffffff =
0xffffffff jited:0 261 PASS
[   38.705982] test_bpf: #150 ALU64_AND_X: 3 & 2 = 2 jited:0 273 PASS
[   38.709194] test_bpf: #151 ALU64_AND_X: 0xffffffff & 0xffffffff =
0xffffffff jited:0 251 PASS
[   38.712213] test_bpf: #152 ALU_AND_K: 3 & 2 = 2 jited:0 201 PASS
[   38.714638] test_bpf: #153 ALU_AND_K: 0xffffffff & 0xffffffff =
0xffffffff jited:0 240 PASS
[   38.717477] test_bpf: #154 ALU64_AND_K: 3 & 2 = 2 jited:0 209 PASS
[   38.720125] test_bpf: #155 ALU64_AND_K: 0xffffffff & 0xffffffff =
0xffffffff jited:0 319 PASS
[   38.724356] test_bpf: #156 ALU64_AND_K: 0x0000ffffffff0000 & 0x0 =
0x0000ffff00000000 jited:0 384 PASS
[   38.729293] test_bpf: #157 ALU64_AND_K: 0x0000ffffffff0000 & -1 =
0x0000ffffffffffff jited:0 367 PASS
[   38.733598] test_bpf: #158 ALU64_AND_K: 0xffffffffffffffff & -1 =
0xffffffffffffffff jited:0 375 PASS
[   38.737966] test_bpf: #159 ALU_OR_X: 1 | 2 = 3 jited:0 271 PASS
[   38.741274] test_bpf: #160 ALU_OR_X: 0x0 | 0xffffffff = 0xffffffff
jited:0 280 PASS
[   38.744653] test_bpf: #161 ALU64_OR_X: 1 | 2 = 3 jited:0 253 PASS
[   38.747717] test_bpf: #162 ALU64_OR_X: 0 | 0xffffffff = 0xffffffff
jited:0 263 PASS
[   38.750830] test_bpf: #163 ALU_OR_K: 1 | 2 = 3 jited:0 216 PASS
[   38.753357] test_bpf: #164 ALU_OR_K: 0 & 0xffffffff = 0xffffffff
jited:0 187 PASS
[   38.755553] test_bpf: #165 ALU64_OR_K: 1 | 2 = 3 jited:0 183 PASS
[   38.757693] test_bpf: #166 ALU64_OR_K: 0 & 0xffffffff = 0xffffffff
jited:0 195 PASS
[   38.759975] test_bpf: #167 ALU64_OR_K: 0x0000ffffffff0000 | 0x0 =
0x0000ffff00000000 jited:0 338 PASS
[   38.763728] test_bpf: #168 ALU64_OR_K: 0x0000ffffffff0000 | -1 =
0xffffffffffffffff jited:0 324 PASS
[   38.767311] test_bpf: #169 ALU64_OR_K: 0x000000000000000 | -1 =
0xffffffffffffffff jited:0 309 PASS
[   38.770633] test_bpf: #170 ALU_XOR_X: 5 ^ 6 = 3 jited:0 216 PASS
[   38.776135] test_bpf: #171 ALU_XOR_X: 0x1 ^ 0xffffffff = 0xfffffffe
jited:0 414 PASS
[   38.780950] test_bpf: #172 ALU64_XOR_X: 5 ^ 6 = 3 jited:0 320 PASS
[   38.784540] test_bpf: #173 ALU64_XOR_X: 1 ^ 0xffffffff = 0xfffffffe
jited:0 223 PASS
[   38.787037] test_bpf: #174 ALU_XOR_K: 5 ^ 6 = 3 jited:0 203 PASS
[   38.789359] test_bpf: #175 ALU_XOR_K: 1 ^ 0xffffffff = 0xfffffffe
jited:0 205 PASS
[   38.791707] test_bpf: #176 ALU64_XOR_K: 5 ^ 6 = 3 jited:0 205 PASS
[   38.794045] test_bpf: #177 ALU64_XOR_K: 1 & 0xffffffff = 0xfffffffe
jited:0 186 PASS
[   38.796180] test_bpf: #178 ALU64_XOR_K: 0x0000ffffffff0000 ^ 0x0 =
0x0000ffffffff0000 jited:0 352 PASS
[   38.800050] test_bpf: #179 ALU64_XOR_K: 0x0000ffffffff0000 ^ -1 =
0xffff00000000ffff jited:0 353 PASS
[   38.803970] test_bpf: #180 ALU64_XOR_K: 0x000000000000000 ^ -1 =
0xffffffffffffffff jited:0 362 PASS
[   38.808102] test_bpf: #181 ALU_LSH_X: 1 << 1 = 2 jited:0 211 PASS
[   38.810517] test_bpf: #182 ALU_LSH_X: 1 << 31 = 0x80000000 jited:0 216 PASS
[   38.812957] test_bpf: #183 ALU64_LSH_X: 1 << 1 = 2 jited:0 224 PASS
[   38.815480] test_bpf: #184 ALU64_LSH_X: 1 << 31 = 0x80000000 jited:0 223 PASS
[   38.818057] test_bpf: #185 ALU_LSH_K: 1 << 1 = 2 jited:0 208 PASS
[   38.820559] test_bpf: #186 ALU_LSH_K: 1 << 31 = 0x80000000 jited:0 210 PASS
[   38.823011] test_bpf: #187 ALU64_LSH_K: 1 << 1 = 2 jited:0 211 PASS
[   38.825737] test_bpf: #188 ALU64_LSH_K: 1 << 31 = 0x80000000 jited:0 182 PASS
[   38.828021] test_bpf: #189 ALU_RSH_X: 2 >> 1 = 1 jited:0 226 PASS
[   38.830655] test_bpf: #190 ALU_RSH_X: 0x80000000 >> 31 = 1 jited:0 225 PASS
[   38.833287] test_bpf: #191 ALU64_RSH_X: 2 >> 1 = 1 jited:0 289 PASS
[   38.836535] test_bpf: #192 ALU64_RSH_X: 0x80000000 >> 31 = 1 jited:0 253 PASS
[   38.839501] test_bpf: #193 ALU_RSH_K: 2 >> 1 = 1 jited:0 207 PASS
[   38.842025] test_bpf: #194 ALU_RSH_K: 0x80000000 >> 31 = 1 jited:0 210 PASS
[   38.844570] test_bpf: #195 ALU64_RSH_K: 2 >> 1 = 1 jited:0 232 PASS
[   38.847341] test_bpf: #196 ALU64_RSH_K: 0x80000000 >> 31 = 1 jited:0 208 PASS
[   38.849849] test_bpf: #197 ALU_ARSH_X: 0xff00ff0000000000 >> 40 =
0xffffffffffff00ff jited:0 252 PASS
[   38.852728] test_bpf: #198 ALU_ARSH_K: 0xff00ff0000000000 >> 40 =
0xffffffffffff00ff jited:0 197 PASS
[   38.855165] test_bpf: #199 ALU_NEG: -(3) = -3 jited:0 189 PASS
[   38.857410] test_bpf: #200 ALU_NEG: -(-3) = 3 jited:0 171 PASS
[   38.859380] test_bpf: #201 ALU64_NEG: -(3) = -3 jited:0 179 PASS
[   38.861411] test_bpf: #202 ALU64_NEG: -(-3) = 3 jited:0 180 PASS
[   38.863491] test_bpf: #203 ALU_END_FROM_BE 16: 0x0123456789abcdef
-> 0xcdef jited:0 202 PASS
[   38.865978] test_bpf: #204 ALU_END_FROM_BE 32: 0x0123456789abcdef
-> 0x89abcdef jited:0 368 PASS
[   38.869957] test_bpf: #205 ALU_END_FROM_BE 64: 0x0123456789abcdef
-> 0x89abcdef jited:0 244 PASS
[   38.872708] test_bpf: #206 ALU_END_FROM_LE 16: 0x0123456789abcdef
-> 0xefcd jited:0 274 PASS
[   38.875930] test_bpf: #207 ALU_END_FROM_LE 32: 0x0123456789abcdef
-> 0xefcdab89 jited:0 319 PASS
[   38.879417] test_bpf: #208 ALU_END_FROM_LE 64: 0x0123456789abcdef
-> 0x67452301 jited:0 193 PASS
[   38.881653] test_bpf: #209 ST_MEM_B: Store/Load byte: max negative
jited:0 219 PASS
[   38.884143] test_bpf: #210 ST_MEM_B: Store/Load byte: max positive
jited:0 227 PASS
[   38.886902] test_bpf: #211 STX_MEM_B: Store/Load byte: max negative
jited:0 251 PASS
[   38.889691] test_bpf: #212 ST_MEM_H: Store/Load half word: max
negative jited:0 218 PASS
[   38.892132] test_bpf: #213 ST_MEM_H: Store/Load half word: max
positive jited:0 208 PASS
[   38.894448] test_bpf: #214 STX_MEM_H: Store/Load half word: max
negative jited:0 259 PASS
[   38.897504] test_bpf: #215 ST_MEM_W: Store/Load word: max negative
jited:0 253 PASS
[   38.900355] test_bpf: #216 ST_MEM_W: Store/Load word: max positive
jited:0 244 PASS
[   38.903051] test_bpf: #217 STX_MEM_W: Store/Load word: max negative
jited:0 297 PASS
[   38.906372] test_bpf: #218 ST_MEM_DW: Store/Load double word: max
negative jited:0 257 PASS
[   38.909268] test_bpf: #219 ST_MEM_DW: Store/Load double word: max
negative 2 jited:0 392 PASS
[   38.913520] test_bpf: #220 ST_MEM_DW: Store/Load double word: max
positive jited:0 292 PASS
[   38.916792] test_bpf: #221 STX_MEM_DW: Store/Load double word: max
negative jited:0 259 PASS
[   38.919654] test_bpf: #222 STX_XADD_W: Test: 0x12 + 0x10 = 0x22
jited:0 262 PASS
[   38.922517] test_bpf: #223 STX_XADD_W: Test side-effects, r10: 0x12
+ 0x10 = 0x22 jited:0 PASS
[   38.922764] test_bpf: #224 STX_XADD_W: Test side-effects, r0: 0x12
+ 0x10 = 0x22 jited:0 221 PASS
[   38.925373] test_bpf: #225 STX_XADD_W: X + 1 + 1 + 1 + ... jited:0
142719 PASS
[   40.352892] test_bpf: #226 STX_XADD_DW: Test: 0x12 + 0x10 = 0x22
jited:0 345 PASS
[   40.356940] test_bpf: #227 STX_XADD_DW: Test side-effects, r10:
0x12 + 0x10 = 0x22 jited:0 PASS
[   40.357188] test_bpf: #228 STX_XADD_DW: Test side-effects, r0: 0x12
+ 0x10 = 0x22 jited:0 254 PASS
[   40.359954] test_bpf: #229 STX_XADD_DW: X + 1 + 1 + 1 + ... jited:0
349891 PASS
[   43.859287] test_bpf: #230 JMP_EXIT jited:0 127 PASS
[   43.861346] test_bpf: #231 JMP_JA: Unconditional jump: if (true)
return 1 jited:0 194 PASS
[   43.863538] test_bpf: #232 JMP_JSGT_K: Signed jump: if (-1 > -2)
return 1 jited:0 262 PASS
[   43.866400] test_bpf: #233 JMP_JSGT_K: Signed jump: if (-1 > -1)
return 0 jited:0 249 PASS
[   43.869132] test_bpf: #234 JMP_JSGE_K: Signed jump: if (-1 >= -2)
return 1 jited:0 262 PASS
[   43.872046] test_bpf: #235 JMP_JSGE_K: Signed jump: if (-1 >= -1)
return 1 jited:0 260 PASS
[   43.874890] test_bpf: #236 JMP_JGT_K: if (3 > 2) return 1 jited:0 260 PASS
[   43.877701] test_bpf: #237 JMP_JGT_K: Unsigned jump: if (-1 > 1)
return 1 jited:0 278 PASS
[   43.880801] test_bpf: #238 JMP_JGE_K: if (3 >= 2) return 1 jited:0 255 PASS
[   43.883637] test_bpf: #239 JMP_JGT_K: if (3 > 2) return 1 (jump
backwards) jited:0 321 PASS
[   43.887202] test_bpf: #240 JMP_JGE_K: if (3 >= 3) return 1 jited:0 340 PASS
[   43.891306] test_bpf: #241 JMP_JNE_K: if (3 != 2) return 1 jited:0 310 PASS
[   43.895036] test_bpf: #242 JMP_JEQ_K: if (3 == 3) return 1 jited:0 310 PASS
[   43.898963] test_bpf: #243 JMP_JSET_K: if (0x3 & 0x2) return 1
jited:0 276 PASS
[   43.902034] test_bpf: #244 JMP_JSET_K: if (0x3 & 0xffffffff) return
1 jited:0 312 PASS
[   43.905679] test_bpf: #245 JMP_JSGT_X: Signed jump: if (-1 > -2)
return 1 jited:0 346 PASS
[   43.909500] test_bpf: #246 JMP_JSGT_X: Signed jump: if (-1 > -1)
return 0 jited:0 292 PASS
[   43.912696] test_bpf: #247 JMP_JSGE_X: Signed jump: if (-1 >= -2)
return 1 jited:0 318 PASS
[   43.916115] test_bpf: #248 JMP_JSGE_X: Signed jump: if (-1 >= -1)
return 1 jited:0 287 PASS
[   43.919236] test_bpf: #249 JMP_JGT_X: if (3 > 2) return 1 jited:0 316 PASS
[   43.922749] test_bpf: #250 JMP_JGT_X: Unsigned jump: if (-1 > 1)
return 1 jited:0 400 PASS
[   43.927178] test_bpf: #251 JMP_JGE_X: if (3 >= 2) return 1 jited:0 287 PASS
[   43.930323] test_bpf: #252 JMP_JGE_X: if (3 >= 3) return 1 jited:0 287 PASS
[   43.933432] test_bpf: #253 JMP_JGE_X: ldimm64 test 1 jited:0 323 PASS
[   43.936912] test_bpf: #254 JMP_JGE_X: ldimm64 test 2 jited:0 298 PASS
[   43.940168] test_bpf: #255 JMP_JGE_X: ldimm64 test 3 jited:0 263 PASS
[   43.943062] test_bpf: #256 JMP_JNE_X: if (3 != 2) return 1 jited:0 313 PASS
[   43.946483] test_bpf: #257 JMP_JEQ_X: if (3 == 3) return 1 jited:0 308 PASS
[   43.949817] test_bpf: #258 JMP_JSET_X: if (0x3 & 0x2) return 1
jited:0 359 PASS
[   43.953715] test_bpf: #259 JMP_JSET_X: if (0x3 & 0xffffffff) return
1 jited:0 421 PASS
[   43.958350] test_bpf: #260 JMP_JA: Jump, gap, jump, ... jited:0 309 PASS
[   43.961783] test_bpf: #261 BPF_MAXINSNS: Maximum possible literals
jited:0 251 PASS
[   43.969019] test_bpf: #262 BPF_MAXINSNS: Single literal jited:0 286 PASS
[   43.976250] test_bpf: #263 BPF_MAXINSNS: Run/add until end jited:0
254969 PASS
[   46.530754] test_bpf: #264 BPF_MAXINSNS: Too many instructions PASS
[   46.531227] test_bpf: #265 BPF_MAXINSNS: Very long jump jited:0 284 PASS
[   46.538925] test_bpf: #266 BPF_MAXINSNS: Ctx heavy transformations
jited:0 548311 560800 PASS
[   57.635685] test_bpf: #267 BPF_MAXINSNS: Call heavy transformations
jited:0 949505 881276 PASS
[   75.951893] test_bpf: #268 BPF_MAXINSNS: Jump heavy test jited:0 480796 PASS
[   80.765143] test_bpf: #269 BPF_MAXINSNS: Very long jump backwards
jited:0 193 PASS
[   80.767750] test_bpf: #270 BPF_MAXINSNS: Edge hopping nuthouse
jited:0 114304 PASS
[   81.911103] test_bpf: #271 BPF_MAXINSNS: Jump, gap, jump, ...
jited:0 1884 PASS
[   81.935374] test_bpf: #272 BPF_MAXINSNS: ld_abs+get_processor_id
jited:0 546269 PASS
[   87.405760] test_bpf: #273 BPF_MAXINSNS: ld_abs+vlan_push/pop
jited:0 594906 PASS
[   93.356075] test_bpf: #274 LD_IND byte frag jited:0 695 PASS
[   93.364087] test_bpf: #275 LD_IND halfword frag jited:0 818 PASS
[   93.372861] test_bpf: #276 LD_IND word frag jited:0 837 PASS
[   93.381738] test_bpf: #277 LD_IND halfword mixed head/frag jited:0 1170 PASS
[   93.394096] test_bpf: #278 LD_IND word mixed head/frag jited:0 950 PASS
[   93.404149] test_bpf: #279 LD_ABS byte frag jited:0 953 PASS
[   93.414270] test_bpf: #280 LD_ABS halfword frag jited:0 754 PASS
[   93.422281] test_bpf: #281 LD_ABS word frag jited:0 1133 PASS
[   93.434166] test_bpf: #282 LD_ABS halfword mixed head/frag jited:0 1079 PASS
[   93.445353] test_bpf: #283 LD_ABS word mixed head/frag jited:0 718 PASS
[   93.452901] test_bpf: #284 LD_IND byte default X jited:0 297 PASS
[   93.456118] test_bpf: #285 LD_IND byte positive offset jited:0 300 PASS
[   93.459342] test_bpf: #286 LD_IND byte negative offset jited:0 296 PASS
[   93.462553] test_bpf: #287 LD_IND halfword positive offset jited:0 333 PASS
[   93.466116] test_bpf: #288 LD_IND halfword negative offset jited:0 306 PASS
[   93.469402] test_bpf: #289 LD_IND halfword unaligned jited:0 307 PASS
[   93.472711] test_bpf: #290 LD_IND word positive offset jited:0 337 PASS
[   93.476296] test_bpf: #291 LD_IND word negative offset jited:0 312 PASS
[   93.479676] test_bpf: #292 LD_IND word unaligned (addr & 3 == 2)
jited:0 309 PASS
[   93.482987] test_bpf: #293 LD_IND word unaligned (addr & 3 == 1)
jited:0 335 PASS
[   93.486601] test_bpf: #294 LD_IND word unaligned (addr & 3 == 3)
jited:0 305 PASS
[   93.489878] test_bpf: #295 LD_ABS byte jited:0 269 PASS
[   93.492784] test_bpf: #296 LD_ABS halfword jited:0 294 PASS
[   93.495950] test_bpf: #297 LD_ABS halfword unaligned jited:0 271 PASS
[   93.498895] test_bpf: #298 LD_ABS word jited:0 265 PASS
[   93.501756] test_bpf: #299 LD_ABS word unaligned (addr & 3 == 2)
jited:0 267 PASS
[   93.504667] test_bpf: #300 LD_ABS word unaligned (addr & 3 == 1)
jited:0 269 PASS
[   93.507584] test_bpf: #301 LD_ABS word unaligned (addr & 3 == 3)
jited:0 281 PASS
[   93.510665] test_bpf: #302 ADD default X jited:0 296 PASS
[   93.513830] test_bpf: #303 ADD default A jited:0 309 PASS
[   93.517144] test_bpf: #304 SUB default X jited:0 290 PASS
[   93.520249] test_bpf: #305 SUB default A jited:0 252 PASS
[   93.522974] test_bpf: #306 MUL default X jited:0 322 PASS
[   93.526403] test_bpf: #307 MUL default A jited:0 267 PASS
[   93.529277] test_bpf: #308 DIV default X jited:0 293 PASS
[   93.532414] test_bpf: #309 DIV default A jited:0 336 PASS
[   93.535988] test_bpf: #310 MOD default X jited:0 284 PASS
[   93.539032] test_bpf: #311 MOD default A jited:0 435 PASS
[   93.543608] test_bpf: #312 JMP EQ default A jited:0 352 PASS
[   93.547355] test_bpf: #313 JMP EQ default X jited:0 357 PASS
[   93.551176] test_bpf: Summary: 314 PASSED, 0 FAILED, [0/306 JIT'ed]

2) JIT enabled

[root@vexpress modules]# insmod test_bpf.ko
[   53.785470] test_bpf: #0 TAX jited:1 234 171 195 PASS
[   53.794856] test_bpf: #1 TXA jited:1 81 79 77 PASS
[   53.803927] test_bpf: #2 ADD_SUB_MUL_K jited:1 89 PASS
[   53.805542] test_bpf: #3 DIV_MOD_KX jited:1 939 PASS
[   53.816227] test_bpf: #4 AND_OR_LSH_K jited:1 116 114 PASS
[   53.821088] test_bpf: #5 LD_IMM_0 jited:1 93 PASS
[   53.822900] test_bpf: #6 LD_IND jited:1 371 279 274 PASS
[   53.833030] test_bpf: #7 LD_ABS jited:1 408 402 272 PASS
[   53.844767] test_bpf: #8 LD_ABS_LL jited:1 387 346 PASS
[   53.852730] test_bpf: #9 LD_IND_LL jited:1 239 248 217 PASS
[   53.860410] test_bpf: #10 LD_ABS_NET jited:1 356 332 PASS
[   53.867897] test_bpf: #11 LD_IND_NET jited:1 223 212 320 PASS
[   53.876076] test_bpf: #12 LD_PKTTYPE jited:1 102 90 PASS
[   53.878660] test_bpf: #13 LD_MARK jited:1 80 80 PASS
[   53.880695] test_bpf: #14 LD_RXHASH jited:1 73 71 PASS
[   53.882488] test_bpf: #15 LD_QUEUE jited:1 120 121 PASS
[   53.885266] test_bpf: #16 LD_PROTOCOL jited:1 256 247 PASS
[   53.890918] test_bpf: #17 LD_VLAN_TAG jited:1 82 84 PASS
[   53.893002] test_bpf: #18 LD_VLAN_TAG_PRESENT jited:1 80 77 PASS
[   53.894946] test_bpf: #19 LD_IFINDEX jited:1 87 98 PASS
[   53.897261] test_bpf: #20 LD_HATYPE jited:1 95 90 PASS
[   53.899466] test_bpf: #21 LD_CPU
[   53.899663] bpf_jit: *** NOT YET: opcode 85 ***
[   53.899796] jited:0 722 837 PASS
[   53.915645] test_bpf: #22 LD_NLATTR jited:0 593 659 PASS
[   53.928662] test_bpf: #23 LD_NLATTR_NEST jited:0 2186 2964 PASS
[   53.980966] test_bpf: #24 LD_PAYLOAD_OFF jited:0 3891 5637 PASS
[   54.076878] test_bpf: #25 LD_ANC_XOR jited:1 86 100 PASS
[   54.079241] test_bpf: #26 SPILL_FILL jited:1 131 137 123 PASS
[   54.084092] test_bpf: #27 JEQ jited:1 266 189 216 PASS
[   54.091500] test_bpf: #28 JGT jited:1 301 211 192 PASS
[   54.099467] test_bpf: #29 JGE jited:1 191 200 223 PASS
[   54.106275] test_bpf: #30 JSET jited:1 211 210 214 PASS
[   54.113660] test_bpf: #31 tcpdump port 22 jited:1 314 722 711 PASS
[   54.131943] test_bpf: #32 tcpdump complex jited:1 291 707 1068 PASS
[   54.153409] test_bpf: #33 RET_A jited:1 83 88 PASS
[   54.155617] test_bpf: #34 INT: ADD trivial jited:1 162 PASS
[   54.158387] test_bpf: #35 INT: MUL_X jited:1 176 PASS
[   54.161075] test_bpf: #36 INT: MUL_X2 jited:1 84 PASS
[   54.162483] test_bpf: #37 INT: MUL32_X jited:1 99 PASS
[   54.163849] test_bpf: #38 INT: ADD 64-bit jited:1 1066 PASS
[   54.175468] test_bpf: #39 INT: ADD 32-bit jited:1 666 PASS
[   54.182860] test_bpf: #40 INT: SUB jited:1 3236 PASS
[   54.215932] test_bpf: #41 INT: XOR jited:1 308 PASS
[   54.219704] test_bpf: #42 INT: MUL jited:1 376 PASS
[   54.224452] test_bpf: #43 MOV REG64 jited:1 227 PASS
[   54.227383] test_bpf: #44 MOV REG32 jited:1 171 PASS
[   54.229618] test_bpf: #45 LD IMM64 jited:1 163 PASS
[   54.231875] test_bpf: #46 INT: ALU MIX jited:0 1277 PASS
[   54.245188] test_bpf: #47 INT: shifts by register jited:1 208 PASS
[   54.248151] test_bpf: #48 INT: DIV + ABS jited:1 659 601 PASS
[   54.261395] test_bpf: #49 INT: DIV by zero jited:1 317 169 PASS
[   54.266949] test_bpf: #50 check: missing ret PASS
[   54.267418] test_bpf: #51 check: div_k_0 PASS
[   54.267631] test_bpf: #52 check: unknown insn PASS
[   54.267804] test_bpf: #53 check: out of range spill/fill PASS
[   54.268008] test_bpf: #54 JUMPS + HOLES jited:1 358 PASS
[   54.272201] test_bpf: #55 check: RET X PASS
[   54.273054] test_bpf: #56 check: LDX + RET X PASS
[   54.273226] test_bpf: #57 M[]: alt STX + LDX jited:1 456 PASS
[   54.278359] test_bpf: #58 M[]: full STX + full LDX jited:1 438 PASS
[   54.283300] test_bpf: #59 check: SKF_AD_MAX PASS
[   54.283576] test_bpf: #60 LD [SKF_AD_OFF-1] jited:1 198 PASS
[   54.285812] test_bpf: #61 load 64-bit immediate jited:1 125 PASS
[   54.287556] test_bpf: #62 nmap reduced jited:1 1054 PASS
[   54.298630] test_bpf: #63 ALU_MOV_X: dst = 2 jited:1 81 PASS
[   54.300079] test_bpf: #64 ALU_MOV_X: dst = 4294967295 jited:1 85 PASS
[   54.301462] test_bpf: #65 ALU64_MOV_X: dst = 2 jited:1 96 PASS
[   54.303048] test_bpf: #66 ALU64_MOV_X: dst = 4294967295 jited:1 71 PASS
[   54.304115] test_bpf: #67 ALU_MOV_K: dst = 2 jited:1 70 PASS
[   54.305148] test_bpf: #68 ALU_MOV_K: dst = 4294967295 jited:1 71 PASS
[   54.306222] test_bpf: #69 ALU_MOV_K: 0x0000ffffffff0000 =
0x00000000ffffffff jited:1 97 PASS
[   54.307659] test_bpf: #70 ALU64_MOV_K: dst = 2 jited:1 75 PASS
[   54.308750] test_bpf: #71 ALU64_MOV_K: dst = 2147483647 jited:1 66 PASS
[   54.309773] test_bpf: #72 ALU64_OR_K: dst = 0x0 jited:1 92 PASS
[   54.311093] test_bpf: #73 ALU64_MOV_K: dst = -1 jited:1 94 PASS
[   54.312383] test_bpf: #74 ALU_ADD_X: 1 + 2 = 3 jited:1 66 PASS
[   54.313388] test_bpf: #75 ALU_ADD_X: 1 + 4294967294 = 4294967295
jited:1 66 PASS
[   54.314430] test_bpf: #76 ALU_ADD_X: 2 + 4294967294 = 0 jited:1 87 PASS
[   54.315756] test_bpf: #77 ALU64_ADD_X: 1 + 2 = 3 jited:1 77 PASS
[   54.316892] test_bpf: #78 ALU64_ADD_X: 1 + 4294967294 = 4294967295
jited:1 72 PASS
[   54.318015] test_bpf: #79 ALU64_ADD_X: 2 + 4294967294 = 4294967296
jited:1 79 PASS
[   54.319181] test_bpf: #80 ALU_ADD_K: 1 + 2 = 3 jited:1 75 PASS
[   54.320261] test_bpf: #81 ALU_ADD_K: 3 + 0 = 3 jited:1 71 PASS
[   54.321307] test_bpf: #82 ALU_ADD_K: 1 + 4294967294 = 4294967295
jited:1 67 PASS
[   54.322342] test_bpf: #83 ALU_ADD_K: 4294967294 + 2 = 0 jited:1 82 PASS
[   54.323600] test_bpf: #84 ALU_ADD_K: 0 + (-1) = 0x00000000ffffffff
jited:1 86 PASS
[   54.325898] test_bpf: #85 ALU_ADD_K: 0 + 0xffff = 0xffff jited:1 99 PASS
[   54.327242] test_bpf: #86 ALU_ADD_K: 0 + 0x7fffffff = 0x7fffffff
jited:1 113 PASS
[   54.328684] test_bpf: #87 ALU_ADD_K: 0 + 0x80000000 = 0x80000000
jited:1 123 PASS
[   54.330224] test_bpf: #88 ALU_ADD_K: 0 + 0x80008000 = 0x80008000
jited:1 85 PASS
[   54.331395] test_bpf: #89 ALU64_ADD_K: 1 + 2 = 3 jited:1 66 PASS
[   54.332375] test_bpf: #90 ALU64_ADD_K: 3 + 0 = 3 jited:1 66 PASS
[   54.333381] test_bpf: #91 ALU64_ADD_K: 1 + 2147483646 = 2147483647
jited:1 69 PASS
[   54.334397] test_bpf: #92 ALU64_ADD_K: 4294967294 + 2 = 4294967296
jited:1 109 PASS
[   54.335818] test_bpf: #93 ALU64_ADD_K: 2147483646 + -2147483647 =
-1 jited:1 72 PASS
[   54.336873] test_bpf: #94 ALU64_ADD_K: 1 + 0 = 1 jited:1 126 PASS
[   54.338484] test_bpf: #95 ALU64_ADD_K: 0 + (-1) =
0xffffffffffffffff jited:1 107 PASS
[   54.340100] test_bpf: #96 ALU64_ADD_K: 0 + 0xffff = 0xffff jited:1 98 PASS
[   54.341569] test_bpf: #97 ALU64_ADD_K: 0 + 0x7fffffff = 0x7fffffff
jited:1 87 PASS
[   54.342794] test_bpf: #98 ALU64_ADD_K: 0 + 0x80000000 =
0xffffffff80000000 jited:1 98 PASS
[   54.344142] test_bpf: #99 ALU_ADD_K: 0 + 0x80008000 =
0xffffffff80008000 jited:1 92 PASS
[   54.345399] test_bpf: #100 ALU_SUB_X: 3 - 1 = 2 jited:1 77 PASS
[   54.346726] test_bpf: #101 ALU_SUB_X: 4294967295 - 4294967294 = 1
jited:1 72 PASS
[   54.347794] test_bpf: #102 ALU64_SUB_X: 3 - 1 = 2 jited:1 72 PASS
[   54.348826] test_bpf: #103 ALU64_SUB_X: 4294967295 - 4294967294 = 1
jited:1 71 PASS
[   54.349843] test_bpf: #104 ALU_SUB_K: 3 - 1 = 2 jited:1 120 PASS
[   54.351486] test_bpf: #105 ALU_SUB_K: 3 - 0 = 3 jited:1 82 PASS
[   54.352814] test_bpf: #106 ALU_SUB_K: 4294967295 - 4294967294 = 1
jited:1 103 PASS
[   54.354550] test_bpf: #107 ALU64_SUB_K: 3 - 1 = 2 jited:1 140 PASS
[   54.356822] test_bpf: #108 ALU64_SUB_K: 3 - 0 = 3 jited:1 117 PASS
[   54.359156] test_bpf: #109 ALU64_SUB_K: 4294967294 - 4294967295 =
-1 jited:1 83 PASS
[   54.360401] test_bpf: #110 ALU64_ADD_K: 2147483646 - 2147483647 =
-1 jited:1 77 PASS
[   54.361515] test_bpf: #111 ALU_MUL_X: 2 * 3 = 6 jited:1 68 PASS
[   54.362528] test_bpf: #112 ALU_MUL_X: 2 * 0x7FFFFFF8 = 0xFFFFFFF0
jited:1 70 PASS
[   54.363572] test_bpf: #113 ALU_MUL_X: -1 * -1 = 1 jited:1 73 PASS
[   54.364644] test_bpf: #114 ALU64_MUL_X: 2 * 3 = 6 jited:1 70 PASS
[   54.365655] test_bpf: #115 ALU64_MUL_X: 1 * 2147483647 = 2147483647
jited:1 75 PASS
[   54.366719] test_bpf: #116 ALU_MUL_K: 2 * 3 = 6 jited:1 67 PASS
[   54.367707] test_bpf: #117 ALU_MUL_K: 3 * 1 = 3 jited:1 71 PASS
[   54.368726] test_bpf: #118 ALU_MUL_K: 2 * 0x7FFFFFF8 = 0xFFFFFFF0
jited:1 70 PASS
[   54.369733] test_bpf: #119 ALU_MUL_K: 1 * (-1) = 0x00000000ffffffff
jited:1 153 PASS
[   54.371617] test_bpf: #120 ALU64_MUL_K: 2 * 3 = 6 jited:1 101 PASS
[   54.373505] test_bpf: #121 ALU64_MUL_K: 3 * 1 = 3 jited:1 108 PASS
[   54.375362] test_bpf: #122 ALU64_MUL_K: 1 * 2147483647 = 2147483647
jited:1 106 PASS
[   54.377242] test_bpf: #123 ALU64_MUL_K: 1 * -2147483647 =
-2147483647 jited:1 92 PASS
[   54.379044] test_bpf: #124 ALU64_MUL_K: 1 * (-1) =
0xffffffffffffffff jited:1 122 PASS
[   54.380863] test_bpf: #125 ALU_DIV_X: 6 / 2 = 3 jited:1 220 PASS
[   54.383591] test_bpf: #126 ALU_DIV_X: 4294967295 / 4294967295 = 1
jited:1 208 PASS
[   54.386292] test_bpf: #127 ALU64_DIV_X: 6 / 2 = 3 jited:0 736 PASS
[   54.394242] test_bpf: #128 ALU64_DIV_X: 2147483647 / 2147483647 = 1
jited:0 464 PASS
[   54.399433] test_bpf: #129 ALU64_DIV_X: 0xffffffffffffffff / (-1) =
0x0000000000000001 jited:0 743 PASS
[   54.407799] test_bpf: #130 ALU_DIV_K: 6 / 2 = 3 jited:1 246 PASS
[   54.410964] test_bpf: #131 ALU_DIV_K: 3 / 1 = 3 jited:1 199 PASS
[   54.413410] test_bpf: #132 ALU_DIV_K: 4294967295 / 4294967295 = 1
jited:1 192 PASS
[   54.415782] test_bpf: #133 ALU_DIV_K: 0xffffffffffffffff / (-1) =
0x1 jited:1 215 PASS
[   54.418414] test_bpf: #134 ALU64_DIV_K: 6 / 2 = 3 jited:0 364 PASS
[   54.422379] test_bpf: #135 ALU64_DIV_K: 3 / 1 = 3 jited:0 369 PASS
[   54.426692] test_bpf: #136 ALU64_DIV_K: 2147483647 / 2147483647 = 1
jited:0 380 PASS
[   54.430875] test_bpf: #137 ALU64_DIV_K: 0xffffffffffffffff / (-1) =
0x0000000000000001 jited:0 623 PASS
[   54.437429] test_bpf: #138 ALU_MOD_X: 3 % 2 = 1 jited:1 235 PASS
[   54.440177] test_bpf: #139 ALU_MOD_X: 4294967295 % 4294967293 = 2
jited:1 262 PASS
[   54.443183] test_bpf: #140 ALU64_MOD_X: 3 % 2 = 1 jited:0 1524 PASS
[   54.458988] test_bpf: #141 ALU64_MOD_X: 2147483647 % 2147483645 = 2
jited:0 720 PASS
[   54.466677] test_bpf: #142 ALU_MOD_K: 3 % 2 = 1 jited:1 231 PASS
[   54.469383] test_bpf: #143 ALU_MOD_K: 3 % 1 = 0 jited:1 PASS
[   54.469685] test_bpf: #144 ALU_MOD_K: 4294967295 % 4294967293 = 2
jited:1 257 PASS
[   54.472650] test_bpf: #145 ALU64_MOD_K: 3 % 2 = 1 jited:0 481 PASS
[   54.477765] test_bpf: #146 ALU64_MOD_K: 3 % 1 = 0 jited:0 PASS
[   54.478042] test_bpf: #147 ALU64_MOD_K: 2147483647 % 2147483645 = 2
jited:0 513 PASS
[   54.483455] test_bpf: #148 ALU_AND_X: 3 & 2 = 2 jited:1 100 PASS
[   54.484786] test_bpf: #149 ALU_AND_X: 0xffffffff & 0xffffffff =
0xffffffff jited:1 106 PASS
[   54.486335] test_bpf: #150 ALU64_AND_X: 3 & 2 = 2 jited:1 86 PASS
[   54.487738] test_bpf: #151 ALU64_AND_X: 0xffffffff & 0xffffffff =
0xffffffff jited:1 118 PASS
[   54.489623] test_bpf: #152 ALU_AND_K: 3 & 2 = 2 jited:1 117 PASS
[   54.491645] test_bpf: #153 ALU_AND_K: 0xffffffff & 0xffffffff =
0xffffffff jited:1 72 PASS
[   54.493119] test_bpf: #154 ALU64_AND_K: 3 & 2 = 2 jited:1 72 PASS
[   54.494195] test_bpf: #155 ALU64_AND_K: 0xffffffff & 0xffffffff =
0xffffffff jited:1 70 PASS
[   54.495330] test_bpf: #156 ALU64_AND_K: 0x0000ffffffff0000 & 0x0 =
0x0000ffff00000000 jited:1 99 PASS
[   54.496721] test_bpf: #157 ALU64_AND_K: 0x0000ffffffff0000 & -1 =
0x0000ffffffffffff jited:1 97 PASS
[   54.498106] test_bpf: #158 ALU64_AND_K: 0xffffffffffffffff & -1 =
0xffffffffffffffff jited:1 86 PASS
[   54.499343] test_bpf: #159 ALU_OR_X: 1 | 2 = 3 jited:1 73 PASS
[   54.500447] test_bpf: #160 ALU_OR_X: 0x0 | 0xffffffff = 0xffffffff
jited:1 72 PASS
[   54.501546] test_bpf: #161 ALU64_OR_X: 1 | 2 = 3 jited:1 89 PASS
[   54.502779] test_bpf: #162 ALU64_OR_X: 0 | 0xffffffff = 0xffffffff
jited:1 91 PASS
[   54.504154] test_bpf: #163 ALU_OR_K: 1 | 2 = 3 jited:1 71 PASS
[   54.505223] test_bpf: #164 ALU_OR_K: 0 & 0xffffffff = 0xffffffff
jited:1 116 PASS
[   54.506916] test_bpf: #165 ALU64_OR_K: 1 | 2 = 3 jited:1 77 PASS
[   54.508328] test_bpf: #166 ALU64_OR_K: 0 & 0xffffffff = 0xffffffff
jited:1 80 PASS
[   54.509666] test_bpf: #167 ALU64_OR_K: 0x0000ffffffff0000 | 0x0 =
0x0000ffff00000000 jited:1 86 PASS
[   54.511012] test_bpf: #168 ALU64_OR_K: 0x0000ffffffff0000 | -1 =
0xffffffffffffffff jited:1 99 PASS
[   54.512432] test_bpf: #169 ALU64_OR_K: 0x000000000000000 | -1 =
0xffffffffffffffff jited:1 147 PASS
[   54.514401] test_bpf: #170 ALU_XOR_X: 5 ^ 6 = 3 jited:1 80 PASS
[   54.515668] test_bpf: #171 ALU_XOR_X: 0x1 ^ 0xffffffff = 0xfffffffe
jited:1 73 PASS
[   54.516794] test_bpf: #172 ALU64_XOR_X: 5 ^ 6 = 3 jited:1 71 PASS
[   54.517879] test_bpf: #173 ALU64_XOR_X: 1 ^ 0xffffffff = 0xfffffffe
jited:1 72 PASS
[   54.518998] test_bpf: #174 ALU_XOR_K: 5 ^ 6 = 3 jited:1 71 PASS
[   54.520120] test_bpf: #175 ALU_XOR_K: 1 ^ 0xffffffff = 0xfffffffe
jited:1 67 PASS
[   54.521181] test_bpf: #176 ALU64_XOR_K: 5 ^ 6 = 3 jited:1 70 PASS
[   54.522292] test_bpf: #177 ALU64_XOR_K: 1 & 0xffffffff = 0xfffffffe
jited:1 104 PASS
[   54.523741] test_bpf: #178 ALU64_XOR_K: 0x0000ffffffff0000 ^ 0x0 =
0x0000ffffffff0000 jited:1 96 PASS
[   54.525269] test_bpf: #179 ALU64_XOR_K: 0x0000ffffffff0000 ^ -1 =
0xffff00000000ffff jited:1 119 PASS
[   54.526875] test_bpf: #180 ALU64_XOR_K: 0x000000000000000 ^ -1 =
0xffffffffffffffff jited:1 116 PASS
[   54.528421] test_bpf: #181 ALU_LSH_X: 1 << 1 = 2 jited:1 100 PASS
[   54.529848] test_bpf: #182 ALU_LSH_X: 1 << 31 = 0x80000000 jited:1 73 PASS
[   54.530965] test_bpf: #183 ALU64_LSH_X: 1 << 1 = 2 jited:1 119 PASS
[   54.532667] test_bpf: #184 ALU64_LSH_X: 1 << 31 = 0x80000000 jited:1 110 PASS
[   54.534257] test_bpf: #185 ALU_LSH_K: 1 << 1 = 2 jited:1 147 PASS
[   54.536290] test_bpf: #186 ALU_LSH_K: 1 << 31 = 0x80000000 jited:1 116 PASS
[   54.538165] test_bpf: #187 ALU64_LSH_K: 1 << 1 = 2 jited:1 154 PASS
[   54.540668] test_bpf: #188 ALU64_LSH_K: 1 << 31 = 0x80000000 jited:1 92 PASS
[   54.542464] test_bpf: #189 ALU_RSH_X: 2 >> 1 = 1 jited:1 86 PASS
[   54.543937] test_bpf: #190 ALU_RSH_X: 0x80000000 >> 31 = 1 jited:1 148 PASS
[   54.545995] test_bpf: #191 ALU64_RSH_X: 2 >> 1 = 1 jited:1 108 PASS
[   54.547759] test_bpf: #192 ALU64_RSH_X: 0x80000000 >> 31 = 1 jited:1 96 PASS
[   54.549178] test_bpf: #193 ALU_RSH_K: 2 >> 1 = 1 jited:1 68 PASS
[   54.550175] test_bpf: #194 ALU_RSH_K: 0x80000000 >> 31 = 1 jited:1 74 PASS
[   54.551208] test_bpf: #195 ALU64_RSH_K: 2 >> 1 = 1 jited:1 66 PASS
[   54.552193] test_bpf: #196 ALU64_RSH_K: 0x80000000 >> 31 = 1 jited:1 95 PASS
[   54.553449] test_bpf: #197 ALU_ARSH_X: 0xff00ff0000000000 >> 40 =
0xffffffffffff00ff jited:1 74 PASS
[   54.554566] test_bpf: #198 ALU_ARSH_K: 0xff00ff0000000000 >> 40 =
0xffffffffffff00ff jited:1 96 PASS
[   54.555984] test_bpf: #199 ALU_NEG: -(3) = -3 jited:1 84 PASS
[   54.557335] test_bpf: #200 ALU_NEG: -(-3) = 3 jited:1 72 PASS
[   54.558442] test_bpf: #201 ALU64_NEG: -(3) = -3 jited:1 74 PASS
[   54.559596] test_bpf: #202 ALU64_NEG: -(-3) = 3 jited:1 68 PASS
[   54.560664] test_bpf: #203 ALU_END_FROM_BE 16: 0x0123456789abcdef
-> 0xcdef jited:1 74 PASS
[   54.561814] test_bpf: #204 ALU_END_FROM_BE 32: 0x0123456789abcdef
-> 0x89abcdef jited:1 101 PASS
[   54.563242] test_bpf: #205 ALU_END_FROM_BE 64: 0x0123456789abcdef
-> 0x89abcdef jited:1 93 PASS
[   54.564578] test_bpf: #206 ALU_END_FROM_LE 16: 0x0123456789abcdef
-> 0xefcd jited:1 73 PASS
[   54.565750] test_bpf: #207 ALU_END_FROM_LE 32: 0x0123456789abcdef
-> 0xefcdab89 jited:1 76 PASS
[   54.566879] test_bpf: #208 ALU_END_FROM_LE 64: 0x0123456789abcdef
-> 0x67452301 jited:1 78 PASS
[   54.568009] test_bpf: #209 ST_MEM_B: Store/Load byte: max negative
jited:1 72 PASS
[   54.569258] test_bpf: #210 ST_MEM_B: Store/Load byte: max positive
jited:1 79 PASS
[   54.570402] test_bpf: #211 STX_MEM_B: Store/Load byte: max negative
jited:1 79 PASS
[   54.571541] test_bpf: #212 ST_MEM_H: Store/Load half word: max
negative jited:1 81 PASS
[   54.572896] test_bpf: #213 ST_MEM_H: Store/Load half word: max
positive jited:1 100 PASS
[   54.574521] test_bpf: #214 STX_MEM_H: Store/Load half word: max
negative jited:1 110 PASS
[   54.576159] test_bpf: #215 ST_MEM_W: Store/Load word: max negative
jited:1 75 PASS
[   54.577570] test_bpf: #216 ST_MEM_W: Store/Load word: max positive
jited:1 89 PASS
[   54.579195] test_bpf: #217 STX_MEM_W: Store/Load word: max negative
jited:1 122 PASS
[   54.581267] test_bpf: #218 ST_MEM_DW: Store/Load double word: max
negative jited:1 85 PASS
[   54.582954] test_bpf: #219 ST_MEM_DW: Store/Load double word: max
negative 2 jited:1 123 PASS
[   54.584677] test_bpf: #220 ST_MEM_DW: Store/Load double word: max
positive jited:1 78 PASS
[   54.585879] test_bpf: #221 STX_MEM_DW: Store/Load double word: max
negative jited:1 85 PASS
[   54.587106] test_bpf: #222 STX_XADD_W: Test: 0x12 + 0x10 = 0x22
jited:0 328 PASS
[   54.590869] test_bpf: #223 STX_XADD_W: Test side-effects, r10: 0x12
+ 0x10 = 0x22 jited:0 PASS
[   54.591178] test_bpf: #224 STX_XADD_W: Test side-effects, r0: 0x12
+ 0x10 = 0x22 jited:0 285 PASS
[   54.594489] test_bpf: #225 STX_XADD_W: X + 1 + 1 + 1 + ... jited:0
158746 PASS
[   56.182499] test_bpf: #226 STX_XADD_DW: Test: 0x12 + 0x10 = 0x22
jited:0 343 PASS
[   56.186642] test_bpf: #227 STX_XADD_DW: Test side-effects, r10:
0x12 + 0x10 = 0x22 jited:0 PASS
[   56.186926] test_bpf: #228 STX_XADD_DW: Test side-effects, r0: 0x12
+ 0x10 = 0x22 jited:0 272 PASS
[   56.190021] test_bpf: #229 STX_XADD_DW: X + 1 + 1 + 1 + ... jited:0
194997 PASS
[   58.140569] test_bpf: #230 JMP_EXIT jited:1 82 PASS
[   58.142427] test_bpf: #231 JMP_JA: Unconditional jump: if (true)
return 1 jited:1 86 PASS
[   58.155637] test_bpf: #232 JMP_JSGT_K: Signed jump: if (-1 > -2)
return 1 jited:1 86 PASS
[   58.157334] test_bpf: #233 JMP_JSGT_K: Signed jump: if (-1 > -1)
return 0 jited:1 82 PASS
[   58.158533] test_bpf: #234 JMP_JSGE_K: Signed jump: if (-1 >= -2)
return 1 jited:1 72 PASS
[   58.159560] test_bpf: #235 JMP_JSGE_K: Signed jump: if (-1 >= -1)
return 1 jited:1 73 PASS
[   58.160538] test_bpf: #236 JMP_JGT_K: if (3 > 2) return 1 jited:1 71 PASS
[   58.161457] test_bpf: #237 JMP_JGT_K: Unsigned jump: if (-1 > 1)
return 1 jited:1 72 PASS
[   58.162407] test_bpf: #238 JMP_JGE_K: if (3 >= 2) return 1 jited:1 77 PASS
[   58.163411] test_bpf: #239 JMP_JGT_K: if (3 > 2) return 1 (jump
backwards) jited:1 76 PASS
[   58.164416] test_bpf: #240 JMP_JGE_K: if (3 >= 3) return 1 jited:1 74 PASS
[   58.165391] test_bpf: #241 JMP_JNE_K: if (3 != 2) return 1 jited:1 74 PASS
[   58.166375] test_bpf: #242 JMP_JEQ_K: if (3 == 3) return 1 jited:1 78 PASS
[   58.167382] test_bpf: #243 JMP_JSET_K: if (0x3 & 0x2) return 1
jited:1 109 PASS
[   58.168822] test_bpf: #244 JMP_JSET_K: if (0x3 & 0xffffffff) return
1 jited:1 71 PASS
[   58.170396] test_bpf: #245 JMP_JSGT_X: Signed jump: if (-1 > -2)
return 1 jited:1 75 PASS
[   58.171568] test_bpf: #246 JMP_JSGT_X: Signed jump: if (-1 > -1)
return 0 jited:1 78 PASS
[   58.172804] test_bpf: #247 JMP_JSGE_X: Signed jump: if (-1 >= -2)
return 1 jited:1 134 PASS
[   58.175486] test_bpf: #248 JMP_JSGE_X: Signed jump: if (-1 >= -1)
return 1 jited:1 102 PASS
[   58.177403] test_bpf: #249 JMP_JGT_X: if (3 > 2) return 1 jited:1 83 PASS
[   58.178806] test_bpf: #250 JMP_JGT_X: Unsigned jump: if (-1 > 1)
return 1 jited:1 80 PASS
[   58.180104] test_bpf: #251 JMP_JGE_X: if (3 >= 2) return 1 jited:1 78 PASS
[   58.181230] test_bpf: #252 JMP_JGE_X: if (3 >= 3) return 1 jited:1 116 PASS
[   58.182751] test_bpf: #253 JMP_JGE_X: ldimm64 test 1 jited:1 81 PASS
[   58.183951] test_bpf: #254 JMP_JGE_X: ldimm64 test 2 jited:1 79 PASS
[   58.185334] test_bpf: #255 JMP_JGE_X: ldimm64 test 3 jited:1 78 PASS
[   58.186505] test_bpf: #256 JMP_JNE_X: if (3 != 2) return 1 jited:1 108 PASS
[   58.187991] test_bpf: #257 JMP_JEQ_X: if (3 == 3) return 1 jited:1 102 PASS
[   58.189496] test_bpf: #258 JMP_JSET_X: if (0x3 & 0x2) return 1
jited:1 133 PASS
[   58.191644] test_bpf: #259 JMP_JSET_X: if (0x3 & 0xffffffff) return
1 jited:1 128 PASS
[   58.193631] test_bpf: #260 JMP_JA: Jump, gap, jump, ... jited:1 108 PASS
[   58.195981] test_bpf: #261 BPF_MAXINSNS: Maximum possible literals
jited:1 111 PASS
[   58.211020] test_bpf: #262 BPF_MAXINSNS: Single literal jited:1 115 PASS
[   58.226185] test_bpf: #263 BPF_MAXINSNS: Run/add until end jited:1 8481 PASS
[   58.322910] test_bpf: #264 BPF_MAXINSNS: Too many instructions PASS
[   58.323076] test_bpf: #265 BPF_MAXINSNS: Very long jump jited:1 123 PASS
[   58.339381] test_bpf: #266 BPF_MAXINSNS: Ctx heavy transformations
jited:1 28166 29032 PASS
[   58.931050] test_bpf: #267 BPF_MAXINSNS: Call heavy transformations
jited:0 903498 894192 PASS
[   76.916296] test_bpf: #268 BPF_MAXINSNS: Jump heavy test jited:1 132663 PASS
[   78.260490] test_bpf: #269 BPF_MAXINSNS: Very long jump backwards
jited:1 148 PASS
[   78.269590] test_bpf: #270 BPF_MAXINSNS: Edge hopping nuthouse
jited:1 277097 PASS
[   81.046383] test_bpf: #271 BPF_MAXINSNS: Jump, gap, jump, ...
jited:1 1041 PASS
[   81.076916] test_bpf: #272 BPF_MAXINSNS: ld_abs+get_processor_id
jited:0 566894 PASS
[   86.754024] test_bpf: #273 BPF_MAXINSNS: ld_abs+vlan_push/pop
jited:0 602040 PASS
[   92.775504] test_bpf: #274 LD_IND byte frag jited:1 574 PASS
[   92.782876] test_bpf: #275 LD_IND halfword frag jited:1 641 PASS
[   92.790062] test_bpf: #276 LD_IND word frag jited:1 731 PASS
[   92.798321] test_bpf: #277 LD_IND halfword mixed head/frag jited:1 741 PASS
[   92.806601] test_bpf: #278 LD_IND word mixed head/frag jited:1 972 PASS
[   92.817542] test_bpf: #279 LD_ABS byte frag jited:1 601 PASS
[   92.824156] test_bpf: #280 LD_ABS halfword frag jited:1 603 PASS
[   92.830806] test_bpf: #281 LD_ABS word frag jited:1 688 PASS
[   92.838273] test_bpf: #282 LD_ABS halfword mixed head/frag jited:1 657 PASS
[   92.845562] test_bpf: #283 LD_ABS word mixed head/frag jited:1 748 PASS
[   92.853678] test_bpf: #284 LD_IND byte default X jited:1 178 PASS
[   92.856290] test_bpf: #285 LD_IND byte positive offset jited:1 187 PASS
[   92.858954] test_bpf: #286 LD_IND byte negative offset jited:1 178 PASS
[   92.861592] test_bpf: #287 LD_IND halfword positive offset jited:1 161 PASS
[   92.863726] test_bpf: #288 LD_IND halfword negative offset jited:1 195 PASS
[   92.866372] test_bpf: #289 LD_IND halfword unaligned jited:1 183 PASS
[   92.868821] test_bpf: #290 LD_IND word positive offset jited:1 170 PASS
[   92.871096] test_bpf: #291 LD_IND word negative offset jited:1 198 PASS
[   92.873832] test_bpf: #292 LD_IND word unaligned (addr & 3 == 2)
jited:1 281 PASS
[   92.877321] test_bpf: #293 LD_IND word unaligned (addr & 3 == 1)
jited:1 172 PASS
[   92.879493] test_bpf: #294 LD_IND word unaligned (addr & 3 == 3)
jited:1 171 PASS
[   92.881590] test_bpf: #295 LD_ABS byte jited:1 162 PASS
[   92.883535] test_bpf: #296 LD_ABS halfword jited:1 160 PASS
[   92.885486] test_bpf: #297 LD_ABS halfword unaligned jited:1 180 PASS
[   92.887650] test_bpf: #298 LD_ABS word jited:1 166 PASS
[   92.889661] test_bpf: #299 LD_ABS word unaligned (addr & 3 == 2)
jited:1 157 PASS
[   92.891595] test_bpf: #300 LD_ABS word unaligned (addr & 3 == 1)
jited:1 170 PASS
[   92.893662] test_bpf: #301 LD_ABS word unaligned (addr & 3 == 3)
jited:1 163 PASS
[   92.895660] test_bpf: #302 ADD default X jited:1 84 PASS
[   92.896895] test_bpf: #303 ADD default A jited:1 79 PASS
[   92.898143] test_bpf: #304 SUB default X jited:1 82 PASS
[   92.899284] test_bpf: #305 SUB default A jited:1 85 PASS
[   92.900529] test_bpf: #306 MUL default X jited:1 76 PASS
[   92.901642] test_bpf: #307 MUL default A jited:1 83 PASS
[   92.903045] test_bpf: #308 DIV default X jited:1 93 PASS
[   92.904524] test_bpf: #309 DIV default A jited:1 203 PASS
[   92.906955] test_bpf: #310 MOD default X jited:1 100 PASS
[   92.908398] test_bpf: #311 MOD default A jited:1 249 PASS
[   92.911232] test_bpf: #312 JMP EQ default A jited:1 83 PASS
[   92.912593] test_bpf: #313 JMP EQ default X jited:1 95 PASS
[   92.913931] test_bpf: Summary: 314 PASSED, 0 FAILED, [278/306 JIT'ed]

3) JIT + blinding enabled:

[root@vexpress modules]# insmod test_bpf.ko
[   56.044720] test_bpf: #0 TAX jited:1 239 218 229 PASS
[   56.054736] test_bpf: #1 TXA jited:1 89 119 85 PASS
[   56.064598] test_bpf: #2 ADD_SUB_MUL_K jited:1 213 PASS
[   56.067415] test_bpf: #3 DIV_MOD_KX jited:1 1190 PASS
[   56.080569] test_bpf: #4 AND_OR_LSH_K jited:1 200 149 PASS
[   56.084764] test_bpf: #5 LD_IMM_0 jited:1 101 PASS
[   56.086832] test_bpf: #6 LD_IND jited:1 314 310 283 PASS
[   56.096521] test_bpf: #7 LD_ABS jited:1 376 460 397 PASS
[   56.109604] test_bpf: #8 LD_ABS_LL jited:1 608 415 PASS
[   56.120753] test_bpf: #9 LD_IND_LL jited:1 248 256 268 PASS
[   56.129296] test_bpf: #10 LD_ABS_NET jited:1 435 420 PASS
[   56.138666] test_bpf: #11 LD_IND_NET jited:1 240 228 215 PASS
[   56.146039] test_bpf: #12 LD_PKTTYPE jited:1 211 274 PASS
[   56.151632] test_bpf: #13 LD_MARK jited:1 119 76 PASS
[   56.154522] test_bpf: #14 LD_RXHASH jited:1 78 70 PASS
[   56.156535] test_bpf: #15 LD_QUEUE jited:1 77 73 PASS
[   56.158482] test_bpf: #16 LD_PROTOCOL jited:1 326 320 PASS
[   56.165778] test_bpf: #17 LD_VLAN_TAG jited:1 129 86 PASS
[   56.168783] test_bpf: #18 LD_VLAN_TAG_PRESENT jited:1 87 88 PASS
[   56.170990] test_bpf: #19 LD_IFINDEX jited:1 97 95 PASS
[   56.173444] test_bpf: #20 LD_HATYPE jited:1 94 118 PASS
[   56.176033] test_bpf: #21 LD_CPU
[   56.176329] bpf_jit: *** NOT YET: opcode 85 ***
[   56.176565] jited:0 2639 702 PASS
[   56.210242] test_bpf: #22 LD_NLATTR jited:0 685 2101 PASS
[   56.238881] test_bpf: #23 LD_NLATTR_NEST jited:0 2323 3752 PASS
[   56.300600] test_bpf: #24 LD_PAYLOAD_OFF jited:0 4543 6842 PASS
[   56.415022] test_bpf: #25 LD_ANC_XOR jited:1 168 156 PASS
[   56.419429] test_bpf: #26 SPILL_FILL jited:1 232 212 219 PASS
[   56.427785] test_bpf: #27 JEQ jited:1 362 352 230 PASS
[   56.438180] test_bpf: #28 JGT jited:1 334 236 197 PASS
[   56.446672] test_bpf: #29 JGE jited:1 260 318 307 PASS
[   56.456301] test_bpf: #30 JSET jited:1 274 339 410 PASS
[   56.467681] test_bpf: #31 tcpdump port 22 jited:1 355 951 968 PASS
[   56.492091] test_bpf: #32 tcpdump complex jited:1 318 798 1308 PASS
[   56.517843] test_bpf: #33 RET_A jited:1 83 76 PASS
[   56.520000] test_bpf: #34 INT: ADD trivial jited:1 152 PASS
[   56.522183] test_bpf: #35 INT: MUL_X jited:1 192 PASS
[   56.524626] test_bpf: #36 INT: MUL_X2 jited:1 165 PASS
[   56.526762] test_bpf: #37 INT: MUL32_X jited:1 163 PASS
[   56.528828] test_bpf: #38 INT: ADD 64-bit jited:1 1507 PASS
[   56.544862] test_bpf: #39 INT: ADD 32-bit jited:1 954 PASS
[   56.555409] test_bpf: #40 INT: SUB jited:1 1159 PASS
[   56.567960] test_bpf: #41 INT: XOR jited:1 480 PASS
[   56.573431] test_bpf: #42 INT: MUL jited:1 486 PASS
[   56.579305] test_bpf: #43 MOV REG64 jited:1 274 PASS
[   56.583045] test_bpf: #44 MOV REG32 jited:1 253 PASS
[   56.586138] test_bpf: #45 LD IMM64 jited:1 578 PASS
[   56.592580] test_bpf: #46 INT: ALU MIX jited:0 1199 PASS
[   56.605346] test_bpf: #47 INT: shifts by register jited:1 381 PASS
[   56.610159] test_bpf: #48 INT: DIV + ABS jited:1 588 482 PASS
[   56.621545] test_bpf: #49 INT: DIV by zero jited:1 276 199 PASS
[   56.626894] test_bpf: #50 check: missing ret PASS
[   56.627249] test_bpf: #51 check: div_k_0 PASS
[   56.627403] test_bpf: #52 check: unknown insn PASS
[   56.627518] test_bpf: #53 check: out of range spill/fill PASS
[   56.627639] test_bpf: #54 JUMPS + HOLES jited:1 371 PASS
[   56.632295] test_bpf: #55 check: RET X PASS
[   56.632615] test_bpf: #56 check: LDX + RET X PASS
[   56.632748] test_bpf: #57 M[]: alt STX + LDX jited:1 621 PASS
[   56.639774] test_bpf: #58 M[]: full STX + full LDX jited:1 586 PASS
[   56.646535] test_bpf: #59 check: SKF_AD_MAX PASS
[   56.646837] test_bpf: #60 LD [SKF_AD_OFF-1] jited:1 195 PASS
[   56.649245] test_bpf: #61 load 64-bit immediate jited:1 220 PASS
[   56.652259] test_bpf: #62 nmap reduced jited:1 816 PASS
[   56.661508] test_bpf: #63 ALU_MOV_X: dst = 2 jited:1 76 PASS
[   56.662760] test_bpf: #64 ALU_MOV_X: dst = 4294967295 jited:1 79 PASS
[   56.663905] test_bpf: #65 ALU64_MOV_X: dst = 2 jited:1 80 PASS
[   56.665158] test_bpf: #66 ALU64_MOV_X: dst = 4294967295 jited:1 79 PASS
[   56.666297] test_bpf: #67 ALU_MOV_K: dst = 2 jited:1 75 PASS
[   56.667389] test_bpf: #68 ALU_MOV_K: dst = 4294967295 jited:1 73 PASS
[   56.668504] test_bpf: #69 ALU_MOV_K: 0x0000ffffffff0000 =
0x00000000ffffffff jited:1 195 PASS
[   56.670934] test_bpf: #70 ALU64_MOV_K: dst = 2 jited:1 77 PASS
[   56.672115] test_bpf: #71 ALU64_MOV_K: dst = 2147483647 jited:1 104 PASS
[   56.673550] test_bpf: #72 ALU64_OR_K: dst = 0x0 jited:1 215 PASS
[   56.676139] test_bpf: #73 ALU64_MOV_K: dst = -1 jited:1 173 PASS
[   56.687141] test_bpf: #74 ALU_ADD_X: 1 + 2 = 3 jited:1 114 PASS
[   56.688839] test_bpf: #75 ALU_ADD_X: 1 + 4294967294 = 4294967295
jited:1 112 PASS
[   56.690248] test_bpf: #76 ALU_ADD_X: 2 + 4294967294 = 0 jited:1 186 PASS
[   56.692428] test_bpf: #77 ALU64_ADD_X: 1 + 2 = 3 jited:1 159 PASS
[   56.694388] test_bpf: #78 ALU64_ADD_X: 1 + 4294967294 = 4294967295
jited:1 109 PASS
[   56.696115] test_bpf: #79 ALU64_ADD_X: 2 + 4294967294 = 4294967296
jited:1 218 PASS
[   56.698754] test_bpf: #80 ALU_ADD_K: 1 + 2 = 3 jited:1 120 PASS
[   56.700479] test_bpf: #81 ALU_ADD_K: 3 + 0 = 3 jited:1 118 PASS
[   56.702378] test_bpf: #82 ALU_ADD_K: 1 + 4294967294 = 4294967295
jited:1 121 PASS
[   56.704284] test_bpf: #83 ALU_ADD_K: 4294967294 + 2 = 0 jited:1 139 PASS
[   56.706363] test_bpf: #84 ALU_ADD_K: 0 + (-1) = 0x00000000ffffffff
jited:1 176 PASS
[   56.708715] test_bpf: #85 ALU_ADD_K: 0 + 0xffff = 0xffff jited:1 190 PASS
[   56.711155] test_bpf: #86 ALU_ADD_K: 0 + 0x7fffffff = 0x7fffffff
jited:1 228 PASS
[   56.713878] test_bpf: #87 ALU_ADD_K: 0 + 0x80000000 = 0x80000000
jited:1 198 PASS
[   56.716318] test_bpf: #88 ALU_ADD_K: 0 + 0x80008000 = 0x80008000
jited:1 189 PASS
[   56.718657] test_bpf: #89 ALU64_ADD_K: 1 + 2 = 3 jited:1 112 PASS
[   56.720152] test_bpf: #90 ALU64_ADD_K: 3 + 0 = 3 jited:1 111 PASS
[   56.721639] test_bpf: #91 ALU64_ADD_K: 1 + 2147483646 = 2147483647
jited:1 138 PASS
[   56.723403] test_bpf: #92 ALU64_ADD_K: 4294967294 + 2 = 4294967296
jited:1 151 PASS
[   56.725349] test_bpf: #93 ALU64_ADD_K: 2147483646 + -2147483647 =
-1 jited:1 115 PASS
[   56.726923] test_bpf: #94 ALU64_ADD_K: 1 + 0 = 1 jited:1 206 PASS
[   56.729436] test_bpf: #95 ALU64_ADD_K: 0 + (-1) =
0xffffffffffffffff jited:1 211 PASS
[   56.731988] test_bpf: #96 ALU64_ADD_K: 0 + 0xffff = 0xffff jited:1 250 PASS
[   56.735291] test_bpf: #97 ALU64_ADD_K: 0 + 0x7fffffff = 0x7fffffff
jited:1 199 PASS
[   56.737871] test_bpf: #98 ALU64_ADD_K: 0 + 0x80000000 =
0xffffffff80000000 jited:1 177 PASS
[   56.740193] test_bpf: #99 ALU_ADD_K: 0 + 0x80008000 =
0xffffffff80008000 jited:1 243 PASS
[   56.743126] test_bpf: #100 ALU_SUB_X: 3 - 1 = 2 jited:1 108 PASS
[   56.744676] test_bpf: #101 ALU_SUB_X: 4294967295 - 4294967294 = 1
jited:1 133 PASS
[   56.746386] test_bpf: #102 ALU64_SUB_X: 3 - 1 = 2 jited:1 110 PASS
[   56.747835] test_bpf: #103 ALU64_SUB_X: 4294967295 - 4294967294 = 1
jited:1 111 PASS
[   56.749292] test_bpf: #104 ALU_SUB_K: 3 - 1 = 2 jited:1 110 PASS
[   56.750766] test_bpf: #105 ALU_SUB_K: 3 - 0 = 3 jited:1 123 PASS
[   56.752371] test_bpf: #106 ALU_SUB_K: 4294967295 - 4294967294 = 1
jited:1 124 PASS
[   56.754095] test_bpf: #107 ALU64_SUB_K: 3 - 1 = 2 jited:1 116 PASS
[   56.755687] test_bpf: #108 ALU64_SUB_K: 3 - 0 = 3 jited:1 133 PASS
[   56.757418] test_bpf: #109 ALU64_SUB_K: 4294967294 - 4294967295 =
-1 jited:1 148 PASS
[   56.759295] test_bpf: #110 ALU64_ADD_K: 2147483646 - 2147483647 =
-1 jited:1 145 PASS
[   56.761137] test_bpf: #111 ALU_MUL_X: 2 * 3 = 6 jited:1 172 PASS
[   56.763380] test_bpf: #112 ALU_MUL_X: 2 * 0x7FFFFFF8 = 0xFFFFFFF0
jited:1 117 PASS
[   56.764943] test_bpf: #113 ALU_MUL_X: -1 * -1 = 1 jited:1 109 PASS
[   56.766424] test_bpf: #114 ALU64_MUL_X: 2 * 3 = 6 jited:1 115 PASS
[   56.767999] test_bpf: #115 ALU64_MUL_X: 1 * 2147483647 = 2147483647
jited:1 119 PASS
[   56.769584] test_bpf: #116 ALU_MUL_K: 2 * 3 = 6 jited:1 111 PASS
[   56.771124] test_bpf: #117 ALU_MUL_K: 3 * 1 = 3 jited:1 118 PASS
[   56.772961] test_bpf: #118 ALU_MUL_K: 2 * 0x7FFFFFF8 = 0xFFFFFFF0
jited:1 109 PASS
[   56.774431] test_bpf: #119 ALU_MUL_K: 1 * (-1) = 0x00000000ffffffff
jited:1 201 PASS
[   56.776888] test_bpf: #120 ALU64_MUL_K: 2 * 3 = 6 jited:1 116 PASS
[   56.778460] test_bpf: #121 ALU64_MUL_K: 3 * 1 = 3 jited:1 115 PASS
[   56.779993] test_bpf: #122 ALU64_MUL_K: 1 * 2147483647 = 2147483647
jited:1 278 PASS
[   56.783229] test_bpf: #123 ALU64_MUL_K: 1 * -2147483647 =
-2147483647 jited:1 125 PASS
[   56.785228] test_bpf: #124 ALU64_MUL_K: 1 * (-1) =
0xffffffffffffffff jited:1 208 PASS
[   56.787912] test_bpf: #125 ALU_DIV_X: 6 / 2 = 3 jited:1 246 PASS
[   56.790983] test_bpf: #126 ALU_DIV_X: 4294967295 / 4294967295 = 1
jited:1 291 PASS
[   56.794583] test_bpf: #127 ALU64_DIV_X: 6 / 2 = 3 jited:0 449 PASS
[   56.799521] test_bpf: #128 ALU64_DIV_X: 2147483647 / 2147483647 = 1
jited:0 462 PASS
[   56.804433] test_bpf: #129 ALU64_DIV_X: 0xffffffffffffffff / (-1) =
0x0000000000000001 jited:0 602 PASS
[   56.810815] test_bpf: #130 ALU_DIV_K: 6 / 2 = 3 jited:1 234 PASS
[   56.813585] test_bpf: #131 ALU_DIV_K: 3 / 1 = 3 jited:1 240 PASS
[   56.816466] test_bpf: #132 ALU_DIV_K: 4294967295 / 4294967295 = 1
jited:1 276 PASS
[   56.819790] test_bpf: #133 ALU_DIV_K: 0xffffffffffffffff / (-1) =
0x1 jited:1 373 PASS
[   56.824311] test_bpf: #134 ALU64_DIV_K: 6 / 2 = 3 jited:0 367 PASS
[   56.828509] test_bpf: #135 ALU64_DIV_K: 3 / 1 = 3 jited:0 354 PASS
[   56.832439] test_bpf: #136 ALU64_DIV_K: 2147483647 / 2147483647 = 1
jited:0 358 PASS
[   56.836360] test_bpf: #137 ALU64_DIV_K: 0xffffffffffffffff / (-1) =
0x0000000000000001 jited:0 563 PASS
[   56.842408] test_bpf: #138 ALU_MOD_X: 3 % 2 = 1 jited:1 293 PASS
[   56.845744] test_bpf: #139 ALU_MOD_X: 4294967295 % 4294967293 = 2
jited:1 289 PASS
[   56.849070] test_bpf: #140 ALU64_MOD_X: 3 % 2 = 1 jited:0 660 PASS
[   56.856100] test_bpf: #141 ALU64_MOD_X: 2147483647 % 2147483645 = 2
jited:0 692 PASS
[   56.863515] test_bpf: #142 ALU_MOD_K: 3 % 2 = 1 jited:1 311 PASS
[   56.867145] test_bpf: #143 ALU_MOD_K: 3 % 1 = 0 jited:1 PASS
[   56.867640] test_bpf: #144 ALU_MOD_K: 4294967295 % 4294967293 = 2
jited:1 319 PASS
[   56.871208] test_bpf: #145 ALU64_MOD_K: 3 % 2 = 1 jited:0 539 PASS
[   56.876982] test_bpf: #146 ALU64_MOD_K: 3 % 1 = 0 jited:0 PASS
[   56.877292] test_bpf: #147 ALU64_MOD_K: 2147483647 % 2147483645 = 2
jited:0 499 PASS
[   56.882591] test_bpf: #148 ALU_AND_X: 3 & 2 = 2 jited:1 109 PASS
[   56.884070] test_bpf: #149 ALU_AND_X: 0xffffffff & 0xffffffff =
0xffffffff jited:1 130 PASS
[   56.885807] test_bpf: #150 ALU64_AND_X: 3 & 2 = 2 jited:1 106 PASS
[   56.887288] test_bpf: #151 ALU64_AND_X: 0xffffffff & 0xffffffff =
0xffffffff jited:1 102 PASS
[   56.888746] test_bpf: #152 ALU_AND_K: 3 & 2 = 2 jited:1 114 PASS
[   56.890232] test_bpf: #153 ALU_AND_K: 0xffffffff & 0xffffffff =
0xffffffff jited:1 138 PASS
[   56.891967] test_bpf: #154 ALU64_AND_K: 3 & 2 = 2 jited:1 110 PASS
[   56.893502] test_bpf: #155 ALU64_AND_K: 0xffffffff & 0xffffffff =
0xffffffff jited:1 148 PASS
[   56.895413] test_bpf: #156 ALU64_AND_K: 0x0000ffffffff0000 & 0x0 =
0x0000ffff00000000 jited:1 206 PASS
[   56.897993] test_bpf: #157 ALU64_AND_K: 0x0000ffffffff0000 & -1 =
0x0000ffffffffffff jited:1 176 PASS
[   56.900294] test_bpf: #158 ALU64_AND_K: 0xffffffffffffffff & -1 =
0xffffffffffffffff jited:1 271 PASS
[   56.903712] test_bpf: #159 ALU_OR_X: 1 | 2 = 3 jited:1 108 PASS
[   56.905547] test_bpf: #160 ALU_OR_X: 0x0 | 0xffffffff = 0xffffffff
jited:1 118 PASS
[   56.907467] test_bpf: #161 ALU64_OR_X: 1 | 2 = 3 jited:1 103 PASS
[   56.909247] test_bpf: #162 ALU64_OR_X: 0 | 0xffffffff = 0xffffffff
jited:1 143 PASS
[   56.911219] test_bpf: #163 ALU_OR_K: 1 | 2 = 3 jited:1 123 PASS
[   56.913042] test_bpf: #164 ALU_OR_K: 0 & 0xffffffff = 0xffffffff
jited:1 110 PASS
[   56.914579] test_bpf: #165 ALU64_OR_K: 1 | 2 = 3 jited:1 120 PASS
[   56.916390] test_bpf: #166 ALU64_OR_K: 0 & 0xffffffff = 0xffffffff
jited:1 119 PASS
[   56.918118] test_bpf: #167 ALU64_OR_K: 0x0000ffffffff0000 | 0x0 =
0x0000ffff00000000 jited:1 212 PASS
[   56.920808] test_bpf: #168 ALU64_OR_K: 0x0000ffffffff0000 | -1 =
0xffffffffffffffff jited:1 221 PASS
[   56.923458] test_bpf: #169 ALU64_OR_K: 0x000000000000000 | -1 =
0xffffffffffffffff jited:1 198 PASS
[   56.925881] test_bpf: #170 ALU_XOR_X: 5 ^ 6 = 3 jited:1 138 PASS
[   56.927678] test_bpf: #171 ALU_XOR_X: 0x1 ^ 0xffffffff = 0xfffffffe
jited:1 130 PASS
[   56.929353] test_bpf: #172 ALU64_XOR_X: 5 ^ 6 = 3 jited:1 114 PASS
[   56.930850] test_bpf: #173 ALU64_XOR_X: 1 ^ 0xffffffff = 0xfffffffe
jited:1 106 PASS
[   56.932277] test_bpf: #174 ALU_XOR_K: 5 ^ 6 = 3 jited:1 112 PASS
[   56.933790] test_bpf: #175 ALU_XOR_K: 1 ^ 0xffffffff = 0xfffffffe
jited:1 116 PASS
[   56.935371] test_bpf: #176 ALU64_XOR_K: 5 ^ 6 = 3 jited:1 114 PASS
[   56.936942] test_bpf: #177 ALU64_XOR_K: 1 & 0xffffffff = 0xfffffffe
jited:1 112 PASS
[   56.938503] test_bpf: #178 ALU64_XOR_K: 0x0000ffffffff0000 ^ 0x0 =
0x0000ffffffff0000 jited:1 201 PASS
[   56.940978] test_bpf: #179 ALU64_XOR_K: 0x0000ffffffff0000 ^ -1 =
0xffff00000000ffff jited:1 242 PASS
[   56.943908] test_bpf: #180 ALU64_XOR_K: 0x000000000000000 ^ -1 =
0xffffffffffffffff jited:1 208 PASS
[   56.946575] test_bpf: #181 ALU_LSH_X: 1 << 1 = 2 jited:1 112 PASS
[   56.948252] test_bpf: #182 ALU_LSH_X: 1 << 31 = 0x80000000 jited:1 137 PASS
[   56.950466] test_bpf: #183 ALU64_LSH_X: 1 << 1 = 2 jited:1 163 PASS
[   56.953176] test_bpf: #184 ALU64_LSH_X: 1 << 31 = 0x80000000 jited:1 145 PASS
[   56.955105] test_bpf: #185 ALU_LSH_K: 1 << 1 = 2 jited:1 92 PASS
[   56.956400] test_bpf: #186 ALU_LSH_K: 1 << 31 = 0x80000000 jited:1 94 PASS
[   56.957700] test_bpf: #187 ALU64_LSH_K: 1 << 1 = 2 jited:1 94 PASS
[   56.959086] test_bpf: #188 ALU64_LSH_K: 1 << 31 = 0x80000000 jited:1 127 PASS
[   56.960779] test_bpf: #189 ALU_RSH_X: 2 >> 1 = 1 jited:1 135 PASS
[   56.962532] test_bpf: #190 ALU_RSH_X: 0x80000000 >> 31 = 1 jited:1 109 PASS
[   56.964027] test_bpf: #191 ALU64_RSH_X: 2 >> 1 = 1 jited:1 123 PASS
[   56.965961] test_bpf: #192 ALU64_RSH_X: 0x80000000 >> 31 = 1 jited:1 117 PASS
[   56.967517] test_bpf: #193 ALU_RSH_K: 2 >> 1 = 1 jited:1 95 PASS
[   56.968874] test_bpf: #194 ALU_RSH_K: 0x80000000 >> 31 = 1 jited:1 103 PASS
[   56.970261] test_bpf: #195 ALU64_RSH_K: 2 >> 1 = 1 jited:1 124 PASS
[   56.971879] test_bpf: #196 ALU64_RSH_K: 0x80000000 >> 31 = 1 jited:1 107 PASS
[   56.973346] test_bpf: #197 ALU_ARSH_X: 0xff00ff0000000000 >> 40 =
0xffffffffffff00ff jited:1 125 PASS
[   56.975022] test_bpf: #198 ALU_ARSH_K: 0xff00ff0000000000 >> 40 =
0xffffffffffff00ff jited:1 105 PASS
[   56.976479] test_bpf: #199 ALU_NEG: -(3) = -3 jited:1 76 PASS
[   56.977591] test_bpf: #200 ALU_NEG: -(-3) = 3 jited:1 106 PASS
[   56.979068] test_bpf: #201 ALU64_NEG: -(3) = -3 jited:1 104 PASS
[   56.980508] test_bpf: #202 ALU64_NEG: -(-3) = 3 jited:1 135 PASS
[   56.982223] test_bpf: #203 ALU_END_FROM_BE 16: 0x0123456789abcdef
-> 0xcdef jited:1 115 PASS
[   56.984458] test_bpf: #204 ALU_END_FROM_BE 32: 0x0123456789abcdef
-> 0x89abcdef jited:1 101 PASS
[   56.985991] test_bpf: #205 ALU_END_FROM_BE 64: 0x0123456789abcdef
-> 0x89abcdef jited:1 103 PASS
[   56.987477] test_bpf: #206 ALU_END_FROM_LE 16: 0x0123456789abcdef
-> 0xefcd jited:1 107 PASS
[   56.988937] test_bpf: #207 ALU_END_FROM_LE 32: 0x0123456789abcdef
-> 0xefcdab89 jited:1 93 PASS
[   56.990256] test_bpf: #208 ALU_END_FROM_LE 64: 0x0123456789abcdef
-> 0x67452301 jited:1 108 PASS
[   56.991728] test_bpf: #209 ST_MEM_B: Store/Load byte: max negative
jited:1 168 PASS
[   56.993878] test_bpf: #210 ST_MEM_B: Store/Load byte: max positive
jited:1 105 PASS
[   56.995386] test_bpf: #211 STX_MEM_B: Store/Load byte: max negative
jited:1 140 PASS
[   56.997188] test_bpf: #212 ST_MEM_H: Store/Load half word: max
negative jited:1 98 PASS
[   56.998563] test_bpf: #213 ST_MEM_H: Store/Load half word: max
positive jited:1 109 PASS
[   57.000045] test_bpf: #214 STX_MEM_H: Store/Load half word: max
negative jited:1 134 PASS
[   57.001803] test_bpf: #215 ST_MEM_W: Store/Load word: max negative
jited:1 148 PASS
[   57.003666] test_bpf: #216 ST_MEM_W: Store/Load word: max positive
jited:1 136 PASS
[   57.006376] test_bpf: #217 STX_MEM_W: Store/Load word: max negative
jited:1 205 PASS
[   57.009004] test_bpf: #218 ST_MEM_DW: Store/Load double word: max
negative jited:1 124 PASS
[   57.011164] test_bpf: #219 ST_MEM_DW: Store/Load double word: max
negative 2 jited:1 222 PASS
[   57.014281] test_bpf: #220 ST_MEM_DW: Store/Load double word: max
positive jited:1 110 PASS
[   57.016138] test_bpf: #221 STX_MEM_DW: Store/Load double word: max
negative jited:1 194 PASS
[   57.018614] test_bpf: #222 STX_XADD_W: Test: 0x12 + 0x10 = 0x22
jited:0 292 PASS
[   57.022064] test_bpf: #223 STX_XADD_W: Test side-effects, r10: 0x12
+ 0x10 = 0x22 jited:0 PASS
[   57.022356] test_bpf: #224 STX_XADD_W: Test side-effects, r0: 0x12
+ 0x10 = 0x22 jited:0 241 PASS
[   57.025099] test_bpf: #225 STX_XADD_W: X + 1 + 1 + 1 + ... jited:0
142752 PASS
[   58.454867] test_bpf: #226 STX_XADD_DW: Test: 0x12 + 0x10 = 0x22
jited:0 370 PASS
[   58.459675] test_bpf: #227 STX_XADD_DW: Test side-effects, r10:
0x12 + 0x10 = 0x22 jited:0 PASS
[   58.460082] test_bpf: #228 STX_XADD_DW: Test side-effects, r0: 0x12
+ 0x10 = 0x22 jited:0 268 PASS
[   58.463093] test_bpf: #229 STX_XADD_DW: X + 1 + 1 + 1 + ... jited:0
224885 PASS
[   60.713635] test_bpf: #230 JMP_EXIT jited:1 77 PASS
[   60.715476] test_bpf: #231 JMP_JA: Unconditional jump: if (true)
return 1 jited:1 84 PASS
[   60.716748] test_bpf: #232 JMP_JSGT_K: Signed jump: if (-1 > -2)
return 1 jited:1 128 PASS
[   60.718617] test_bpf: #233 JMP_JSGT_K: Signed jump: if (-1 > -1)
return 0 jited:1 126 PASS
[   60.720303] test_bpf: #234 JMP_JSGE_K: Signed jump: if (-1 >= -2)
return 1 jited:1 179 PASS
[   60.722889] test_bpf: #235 JMP_JSGE_K: Signed jump: if (-1 >= -1)
return 1 jited:1 125 PASS
[   60.724674] test_bpf: #236 JMP_JGT_K: if (3 > 2) return 1 jited:1 142 PASS
[   60.726577] test_bpf: #237 JMP_JGT_K: Unsigned jump: if (-1 > 1)
return 1 jited:1 161 PASS
[   60.728695] test_bpf: #238 JMP_JGE_K: if (3 >= 2) return 1 jited:1 163 PASS
[   60.730807] test_bpf: #239 JMP_JGT_K: if (3 > 2) return 1 (jump
backwards) jited:1 143 PASS
[   60.733042] test_bpf: #240 JMP_JGE_K: if (3 >= 3) return 1 jited:1 179 PASS
[   60.735513] test_bpf: #241 JMP_JNE_K: if (3 != 2) return 1 jited:1 144 PASS
[   60.737586] test_bpf: #242 JMP_JEQ_K: if (3 == 3) return 1 jited:1 144 PASS
[   60.739896] test_bpf: #243 JMP_JSET_K: if (0x3 & 0x2) return 1
jited:1 149 PASS
[   60.741813] test_bpf: #244 JMP_JSET_K: if (0x3 & 0xffffffff) return
1 jited:1 153 PASS
[   60.743773] test_bpf: #245 JMP_JSGT_X: Signed jump: if (-1 > -2)
return 1 jited:1 162 PASS
[   60.745798] test_bpf: #246 JMP_JSGT_X: Signed jump: if (-1 > -1)
return 0 jited:1 162 PASS
[   60.747921] test_bpf: #247 JMP_JSGE_X: Signed jump: if (-1 >= -2)
return 1 jited:1 178 PASS
[   60.750577] test_bpf: #248 JMP_JSGE_X: Signed jump: if (-1 >= -1)
return 1 jited:1 192 PASS
[   60.753315] test_bpf: #249 JMP_JGT_X: if (3 > 2) return 1 jited:1 205 PASS
[   60.756115] test_bpf: #250 JMP_JGT_X: Unsigned jump: if (-1 > 1)
return 1 jited:1 154 PASS
[   60.758287] test_bpf: #251 JMP_JGE_X: if (3 >= 2) return 1 jited:1 177 PASS
[   60.760611] test_bpf: #252 JMP_JGE_X: if (3 >= 3) return 1 jited:1 160 PASS
[   60.762901] test_bpf: #253 JMP_JGE_X: ldimm64 test 1 jited:1 204 PASS
[   60.765394] test_bpf: #254 JMP_JGE_X: ldimm64 test 2 jited:1 201 PASS
[   60.767884] test_bpf: #255 JMP_JGE_X: ldimm64 test 3 jited:1 184 PASS
[   60.770228] test_bpf: #256 JMP_JNE_X: if (3 != 2) return 1 jited:1 168 PASS
[   60.772331] test_bpf: #257 JMP_JEQ_X: if (3 == 3) return 1 jited:1 197 PASS
[   60.774754] test_bpf: #258 JMP_JSET_X: if (0x3 & 0x2) return 1
jited:1 192 PASS
[   60.777384] test_bpf: #259 JMP_JSET_X: if (0x3 & 0xffffffff) return
1 jited:1 181 PASS
[   60.779641] test_bpf: #260 JMP_JA: Jump, gap, jump, ... jited:1 97 PASS
[   60.781022] test_bpf: #261 BPF_MAXINSNS: Maximum possible literals
jited:1 125 PASS
[   61.242879] test_bpf: #262 BPF_MAXINSNS: Single literal jited:1 105 PASS
[   61.835125] test_bpf: #263 BPF_MAXINSNS: Run/add until end jited:1
121315 PASS
[   63.362129] test_bpf: #264 BPF_MAXINSNS: Too many instructions PASS
[   63.362231] test_bpf: #265 BPF_MAXINSNS: Very long jump jited:1 131 PASS
[   63.879679] test_bpf: #266 BPF_MAXINSNS: Ctx heavy transformations
jited:1 217030 181848 PASS
[   68.492725] test_bpf: #267 BPF_MAXINSNS: Call heavy transformations
jited:0 1018683 930359 PASS
[   88.007480] test_bpf: #268 BPF_MAXINSNS: Jump heavy test jited:1 440621 PASS
[   93.074379] test_bpf: #269 BPF_MAXINSNS: Very long jump backwards
jited:1 154 PASS
[   93.358458] test_bpf: #270 BPF_MAXINSNS: Edge hopping nuthouse
jited:1 302835 PASS
[   96.392483] test_bpf: #271 BPF_MAXINSNS: Jump, gap, jump, ...
jited:1 1008 PASS
[   96.501153] test_bpf: #272 BPF_MAXINSNS: ld_abs+get_processor_id
jited:0 597855 PASS
[  102.759854] test_bpf: #273 BPF_MAXINSNS: ld_abs+vlan_push/pop
jited:0 626616 PASS
[  109.247312] test_bpf: #274 LD_IND byte frag jited:1 1453 PASS
[  109.263829] test_bpf: #275 LD_IND halfword frag jited:1 600 PASS
[  109.270433] test_bpf: #276 LD_IND word frag jited:1 719 PASS
[  109.278159] test_bpf: #277 LD_IND halfword mixed head/frag jited:1 705 PASS
[  109.285898] test_bpf: #278 LD_IND word mixed head/frag jited:1 732 PASS
[  109.293879] test_bpf: #279 LD_ABS byte frag jited:1 683 PASS
[  109.301360] test_bpf: #280 LD_ABS halfword frag jited:1 595 PASS
[  109.307841] test_bpf: #281 LD_ABS word frag jited:1 672 PASS
[  109.315579] test_bpf: #282 LD_ABS halfword mixed head/frag jited:1 775 PASS
[  109.323890] test_bpf: #283 LD_ABS word mixed head/frag jited:1 725 PASS
[  109.331927] test_bpf: #284 LD_IND byte default X jited:1 274 PASS
[  109.335451] test_bpf: #285 LD_IND byte positive offset jited:1 302 PASS
[  109.339511] test_bpf: #286 LD_IND byte negative offset jited:1 311 PASS
[  109.343448] test_bpf: #287 LD_IND halfword positive offset jited:1 218 PASS
[  109.346282] test_bpf: #288 LD_IND halfword negative offset jited:1 193 PASS
[  109.348832] test_bpf: #289 LD_IND halfword unaligned jited:1 190 PASS
[  109.351330] test_bpf: #290 LD_IND word positive offset jited:1 200 PASS
[  109.353993] test_bpf: #291 LD_IND word negative offset jited:1 216 PASS
[  109.356739] test_bpf: #292 LD_IND word unaligned (addr & 3 == 2)
jited:1 195 PASS
[  109.359225] test_bpf: #293 LD_IND word unaligned (addr & 3 == 1)
jited:1 196 PASS
[  109.361713] test_bpf: #294 LD_IND word unaligned (addr & 3 == 3)
jited:1 221 PASS
[  109.364417] test_bpf: #295 LD_ABS byte jited:1 195 PASS
[  109.366896] test_bpf: #296 LD_ABS halfword jited:1 170 PASS
[  109.369093] test_bpf: #297 LD_ABS halfword unaligned jited:1 167 PASS
[  109.371399] test_bpf: #298 LD_ABS word jited:1 182 PASS
[  109.373724] test_bpf: #299 LD_ABS word unaligned (addr & 3 == 2)
jited:1 185 PASS
[  109.376064] test_bpf: #300 LD_ABS word unaligned (addr & 3 == 1)
jited:1 162 PASS
[  109.381701] test_bpf: #301 LD_ABS word unaligned (addr & 3 == 3)
jited:1 231 PASS
[  109.384839] test_bpf: #302 ADD default X jited:1 105 PASS
[  109.386839] test_bpf: #303 ADD default A jited:1 101 PASS
[  109.388677] test_bpf: #304 SUB default X jited:1 106 PASS
[  109.390267] test_bpf: #305 SUB default A jited:1 119 PASS
[  109.391992] test_bpf: #306 MUL default X jited:1 131 PASS
[  109.394020] test_bpf: #307 MUL default A jited:1 116 PASS
[  109.395766] test_bpf: #308 DIV default X jited:1 116 PASS
[  109.397706] test_bpf: #309 DIV default A jited:1 227 PASS
[  109.406156] test_bpf: #310 MOD default X jited:1 98 PASS
[  109.407645] test_bpf: #311 MOD default A jited:1 265 PASS
[  109.410774] test_bpf: #312 JMP EQ default A jited:1 134 PASS
[  109.412679] test_bpf: #313 JMP EQ default X jited:1 108 PASS
[  109.414506] test_bpf: Summary: 314 PASSED, 0 FAILED, [278/306 JIT'ed]


These all benchmarks are for ARMv7.
Best,
Shubham Bansal


On Mon, May 22, 2017 at 6:31 PM, Daniel Borkmann <daniel@iogearbox.net> wrote:
> On 05/20/2017 10:01 PM, Shubham Bansal wrote:
> [...]
>>
>> Before I send the patch, I have tested the JIT compiler on ARMv7 but
>> not on ARMv5 or ARMv6. So can you tell me which arch versions I should
>> test it for?
>> Also for my testing, CONFIG_FRAME_POINTER and CONFIG_CPU_BIG_ENDIAN
>> are both disabled. But I need to test JIT with these flags as well.
>> Whenever I put these flags in .config file, the arm kernel is not
>> getting compiler with these flags. Can you tell me why? If you need
>> more information regarding this, please let me know.
>
>
> Maybe Mircea, Kees or someone from linux-arm-kernel can help you out
> on that.
>
> With regards to the below benchmark, I was mentioning how it compares
> to the interpreter. With only the numbers for jit it's hard to compare.
> So would be great to see the output for the following three cases:
>
> 1) Interpreter:
>
> echo 0 > /proc/sys/net/core/bpf_jit_enable
>
> 2) JIT enabled:
>
> echo 1 > /proc/sys/net/core/bpf_jit_enable
>
> 3) JIT + blinding enabled:
>
> echo 1 > /proc/sys/net/core/bpf_jit_enable
> echo 2 > /proc/sys/net/core/bpf_jit_harden
>
>> With current config for ARMv7, benchmarks are :
>>
>> [root@vexpress modules]# insmod test_bpf.ko
>> [   25.797766] test_bpf: #0 TAX jited:1 180 170 169 PASS
>> [   25.811395] test_bpf: #1 TXA jited:1 93 89 111 PASS
>> [   25.815073] test_bpf: #2 ADD_SUB_MUL_K jited:1 94 PASS
>> [   25.816779] test_bpf: #3 DIV_MOD_KX jited:1 983 PASS
>> [   25.827310] test_bpf: #4 AND_OR_LSH_K jited:1 94 93 PASS
>> [   25.829843] test_bpf: #5 LD_IMM_0 jited:1 83 PASS
>> [   25.831260] test_bpf: #6 LD_IND jited:1 338 266 305 PASS
>
> [...]
>
> Thanks,
> Daniel

^ permalink raw reply

* Re: [PATCH] kernel: bpf: remove dead code
From: Daniel Borkmann @ 2017-05-22 17:00 UTC (permalink / raw)
  To: David Miller; +Cc: garsilva, ast, netdev, linux-kernel
In-Reply-To: <20170522.122742.1326733219925627993.davem@davemloft.net>

On 05/22/2017 06:27 PM, David Miller wrote:
[...]
> Ok I understand the issue now.  Thanks for explaining.
>
> I guess a hard-coded value of 2 and an adjusted comment above the
> assignment of ip_align is the way to go.
>
> I'll push the following, thanks everyone:
>
> ====================
> net: Make IP alignment calulations clearer.
>
> The assignmnet:
>
> 	ip_align = strict ? 2 : NET_IP_ALIGN;
>
> in compare_pkt_ptr_alignment() trips up Coverity because we can only
> get to this code when strict is true, therefore ip_align will always
> be 2 regardless of NET_IP_ALIGN's value.
>
> So just assign directly to '2' and explain the situation in the
> comment above.
>
> Reported-by: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>

Yeah, that's fine, thanks!

Acked-by: Daniel Borkmann <daniel@iogearbox.net>

^ permalink raw reply

* Re: Inconsistency in ipv4/tcp_input regarding sequence number acceptability condition
From: Eric Dumazet @ 2017-05-22 17:00 UTC (permalink / raw)
  To: Paul Fiterau Brostean; +Cc: netdev
In-Reply-To: <f209ec7a-7d14-0112-e906-69c016298aa5@science.ru.nl>

On Mon, 2017-05-22 at 17:24 +0200, Paul Fiterau Brostean wrote:
> Hello esteemed Linux Developers,
> 
> My name is Paul, I am a PhD student. I sent a different question a while 
> back to the netdev mailing list, and never got a response. This question 
> should be a lot easier to address. While doing experiments on the Linux 
> TCP stack as part of a research project, I have stumbled upon a 
> potential inconsistency with the RFC specification.
> 
> The Linux TCP stack considers a received sequence number as in-window or 
> acceptable, if the sequence number of the segment is between the 
> expected sequence number and the expected sequence number plus the size 
> of the receive window. Naturally, the lower bound is included in the 
> range. What's a bit weird is that the upper bound of this range is also 
> considered in-window. This is evident both from my experiments and from 
> the code 
> (http://elixir.free-electrons.com/linux/v4.11/source/net/ipv4/tcp_input.c#L3985).
> 
> The RFC states that the upper bound shouldn't be considered. If we look 
> at: https://tools.ietf.org/html/rfc793#page-26  the acceptability 
> conditions exclude  RCV.NXT+RCV.WND (where applicable). Is there a 
> reason for Linux including the upper bound? Or can this be fixed?
> 
> Analyzing FreeBSD, they seem to have adopted the RFC standard, and have 
> not included the upper bound.
> 
> 
> As an aside, my work involves automatic inference of models from 
> software components. We obtained models for FreeBSD and Linux TCP 
> clients and comparing them we were able to spot this minor difference. 
> The models we can obtain automatically abstract away from many 
> complexities (like timing, re-transmissions), and only consider socket 
> calls and flags/seq/ack numbers (payloads are 0). I attached a Linux 
> model to give you an example. If you look at the ESTABLISHED state, 
> receiving a RST  segment (R), prompts the Linux system to respond with a 
> challenge ACK segment (A) if the sequence number (p1) satisfies the 
> condition: 'r1+win >=p1 && r1<p1' where 'r1' is the expected sequence 
> number and 'win' is the receive window size.
> 
> Thanks for your attention, Paul.


Hi Paul

I am planning to send a fix for this.

( Internal Google Bug Id : 37204158,  filled April 10th )

I did replied to you, but I got other more urgent work to do.

Thanks.

^ permalink raw reply

* Re: [PATCH] cfg80211: Be able to set bss expire time at config stage.
From: Enric Balletbo i Serra @ 2017-05-22 16:59 UTC (permalink / raw)
  To: Johannes Berg, Dan Williams, David S . Miller, linux-wireless
  Cc: netdev, linux-kernel, Dmitry Shmidt, helmut.schaa
In-Reply-To: <1495470254.26008.3.camel@sipsolutions.net>

Hi,

On 22/05/17 18:24, Johannes Berg wrote:
> 
>> Couldn't userspace just look at NL80211_BSS_SEEN_MS_AGO to filter and
>> create its own list?  Given that the kernel provides the information
>> userspace needs to figure out the age of a particular BSS, it doesn't
>> seem like there needs to be a kernel tunable for this.  Userspace can
>> already avoid stale results.
> 
> Yeah, I agree. It can also ask for a flush, so that old results are
> gone by the time the next scan returns. We don't have a flush operation
> without requesting a new scan, but I guess that could be added.
> 

Ok, guess I understand what you're saying. Thanks for pointing me in the right
direction.

>> Also, different runtime situations might want different result ages,
>> which wouldn't be possible if the kernel had a hardcoded maximum. 
>> Furthermore, different userspace apps might be reading the same scan
>> list, and they might have different ideas about staleness.
>>
>> Or perhaps I misunderstand the problem, which could well be the case.
> 
> No, I think this is perfectly right - userspace should be able to deal
> with this given the tools we gave it, or if not, we should probably
> just give it more tools instead of hardcoding the kernel configuration.
> 
> This value really just kinda needed to be an upper bound so that we
> don't start expiring entries while we're still scanning.
> 
> johannes
> 

^ permalink raw reply

* Re: [PATCH 3/3] stmmac: pci: Use dmi_system_id table for retrieving PHY addresses
From: Andy Shevchenko @ 2017-05-22 16:59 UTC (permalink / raw)
  To: Jan Kiszka
  Cc: Giuseppe Cavallaro, Alexandre Torgue, David Miller, netdev,
	linux-kernel@vger.kernel.org
In-Reply-To: <c8e6966227a9c2981e822b2deac8c036651b088c.1495451529.git.jan.kiszka@siemens.com>

On Mon, May 22, 2017 at 2:12 PM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> Avoids reimplementation of DMI matching in stmmac_pci_find_phy_addr.

>  struct stmmac_pci_dmi_data {
> -       const char *name;
> -       const char *asset_tag;
> -       unsigned int func;
> +       int func;
>         int phy_addr;
>  };

Perhaps
  struct stmmac_pci_dmi_data {
     unsigned int func;
     int phy_addr;
  };

struct stmmac_pci_info {
  struct stmmac_pci_dmi_data *data;
  size_t nmaps;
 (*setup)(struct plat_stmmacenet_data *plat, struct stmmac_pci_info *info);
};

static const struct stmmac_pci_dmi_data galileo_stmmac_dmi_data[] = {
        {
                 .func = 6,
                 .phy_addr = 1,
        },
};

static struct stmmac_pci_info galileo_pci_info  = {
 .map = galileo_stmmac_dmi_data,
 .nmaps = ARRAY_SIZE(galileo_stmmac_dmi_data),
 .setup = quark_default_setup,
}


?

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply

* Re: [PATCH 2/5] sctp: Delete an error message for a failed memory allocation in sctp_init()
From: Marcelo Ricardo Leitner @ 2017-05-22 16:56 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: linux-sctp, netdev, David S. Miller, Neil Horman, Vlad Yasevich,
	LKML, kernel-janitors
In-Reply-To: <7db0cb49-109b-88a6-532f-c591cc8ffa85@users.sourceforge.net>

On Mon, May 22, 2017 at 06:38:21PM +0200, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Mon, 22 May 2017 17:28:14 +0200
> 
> Omit an extra message for a memory allocation failure in this function.
> 
> This issue was detected by using the Coccinelle software.
> 
> Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
>  net/sctp/protocol.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
> index 2b1a6215bd2f..5e7c8a344770 100644
> --- a/net/sctp/protocol.c
> +++ b/net/sctp/protocol.c
> @@ -1447,5 +1447,4 @@ static __init int sctp_init(void)
>  	if (!sctp_ep_hashtable) {
> -		pr_err("Failed endpoint_hash alloc\n");

Okay but then why not also delete the one a few lines below this one:
        if (!sctp_port_hashtable) {
                pr_err("Failed bind hash alloc\n");
                status = -ENOMEM;
                goto err_bhash_alloc;
        }
Seems the same pattern to me.

>  		status = -ENOMEM;
>  		goto err_ehash_alloc;
>  	}
> -- 
> 2.13.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply

* Re: [PATCH net-next 01/11] qede: Fix sparse warnings
From: David Miller @ 2017-05-22 16:54 UTC (permalink / raw)
  To: Yuval.Mintz; +Cc: netdev, Manish.Chopra
In-Reply-To: <BLUPR0701MB2004062F133B0DD22E817C6C8DF80@BLUPR0701MB2004.namprd07.prod.outlook.com>

From: "Mintz, Yuval" <Yuval.Mintz@cavium.com>
Date: Mon, 22 May 2017 16:48:25 +0000

> 
> 
>> -----Original Message-----
>> From: David Miller [mailto:davem@davemloft.net]
>> Sent: Monday, May 22, 2017 7:38 PM
>> To: Mintz, Yuval <Yuval.Mintz@cavium.com>
>> Cc: netdev@vger.kernel.org; Chopra, Manish <Manish.Chopra@cavium.com>
>> Subject: Re: [PATCH net-next 01/11] qede: Fix sparse warnings
>> 
>> From: Yuval Mintz <Yuval.Mintz@cavium.com>
>> Date: Mon, 22 May 2017 14:32:01 +0300
>> 
>> > From: Manish Chopra <Manish.Chopra@cavium.com>
>> >
>> > Signed-off-by: Manish Chopra <Manish.Chopra@cavium.com>
>> > Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
>> > ---
>> >  drivers/net/ethernet/qlogic/qede/qede_dcbnl.c   |  1 -
>> >  drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 10 ++++++----
>> >  drivers/net/ethernet/qlogic/qede/qede_fp.c      | 25 ++++++++++++++-------
>> ----
>> >  drivers/net/ethernet/qlogic/qede/qede_roce.c    |  4 ++--
>> >  4 files changed, 22 insertions(+), 18 deletions(-)
>> >
>> > diff --git a/drivers/net/ethernet/qlogic/qede/qede_dcbnl.c
>> > b/drivers/net/ethernet/qlogic/qede/qede_dcbnl.c
>> > index a9e7379..6e7747b 100644
>> > --- a/drivers/net/ethernet/qlogic/qede/qede_dcbnl.c
>> > +++ b/drivers/net/ethernet/qlogic/qede/qede_dcbnl.c
>> > @@ -313,7 +313,6 @@ static int qede_dcbnl_ieee_peer_getets(struct
>> net_device *netdev,
>> >  	.ieee_setets = qede_dcbnl_ieee_setets,
>> >  	.ieee_getapp = qede_dcbnl_ieee_getapp,
>> >  	.ieee_setapp = qede_dcbnl_ieee_setapp,
>> > -	.getdcbx = qede_dcbnl_getdcbx,
>> >  	.ieee_peer_getpfc = qede_dcbnl_ieee_peer_getpfc,
>> >  	.ieee_peer_getets = qede_dcbnl_ieee_peer_getets,
>> >  	.getstate = qede_dcbnl_getstate,
>> 
>> Please.
>> 
>> This is exactly the problem when such a terse commit message, or lack of any
>> message at all as is the case here, occurs.
>> 
>> I have no idea what removing this method assignment has to do with fixing
>> sparse warnings.
> 
> It's currently defined twice in the qede_dcbnl_ops struct -

Ok, so what's important is that you don't just post a patch with no
commit message, just saying "sparse warning fixes."

At a minimum, if you're too lazy to explain what exactly each thing
is fixing, provide the sparse warnings you are eliminating in the
commit message.

^ permalink raw reply

* Re: [PATCH net-next] geneve: always fill CSUM6_RX configuration
From: Eric Garver @ 2017-05-22 16:50 UTC (permalink / raw)
  To: Pravin Shelar; +Cc: Linux Kernel Network Developers
In-Reply-To: <CAOrHB_BnX9P9ONLvZcBj+M2_ZbOyGqtu+nYNuP5XBtJc2yUfMw@mail.gmail.com>

On Sat, May 20, 2017 at 09:56:44PM -0700, Pravin Shelar wrote:
> On Sat, May 20, 2017 at 6:35 AM, Eric Garver <e@erig.me> wrote:
> > On Fri, May 19, 2017 at 06:57:46PM -0700, Pravin Shelar wrote:
> >> On Thu, May 18, 2017 at 12:59 PM, Eric Garver <e@erig.me> wrote:
> >> > CSMU6_RX is relevant for collect_metadata as well. As such leave it
> >> > outside of the dev's IPv4/IPv6 checks.
> >> >
> >> Can you explain it bit? is this flag used with ipv4 tunnels?
> >
> > It's used with collect_metadata as both ipv4 and ipv6 sockets will be
> > created.
> >
> > openvswitch recently gained support for creating tunnels with rtnetlink.
> > It sets COLLECT_METADATA and CSUM6_RX. After create, it does a get to
> > verify the device got created with all the requested configuration. The
> > verify was failing due to CSUM6_RX not being returned.
> >
> > Since ip_tunnel_info_af() defaults to returning AF_INET, we fall into
> > the IPv4 case and CSUM6_RX is never returned. Other relevant areas that
> > call ip_tunnel_info_af() do so using the info from the skb, not the
> > geneve_dev.
> >
> ok.
> I think ip_tunnel_info_af() check is not right. it does not work in
> case of collect_metadata.
> Better fix would be check for genene->sock4 and genene->sock6 and
> build the netlink skb accordingly.

Agreed. That's a better idea.

Lets drop this patch. I'll work on one to look at the actual sockets
instead.

Thanks Pravin.

^ permalink raw reply

* [PATCH v9 09/15] scsi: csiostor: Replace PCI pool old API
From: Romain Perier @ 2017-05-22 16:49 UTC (permalink / raw)
  To: Dan Williams, Doug Ledford, Sean Hefty, Hal Rosenstock,
	jeffrey.t.kirsher, David S. Miller, stas.yakovlev,
	James E.J. Bottomley, Martin K. Petersen, Felipe Balbi,
	Greg Kroah-Hartman
  Cc: linux-rdma, netdev, linux-usb, linux-scsi, linux-kernel,
	Romain Perier, Peter Senna Tschudin
In-Reply-To: <20170522164907.22915-1-romain.perier@collabora.com>

The PCI pool API is deprecated. This commit replaces the PCI pool old
API by the appropriate function with the DMA pool API. It also updates
the name of some variables and the content of comments, accordingly.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
Reviewed-by: Peter Senna Tschudin <peter.senna@collabora.com>
---
 drivers/scsi/csiostor/csio_hw.h   |  2 +-
 drivers/scsi/csiostor/csio_init.c | 11 ++++++-----
 drivers/scsi/csiostor/csio_scsi.c |  6 +++---
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/scsi/csiostor/csio_hw.h b/drivers/scsi/csiostor/csio_hw.h
index 62758e830d3b..61c09daabb20 100644
--- a/drivers/scsi/csiostor/csio_hw.h
+++ b/drivers/scsi/csiostor/csio_hw.h
@@ -464,7 +464,7 @@ struct csio_hw {
 	struct csio_pport	pport[CSIO_MAX_PPORTS];	/* Ports (XGMACs) */
 	struct csio_hw_params	params;			/* Hw parameters */
 
-	struct pci_pool		*scsi_pci_pool;		/* PCI pool for SCSI */
+	struct dma_pool		*scsi_dma_pool;		/* DMA pool for SCSI */
 	mempool_t		*mb_mempool;		/* Mailbox memory pool*/
 	mempool_t		*rnode_mempool;		/* rnode memory pool */
 
diff --git a/drivers/scsi/csiostor/csio_init.c b/drivers/scsi/csiostor/csio_init.c
index ea0c31086cc6..d5fb016b5fc2 100644
--- a/drivers/scsi/csiostor/csio_init.c
+++ b/drivers/scsi/csiostor/csio_init.c
@@ -485,9 +485,10 @@ csio_resource_alloc(struct csio_hw *hw)
 	if (!hw->rnode_mempool)
 		goto err_free_mb_mempool;
 
-	hw->scsi_pci_pool = pci_pool_create("csio_scsi_pci_pool", hw->pdev,
-					    CSIO_SCSI_RSP_LEN, 8, 0);
-	if (!hw->scsi_pci_pool)
+	hw->scsi_dma_pool = dma_pool_create("csio_scsi_dma_pool",
+					    &hw->pdev->dev, CSIO_SCSI_RSP_LEN,
+					    8, 0);
+	if (!hw->scsi_dma_pool)
 		goto err_free_rn_pool;
 
 	return 0;
@@ -505,8 +506,8 @@ csio_resource_alloc(struct csio_hw *hw)
 static void
 csio_resource_free(struct csio_hw *hw)
 {
-	pci_pool_destroy(hw->scsi_pci_pool);
-	hw->scsi_pci_pool = NULL;
+	dma_pool_destroy(hw->scsi_dma_pool);
+	hw->scsi_dma_pool = NULL;
 	mempool_destroy(hw->rnode_mempool);
 	hw->rnode_mempool = NULL;
 	mempool_destroy(hw->mb_mempool);
diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c
index a1ff75f1384f..dab0d3f9bee1 100644
--- a/drivers/scsi/csiostor/csio_scsi.c
+++ b/drivers/scsi/csiostor/csio_scsi.c
@@ -2445,7 +2445,7 @@ csio_scsim_init(struct csio_scsim *scm, struct csio_hw *hw)
 
 		/* Allocate Dma buffers for Response Payload */
 		dma_buf = &ioreq->dma_buf;
-		dma_buf->vaddr = pci_pool_alloc(hw->scsi_pci_pool, GFP_KERNEL,
+		dma_buf->vaddr = dma_pool_alloc(hw->scsi_dma_pool, GFP_KERNEL,
 						&dma_buf->paddr);
 		if (!dma_buf->vaddr) {
 			csio_err(hw,
@@ -2485,7 +2485,7 @@ csio_scsim_init(struct csio_scsim *scm, struct csio_hw *hw)
 		ioreq = (struct csio_ioreq *)tmp;
 
 		dma_buf = &ioreq->dma_buf;
-		pci_pool_free(hw->scsi_pci_pool, dma_buf->vaddr,
+		dma_pool_free(hw->scsi_dma_pool, dma_buf->vaddr,
 			      dma_buf->paddr);
 
 		kfree(ioreq);
@@ -2516,7 +2516,7 @@ csio_scsim_exit(struct csio_scsim *scm)
 		ioreq = (struct csio_ioreq *)tmp;
 
 		dma_buf = &ioreq->dma_buf;
-		pci_pool_free(scm->hw->scsi_pci_pool, dma_buf->vaddr,
+		dma_pool_free(scm->hw->scsi_dma_pool, dma_buf->vaddr,
 			      dma_buf->paddr);
 
 		kfree(ioreq);
-- 
2.11.0

^ permalink raw reply related

* Re: [PATCHv4] wlcore: add wl1285 compatible
From: Rob Herring @ 2017-05-22 16:50 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Kalle Valo, David Miller, Tony Lindgren, Marcel Holtmann,
	linux-wireless, linux-omap, linux-kernel@vger.kernel.org, netdev
In-Reply-To: <20170522162114.w4pw25pcecsm6lhi@earth>

On Mon, May 22, 2017 at 11:21 AM, Sebastian Reichel
<sebastian.reichel@collabora.co.uk> wrote:
> Hi,
>
> On Mon, May 22, 2017 at 11:11:49AM -0500, Rob Herring wrote:
>> On Mon, May 22, 2017 at 10:21 AM, Sebastian Reichel
>> <sebastian.reichel@collabora.co.uk> wrote:
>> > Hi,
>> >
>> > On Mon, May 22, 2017 at 05:44:24PM +0300, Kalle Valo wrote:
>> >> David Miller <davem@davemloft.net> writes:
>> >> > From: Kalle Valo <kvalo@codeaurora.org>
>> >> > Date: Mon, 22 May 2017 12:28:20 +0300
>> >> >
>> >> >> Sebastian Reichel <sebastian.reichel@collabora.co.uk> writes:
>> >> >>
>> >> >>> Motorola Droid 4 uses a WL1285C. With differences between the
>> >> >>> chips not being public let's add explicit binding for wl1285
>> >> >>> instead of relying on wl1283 being very similar.
>> >> >>>
>> >> >>> Reviewed-by: Rob Herring <robh@kernel.org>
>> >> >>> Acked-by: Kalle Valo <kvalo@codeaurora.org>
>> >> >>> Acked-by: Tony Lindgren <tony@atomide.com>
>> >> >>> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
>> >> >>> ---
>> >> >>> Hi Dave,
>> >> >>>
>> >> >>> I previously send this in two patches, but its hard to apply without
>> >> >>> requiring multiple kernel releases (the driver must be updated before
>> >> >>> the DTS change). Since the actual change is not very complex Marcel
>> >> >>> Holtmann & Tony Lindgren suggested, that I send this directly to you
>> >> >>> in a single patch for inclusion into 4.12. This also means, that the
>> >> >>> remaining series can be queued normally for 4.13.
>> >> >>
>> >> >> I noticed that Dave set this patch to Awaiting Upstream state on his
>> >> >> patchwork:
>> >> >>
>> >> >> https://patchwork.ozlabs.org/patch/759042/
>> >> >>
>> >> >> Which makes me suspect that he is waiting me to apply this (as I
>> >> >> normally apply wlcore patches). Dave, should I actually take this patch?
>> >> >> What do you prefer?
>> >> >
>> >> > Anything that touches wireless drivers I defer to you, yes.
>> >>
>> >> Thanks, I'll take it then. Not sure why Sebastian was suggested to
>> >> submit this patch via your tree in the first place.
>> >>
>> >> https://patchwork.kernel.org/patch/9713645/
>> >
>> > Thanks. The idea was to get into early 4.12-rc to avoid merge
>> > conflicts in the droid 4 *.dts during 4.13 cycle. This strategy
>> > obviously failed :)
>>
>> First, I'm not sure why you combined everything. A maintainer can just
>> as easily take a series as a single patch and we prefer binding doc,
>> dts and driver changes all separate.
>>
>> Second, the dts changes could go thru arm-soc and the driver change
>> thru netdev. The binding doc can be thru either. There's no bisecting
>> dependency and things shouldn't break. It just won't all work until
>> you have both branches.
>
> This is only true for new devices. WLAN for droid4 works at the
> moment using incorrect compatible string. If *.dts is updated and
> driver is not yet updated WLAN does not work. IMHO that is a
> bisecting dependency.

True. That's also breaking compatibility if a new kernel doesn't work
with an old DT. Is it just a compatible string change? If so, then
just keep the old string as a fallback.

Rob

^ permalink raw reply

* [PATCH v9 15/15] PCI: Remove PCI pool macro functions
From: Romain Perier @ 2017-05-22 16:49 UTC (permalink / raw)
  To: Dan Williams, Doug Ledford, Sean Hefty, Hal Rosenstock,
	jeffrey.t.kirsher-ral2JQCrhuEAvxtiuMwx3w, David S. Miller,
	stas.yakovlev-Re5JQEeQqe8AvxtiuMwx3w, James E.J. Bottomley,
	Martin K. Petersen, Felipe Balbi, Greg Kroah-Hartman
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-scsi-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Romain Perier,
	Peter Senna Tschudin
In-Reply-To: <20170522164907.22915-1-romain.perier-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>

Now that all the drivers use dma pool API, we can remove the macro
functions for PCI pool.

Signed-off-by: Romain Perier <romain.perier-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
Reviewed-by: Peter Senna Tschudin <peter.senna-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
---
 include/linux/pci.h | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/include/linux/pci.h b/include/linux/pci.h
index 5026f2ae86db..413511feba61 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1281,15 +1281,6 @@ int pci_set_vga_state(struct pci_dev *pdev, bool decode,
 #include <linux/pci-dma.h>
 #include <linux/dmapool.h>
 
-#define	pci_pool dma_pool
-#define pci_pool_create(name, pdev, size, align, allocation) \
-		dma_pool_create(name, &pdev->dev, size, align, allocation)
-#define	pci_pool_destroy(pool) dma_pool_destroy(pool)
-#define	pci_pool_alloc(pool, flags, handle) dma_pool_alloc(pool, flags, handle)
-#define	pci_pool_zalloc(pool, flags, handle) \
-		dma_pool_zalloc(pool, flags, handle)
-#define	pci_pool_free(pool, vaddr, addr) dma_pool_free(pool, vaddr, addr)

^ permalink raw reply related

* [PATCH v9 14/15] scsi: pmcraid: Replace PCI pool old API
From: Romain Perier @ 2017-05-22 16:49 UTC (permalink / raw)
  To: Dan Williams, Doug Ledford, Sean Hefty, Hal Rosenstock,
	jeffrey.t.kirsher, David S. Miller, stas.yakovlev,
	James E.J. Bottomley, Martin K. Petersen, Felipe Balbi,
	Greg Kroah-Hartman
  Cc: linux-rdma, netdev, linux-usb, linux-scsi, linux-kernel,
	Romain Perier, Peter Senna Tschudin
In-Reply-To: <20170522164907.22915-1-romain.perier@collabora.com>

The PCI pool API is deprecated. This commit replaces the PCI pool old
API by the appropriate function with the DMA pool API.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
Acked-by: Peter Senna Tschudin <peter.senna@collabora.com>
Tested-by: Peter Senna Tschudin <peter.senna@collabora.com>
---
 drivers/scsi/pmcraid.c | 10 +++++-----
 drivers/scsi/pmcraid.h |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index 1cc814f1505a..1f8b1533d0c4 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -4655,13 +4655,13 @@ pmcraid_release_control_blocks(
 		return;
 
 	for (i = 0; i < max_index; i++) {
-		pci_pool_free(pinstance->control_pool,
+		dma_pool_free(pinstance->control_pool,
 			      pinstance->cmd_list[i]->ioa_cb,
 			      pinstance->cmd_list[i]->ioa_cb_bus_addr);
 		pinstance->cmd_list[i]->ioa_cb = NULL;
 		pinstance->cmd_list[i]->ioa_cb_bus_addr = 0;
 	}
-	pci_pool_destroy(pinstance->control_pool);
+	dma_pool_destroy(pinstance->control_pool);
 	pinstance->control_pool = NULL;
 }
 
@@ -4718,8 +4718,8 @@ static int pmcraid_allocate_control_blocks(struct pmcraid_instance *pinstance)
 		pinstance->host->unique_id);
 
 	pinstance->control_pool =
-		pci_pool_create(pinstance->ctl_pool_name,
-				pinstance->pdev,
+		dma_pool_create(pinstance->ctl_pool_name,
+				&pinstance->pdev->dev,
 				sizeof(struct pmcraid_control_block),
 				PMCRAID_IOARCB_ALIGNMENT, 0);
 
@@ -4728,7 +4728,7 @@ static int pmcraid_allocate_control_blocks(struct pmcraid_instance *pinstance)
 
 	for (i = 0; i < PMCRAID_MAX_CMD; i++) {
 		pinstance->cmd_list[i]->ioa_cb =
-			pci_pool_alloc(
+			dma_pool_alloc(
 				pinstance->control_pool,
 				GFP_KERNEL,
 				&(pinstance->cmd_list[i]->ioa_cb_bus_addr));
diff --git a/drivers/scsi/pmcraid.h b/drivers/scsi/pmcraid.h
index 01eb2bc16dc1..8bfac72a242b 100644
--- a/drivers/scsi/pmcraid.h
+++ b/drivers/scsi/pmcraid.h
@@ -755,7 +755,7 @@ struct pmcraid_instance {
 
 	/* structures related to command blocks */
 	struct kmem_cache *cmd_cachep;		/* cache for cmd blocks */
-	struct pci_pool *control_pool;		/* pool for control blocks */
+	struct dma_pool *control_pool;		/* pool for control blocks */
 	char   cmd_pool_name[64];		/* name of cmd cache */
 	char   ctl_pool_name[64];		/* name of control cache */
 
-- 
2.11.0

^ permalink raw reply related

* [PATCH v9 13/15] scsi: mvsas: Replace PCI pool old API
From: Romain Perier @ 2017-05-22 16:49 UTC (permalink / raw)
  To: Dan Williams, Doug Ledford, Sean Hefty, Hal Rosenstock,
	jeffrey.t.kirsher, David S. Miller, stas.yakovlev,
	James E.J. Bottomley, Martin K. Petersen, Felipe Balbi,
	Greg Kroah-Hartman
  Cc: linux-rdma, netdev, linux-usb, linux-scsi, linux-kernel,
	Romain Perier, Peter Senna Tschudin
In-Reply-To: <20170522164907.22915-1-romain.perier@collabora.com>

The PCI pool API is deprecated. This commit replaces the PCI pool old
API by the appropriate function with the DMA pool API.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
Reviewed-by: Peter Senna Tschudin <peter.senna@collabora.com>
---
 drivers/scsi/mvsas/mv_init.c | 6 +++---
 drivers/scsi/mvsas/mv_sas.c  | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c
index 4e047b5001a6..1d53410334cc 100644
--- a/drivers/scsi/mvsas/mv_init.c
+++ b/drivers/scsi/mvsas/mv_init.c
@@ -125,8 +125,7 @@ static void mvs_free(struct mvs_info *mvi)
 	else
 		slot_nr = MVS_CHIP_SLOT_SZ;
 
-	if (mvi->dma_pool)
-		pci_pool_destroy(mvi->dma_pool);
+	dma_pool_destroy(mvi->dma_pool);
 
 	if (mvi->tx)
 		dma_free_coherent(mvi->dev,
@@ -296,7 +295,8 @@ static int mvs_alloc(struct mvs_info *mvi, struct Scsi_Host *shost)
 		goto err_out;
 
 	sprintf(pool_name, "%s%d", "mvs_dma_pool", mvi->id);
-	mvi->dma_pool = pci_pool_create(pool_name, mvi->pdev, MVS_SLOT_BUF_SZ, 16, 0);
+	mvi->dma_pool = dma_pool_create(pool_name, &mvi->pdev->dev,
+					MVS_SLOT_BUF_SZ, 16, 0);
 	if (!mvi->dma_pool) {
 			printk(KERN_DEBUG "failed to create dma pool %s.\n", pool_name);
 			goto err_out;
diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
index c7cc8035eacb..ee81d10252e0 100644
--- a/drivers/scsi/mvsas/mv_sas.c
+++ b/drivers/scsi/mvsas/mv_sas.c
@@ -790,7 +790,7 @@ static int mvs_task_prep(struct sas_task *task, struct mvs_info *mvi, int is_tmf
 	slot->n_elem = n_elem;
 	slot->slot_tag = tag;
 
-	slot->buf = pci_pool_alloc(mvi->dma_pool, GFP_ATOMIC, &slot->buf_dma);
+	slot->buf = dma_pool_alloc(mvi->dma_pool, GFP_ATOMIC, &slot->buf_dma);
 	if (!slot->buf) {
 		rc = -ENOMEM;
 		goto err_out_tag;
@@ -840,7 +840,7 @@ static int mvs_task_prep(struct sas_task *task, struct mvs_info *mvi, int is_tmf
 	return rc;
 
 err_out_slot_buf:
-	pci_pool_free(mvi->dma_pool, slot->buf, slot->buf_dma);
+	dma_pool_free(mvi->dma_pool, slot->buf, slot->buf_dma);
 err_out_tag:
 	mvs_tag_free(mvi, tag);
 err_out:
@@ -918,7 +918,7 @@ static void mvs_slot_task_free(struct mvs_info *mvi, struct sas_task *task,
 	}
 
 	if (slot->buf) {
-		pci_pool_free(mvi->dma_pool, slot->buf, slot->buf_dma);
+		dma_pool_free(mvi->dma_pool, slot->buf, slot->buf_dma);
 		slot->buf = NULL;
 	}
 	list_del_init(&slot->entry);
-- 
2.11.0

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox