* [RFC PATCH net 3/3] uapi, net/smc: provide socket state constants in UAPI
From: Eugene Syromiatnikov @ 2018-10-07 16:35 UTC (permalink / raw)
To: netdev
Cc: David S. Miller, linux-kernel, Ursula Braun, Karsten Graul,
Hans Wippel, linux-s390
In-Reply-To: <cover.1538929504.git.esyr@redhat.com>
As socket state itself is already exposed via sock_diag interface.
Fixes: ac7138746e14 ("smc: establish new socket family")
Fixes: b38d732477e4 ("smc: socket closing and linkgroup cleanup")
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
---
include/uapi/linux/smc_diag.h | 17 +++++++++++++++++
net/smc/smc.h | 18 +-----------------
2 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/include/uapi/linux/smc_diag.h b/include/uapi/linux/smc_diag.h
index 8cb3a6f..6798ec0 100644
--- a/include/uapi/linux/smc_diag.h
+++ b/include/uapi/linux/smc_diag.h
@@ -31,6 +31,23 @@ struct smc_diag_msg {
__aligned_u64 diag_inode;
};
+enum smc_state { /* possible states of an SMC socket */
+ SMC_ACTIVE = 1,
+ SMC_INIT = 2,
+ SMC_CLOSED = 7,
+ SMC_LISTEN = 10,
+ /* normal close */
+ SMC_PEERCLOSEWAIT1 = 20,
+ SMC_PEERCLOSEWAIT2 = 21,
+ SMC_APPFINCLOSEWAIT = 24,
+ SMC_APPCLOSEWAIT1 = 22,
+ SMC_APPCLOSEWAIT2 = 23,
+ SMC_PEERFINCLOSEWAIT = 25,
+ /* abnormal close */
+ SMC_PEERABORTWAIT = 26,
+ SMC_PROCESSABORT = 27,
+};
+
/* Mode of a connection */
enum {
SMC_DIAG_MODE_SMCR,
diff --git a/net/smc/smc.h b/net/smc/smc.h
index f5ff2ee..16bfd64 100644
--- a/net/smc/smc.h
+++ b/net/smc/smc.h
@@ -16,6 +16,7 @@
#include <linux/compiler.h> /* __aligned */
#include <net/sock.h>
#include <linux/smc.h>
+#include <linux/smc_diag.h>
#include "smc_ib.h"
@@ -26,23 +27,6 @@ extern struct proto smc_proto6;
#define KERNEL_HAS_ATOMIC64
#endif
-enum smc_state { /* possible states of an SMC socket */
- SMC_ACTIVE = 1,
- SMC_INIT = 2,
- SMC_CLOSED = 7,
- SMC_LISTEN = 10,
- /* normal close */
- SMC_PEERCLOSEWAIT1 = 20,
- SMC_PEERCLOSEWAIT2 = 21,
- SMC_APPFINCLOSEWAIT = 24,
- SMC_APPCLOSEWAIT1 = 22,
- SMC_APPCLOSEWAIT2 = 23,
- SMC_PEERFINCLOSEWAIT = 25,
- /* abnormal close */
- SMC_PEERABORTWAIT = 26,
- SMC_PROCESSABORT = 27,
-};
-
struct smc_link_group;
struct smc_wr_rx_hdr { /* common prefix part of LLC and CDC to demultiplex */
--
2.1.4
^ permalink raw reply related
* [RFC PATCH net 2/3] uapi, net/smc: provide fallback diagnosis codes in UAPI
From: Eugene Syromiatnikov @ 2018-10-07 16:35 UTC (permalink / raw)
To: netdev
Cc: David S. Miller, linux-kernel, Ursula Braun, Karsten Graul,
Hans Wippel, linux-s390
In-Reply-To: <cover.1538929504.git.esyr@redhat.com>
Since they values to which these codes are corresponding are already
exposed via sock_diag interface.
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
---
include/uapi/linux/smc.h | 19 +++++++++++++++++++
net/smc/smc_clc.h | 16 ----------------
2 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/include/uapi/linux/smc.h b/include/uapi/linux/smc.h
index 10561f8..fc7a859 100644
--- a/include/uapi/linux/smc.h
+++ b/include/uapi/linux/smc.h
@@ -17,6 +17,25 @@
#define SMCPROTO_SMC 0 /* SMC protocol, IPv4 */
#define SMCPROTO_SMC6 1 /* SMC protocol, IPv6 */
+/* Diagnosis codes */
+#define SMC_CLC_DECL_MEM 0x01010000 /* insufficient memory resources */
+#define SMC_CLC_DECL_TIMEOUT_CL 0x02010000 /* timeout w4 QP confirm link */
+#define SMC_CLC_DECL_TIMEOUT_AL 0x02020000 /* timeout w4 QP add link */
+#define SMC_CLC_DECL_CNFERR 0x03000000 /* configuration error */
+#define SMC_CLC_DECL_PEERNOSMC 0x03010000 /* peer did not indicate SMC */
+#define SMC_CLC_DECL_IPSEC 0x03020000 /* IPsec usage */
+#define SMC_CLC_DECL_NOSMCDEV 0x03030000 /* no SMC device found */
+#define SMC_CLC_DECL_MODEUNSUPP 0x03040000 /* smc modes do not match (R or D)*/
+#define SMC_CLC_DECL_RMBE_EC 0x03050000 /* peer has eyecatcher in RMBE */
+#define SMC_CLC_DECL_OPTUNSUPP 0x03060000 /* fastopen sockopt not supported */
+#define SMC_CLC_DECL_SYNCERR 0x04000000 /* synchronization error */
+#define SMC_CLC_DECL_PEERDECL 0x05000000 /* peer declined during handshake */
+#define SMC_CLC_DECL_INTERR 0x99990000 /* internal error */
+#define SMC_CLC_DECL_ERR_RTOK 0x99990001 /* rtoken handling failed */
+#define SMC_CLC_DECL_ERR_RDYLNK 0x99990002 /* ib ready link failed */
+#define SMC_CLC_DECL_ERR_REGRMB 0x99990003 /* reg rmb failed */
+
+
/* Netlink SMC_PNETID attributes */
enum {
SMC_PNETID_UNSPEC,
diff --git a/net/smc/smc_clc.h b/net/smc/smc_clc.h
index 18da89b..d84845a 100644
--- a/net/smc/smc_clc.h
+++ b/net/smc/smc_clc.h
@@ -27,22 +27,6 @@
#define SMC_TYPE_D 1 /* SMC-D only */
#define SMC_TYPE_B 3 /* SMC-R and SMC-D */
#define CLC_WAIT_TIME (6 * HZ) /* max. wait time on clcsock */
-#define SMC_CLC_DECL_MEM 0x01010000 /* insufficient memory resources */
-#define SMC_CLC_DECL_TIMEOUT_CL 0x02010000 /* timeout w4 QP confirm link */
-#define SMC_CLC_DECL_TIMEOUT_AL 0x02020000 /* timeout w4 QP add link */
-#define SMC_CLC_DECL_CNFERR 0x03000000 /* configuration error */
-#define SMC_CLC_DECL_PEERNOSMC 0x03010000 /* peer did not indicate SMC */
-#define SMC_CLC_DECL_IPSEC 0x03020000 /* IPsec usage */
-#define SMC_CLC_DECL_NOSMCDEV 0x03030000 /* no SMC device found */
-#define SMC_CLC_DECL_MODEUNSUPP 0x03040000 /* smc modes do not match (R or D)*/
-#define SMC_CLC_DECL_RMBE_EC 0x03050000 /* peer has eyecatcher in RMBE */
-#define SMC_CLC_DECL_OPTUNSUPP 0x03060000 /* fastopen sockopt not supported */
-#define SMC_CLC_DECL_SYNCERR 0x04000000 /* synchronization error */
-#define SMC_CLC_DECL_PEERDECL 0x05000000 /* peer declined during handshake */
-#define SMC_CLC_DECL_INTERR 0x99990000 /* internal error */
-#define SMC_CLC_DECL_ERR_RTOK 0x99990001 /* rtoken handling failed */
-#define SMC_CLC_DECL_ERR_RDYLNK 0x99990002 /* ib ready link failed */
-#define SMC_CLC_DECL_ERR_REGRMB 0x99990003 /* reg rmb failed */
struct smc_clc_msg_hdr { /* header1 of clc messages */
u8 eyecatcher[4]; /* eye catcher */
--
2.1.4
^ permalink raw reply related
* [RFC PATCH net 0/3] net/smc: move some definitions to UAPI
From: Eugene Syromiatnikov @ 2018-10-07 16:34 UTC (permalink / raw)
To: netdev
Cc: David S. Miller, linux-kernel, Ursula Braun, Karsten Graul,
Hans Wippel, linux-s390
Hello.
As of now, it's a bit difficult to use SMC protocol, as significant part
of definitions related to it are defined in private headers and are not
part of UAPI. The following commits move some definitions to UAPI,
making them readily available to user space.
Eugene Syromiatnikov (3):
uapi, net/smc: move protocol constant definitions to UAPI
uapi, net/smc: provide fallback diagnosis codes in UAPI
uapi, net/smc: provide socket state constants in UAPI
include/uapi/linux/smc.h | 26 +++++++++++++++++++++++++-
include/uapi/linux/smc_diag.h | 17 +++++++++++++++++
net/smc/smc.h | 22 ++--------------------
net/smc/smc_clc.h | 16 ----------------
4 files changed, 44 insertions(+), 37 deletions(-)
--
2.1.4
^ permalink raw reply
* [PATCH rdma-next 4/4] IB/mlx5: Allow scatter to CQE without global signaled WRs
From: Leon Romanovsky @ 2018-10-07 9:03 UTC (permalink / raw)
To: Doug Ledford, Jason Gunthorpe
Cc: Leon Romanovsky, RDMA mailing list, Guy Levi, Yonatan Cohen,
Saeed Mahameed, linux-netdev
In-Reply-To: <20181007090337.21037-1-leon@kernel.org>
From: Yonatan Cohen <yonatanc@mellanox.com>
Requester scatter to CQE is restricted to QPs configured to signal
all WRs.
This patch adds ability to enable scatter to cqe (force enable)
in the requester without sig_all, for users who do not want all WRs
signaled but rather just the ones whose data found in the CQE.
Signed-off-by: Yonatan Cohen <yonatanc@mellanox.com>
Reviewed-by: Guy Levi <guyle@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
drivers/infiniband/hw/mlx5/qp.c | 14 +++++++++++---
include/uapi/rdma/mlx5-abi.h | 1 +
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index 17c4b6641933..4397b5f27125 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -1706,15 +1706,20 @@ static void configure_responder_scat_cqe(struct ib_qp_init_attr *init_attr,
static void configure_requester_scat_cqe(struct mlx5_ib_dev *dev,
struct ib_qp_init_attr *init_attr,
+ struct mlx5_ib_create_qp *ucmd,
void *qpc)
{
enum ib_qp_type qpt = init_attr->qp_type;
int scqe_sz;
+ bool allow_scat_cqe = 0;
if (qpt == IB_QPT_UC || qpt == IB_QPT_UD)
return;
- if (init_attr->sq_sig_type != IB_SIGNAL_ALL_WR)
+ if (ucmd)
+ allow_scat_cqe = ucmd->flags & MLX5_QP_FLAG_ALLOW_SCATTER_CQE;
+
+ if (!allow_scat_cqe && init_attr->sq_sig_type != IB_SIGNAL_ALL_WR)
return;
scqe_sz = mlx5_ib_get_cqe_size(init_attr->send_cq);
@@ -1735,7 +1740,8 @@ static void configure_requester_scat_cqe(struct mlx5_ib_dev *dev,
MLX5_QP_FLAG_TUNNEL_OFFLOADS | \
MLX5_QP_FLAG_BFREG_INDEX | \
MLX5_QP_FLAG_TYPE_DCT | \
- MLX5_QP_FLAG_TYPE_DCI))
+ MLX5_QP_FLAG_TYPE_DCI | \
+ MLX5_QP_FLAG_ALLOW_SCATTER_CQE))
static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,
struct ib_qp_init_attr *init_attr,
@@ -1969,7 +1975,9 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,
if (qp->scat_cqe && is_connected(init_attr->qp_type)) {
configure_responder_scat_cqe(init_attr, qpc);
- configure_requester_scat_cqe(dev, init_attr, qpc);
+ configure_requester_scat_cqe(dev, init_attr,
+ (pd && pd->uobject) ? &ucmd : NULL,
+ qpc);
}
if (qp->rq.wqe_cnt) {
diff --git a/include/uapi/rdma/mlx5-abi.h b/include/uapi/rdma/mlx5-abi.h
index 6056625237cf..8fa9f90e2bb1 100644
--- a/include/uapi/rdma/mlx5-abi.h
+++ b/include/uapi/rdma/mlx5-abi.h
@@ -47,6 +47,7 @@ enum {
MLX5_QP_FLAG_TYPE_DCI = 1 << 5,
MLX5_QP_FLAG_TIR_ALLOW_SELF_LB_UC = 1 << 6,
MLX5_QP_FLAG_TIR_ALLOW_SELF_LB_MC = 1 << 7,
+ MLX5_QP_FLAG_ALLOW_SCATTER_CQE = 1 << 8,
};
enum {
--
2.14.4
^ permalink raw reply related
* [PATCH rdma-next 3/4] IB/mlx5: Verify that driver supports user flags
From: Leon Romanovsky @ 2018-10-07 9:03 UTC (permalink / raw)
To: Doug Ledford, Jason Gunthorpe
Cc: Leon Romanovsky, RDMA mailing list, Guy Levi, Yonatan Cohen,
Saeed Mahameed, linux-netdev
In-Reply-To: <20181007090337.21037-1-leon@kernel.org>
From: Yonatan Cohen <yonatanc@mellanox.com>
Flags sent down from user might not be supported by
running driver.
This might lead to unwanted bugs.
To solve this, added macro to test for unsupported flags.
Signed-off-by: Yonatan Cohen <yonatanc@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
drivers/infiniband/hw/mlx5/qp.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index bae48bdf281c..17c4b6641933 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -1728,6 +1728,15 @@ static void configure_requester_scat_cqe(struct mlx5_ib_dev *dev,
MLX5_SET(qpc, qpc, cs_req, MLX5_REQ_SCAT_DATA32_CQE);
}
+#define MLX5_QP_CREATE_FLAGS_NOT_SUPPORTED(flags) \
+ ((flags) & ~( \
+ MLX5_QP_FLAG_SIGNATURE | \
+ MLX5_QP_FLAG_SCATTER_CQE | \
+ MLX5_QP_FLAG_TUNNEL_OFFLOADS | \
+ MLX5_QP_FLAG_BFREG_INDEX | \
+ MLX5_QP_FLAG_TYPE_DCT | \
+ MLX5_QP_FLAG_TYPE_DCI))
+
static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,
struct ib_qp_init_attr *init_attr,
struct ib_udata *udata, struct mlx5_ib_qp *qp)
@@ -1825,6 +1834,9 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,
return -EFAULT;
}
+ if (MLX5_QP_CREATE_FLAGS_NOT_SUPPORTED(ucmd.flags))
+ return -EINVAL;
+
err = get_qp_user_index(to_mucontext(pd->uobject->context),
&ucmd, udata->inlen, &uidx);
if (err)
--
2.14.4
^ permalink raw reply related
* [PATCH rdma-next 2/4] IB/mlx5: Support scatter to CQE for DC transport type
From: Leon Romanovsky @ 2018-10-07 9:03 UTC (permalink / raw)
To: Doug Ledford, Jason Gunthorpe
Cc: Leon Romanovsky, RDMA mailing list, Guy Levi, Yonatan Cohen,
Saeed Mahameed, linux-netdev
In-Reply-To: <20181007090337.21037-1-leon@kernel.org>
From: Yonatan Cohen <yonatanc@mellanox.com>
Scatter to CQE is a HW offload that saves PCI writes by scattering the
payload to the CQE.
This patch extends already existing functionality to support DC
transport type.
Signed-off-by: Yonatan Cohen <yonatanc@mellanox.com>
Reviewed-by: Guy Levi <guyle@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
drivers/infiniband/hw/mlx5/cq.c | 2 +-
drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 +-
drivers/infiniband/hw/mlx5/qp.c | 71 ++++++++++++++++++++++++++----------
3 files changed, 54 insertions(+), 21 deletions(-)
diff --git a/drivers/infiniband/hw/mlx5/cq.c b/drivers/infiniband/hw/mlx5/cq.c
index dae30b6478bf..a41519dc8d3a 100644
--- a/drivers/infiniband/hw/mlx5/cq.c
+++ b/drivers/infiniband/hw/mlx5/cq.c
@@ -1460,7 +1460,7 @@ int mlx5_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata)
return err;
}
-int mlx5_ib_get_cqe_size(struct mlx5_ib_dev *dev, struct ib_cq *ibcq)
+int mlx5_ib_get_cqe_size(struct ib_cq *ibcq)
{
struct mlx5_ib_cq *cq;
diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h
index e5ec3fdaa4d5..f52dfed1395d 100644
--- a/drivers/infiniband/hw/mlx5/mlx5_ib.h
+++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h
@@ -1127,7 +1127,7 @@ void __mlx5_ib_populate_pas(struct mlx5_ib_dev *dev, struct ib_umem *umem,
void mlx5_ib_populate_pas(struct mlx5_ib_dev *dev, struct ib_umem *umem,
int page_shift, __be64 *pas, int access_flags);
void mlx5_ib_copy_pas(u64 *old, u64 *new, int step, int num);
-int mlx5_ib_get_cqe_size(struct mlx5_ib_dev *dev, struct ib_cq *ibcq);
+int mlx5_ib_get_cqe_size(struct ib_cq *ibcq);
int mlx5_mr_cache_init(struct mlx5_ib_dev *dev);
int mlx5_mr_cache_cleanup(struct mlx5_ib_dev *dev);
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index fa8e5dc65cb4..bae48bdf281c 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -1053,7 +1053,8 @@ static u32 get_rx_type(struct mlx5_ib_qp *qp, struct ib_qp_init_attr *attr)
static int is_connected(enum ib_qp_type qp_type)
{
- if (qp_type == IB_QPT_RC || qp_type == IB_QPT_UC)
+ if (qp_type == IB_QPT_RC || qp_type == IB_QPT_UC ||
+ qp_type == MLX5_IB_QPT_DCI)
return 1;
return 0;
@@ -1684,6 +1685,49 @@ static int create_rss_raw_qp_tir(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp,
return err;
}
+static void configure_responder_scat_cqe(struct ib_qp_init_attr *init_attr,
+ void *qpc)
+{
+ int rcqe_sz;
+
+ if (init_attr->qp_type == MLX5_IB_QPT_DCI)
+ return;
+
+ rcqe_sz = mlx5_ib_get_cqe_size(init_attr->recv_cq);
+
+ if (rcqe_sz == 128) {
+ MLX5_SET(qpc, qpc, cs_res, MLX5_RES_SCAT_DATA64_CQE);
+ return;
+ }
+
+ if (init_attr->qp_type != MLX5_IB_QPT_DCT)
+ MLX5_SET(qpc, qpc, cs_res, MLX5_RES_SCAT_DATA32_CQE);
+}
+
+static void configure_requester_scat_cqe(struct mlx5_ib_dev *dev,
+ struct ib_qp_init_attr *init_attr,
+ void *qpc)
+{
+ enum ib_qp_type qpt = init_attr->qp_type;
+ int scqe_sz;
+
+ if (qpt == IB_QPT_UC || qpt == IB_QPT_UD)
+ return;
+
+ if (init_attr->sq_sig_type != IB_SIGNAL_ALL_WR)
+ return;
+
+ scqe_sz = mlx5_ib_get_cqe_size(init_attr->send_cq);
+ if (scqe_sz == 128) {
+ MLX5_SET(qpc, qpc, cs_req, MLX5_REQ_SCAT_DATA64_CQE);
+ return;
+ }
+
+ if (init_attr->qp_type != MLX5_IB_QPT_DCI ||
+ MLX5_CAP_GEN(dev->mdev, dc_req_scat_data_cqe))
+ MLX5_SET(qpc, qpc, cs_req, MLX5_REQ_SCAT_DATA32_CQE);
+}
+
static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,
struct ib_qp_init_attr *init_attr,
struct ib_udata *udata, struct mlx5_ib_qp *qp)
@@ -1787,7 +1831,8 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,
return err;
qp->wq_sig = !!(ucmd.flags & MLX5_QP_FLAG_SIGNATURE);
- qp->scat_cqe = !!(ucmd.flags & MLX5_QP_FLAG_SCATTER_CQE);
+ if (MLX5_CAP_GEN(dev->mdev, sctr_data_cqe))
+ qp->scat_cqe = !!(ucmd.flags & MLX5_QP_FLAG_SCATTER_CQE);
if (ucmd.flags & MLX5_QP_FLAG_TUNNEL_OFFLOADS) {
if (init_attr->qp_type != IB_QPT_RAW_PACKET ||
!tunnel_offload_supported(mdev)) {
@@ -1911,23 +1956,8 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,
MLX5_SET(qpc, qpc, cd_slave_receive, 1);
if (qp->scat_cqe && is_connected(init_attr->qp_type)) {
- int rcqe_sz;
- int scqe_sz;
-
- rcqe_sz = mlx5_ib_get_cqe_size(dev, init_attr->recv_cq);
- scqe_sz = mlx5_ib_get_cqe_size(dev, init_attr->send_cq);
-
- if (rcqe_sz == 128)
- MLX5_SET(qpc, qpc, cs_res, MLX5_RES_SCAT_DATA64_CQE);
- else
- MLX5_SET(qpc, qpc, cs_res, MLX5_RES_SCAT_DATA32_CQE);
-
- if (init_attr->sq_sig_type == IB_SIGNAL_ALL_WR) {
- if (scqe_sz == 128)
- MLX5_SET(qpc, qpc, cs_req, MLX5_REQ_SCAT_DATA64_CQE);
- else
- MLX5_SET(qpc, qpc, cs_req, MLX5_REQ_SCAT_DATA32_CQE);
- }
+ configure_responder_scat_cqe(init_attr, qpc);
+ configure_requester_scat_cqe(dev, init_attr, qpc);
}
if (qp->rq.wqe_cnt) {
@@ -2302,6 +2332,9 @@ static struct ib_qp *mlx5_ib_create_dct(struct ib_pd *pd,
MLX5_SET64(dctc, dctc, dc_access_key, ucmd->access_key);
MLX5_SET(dctc, dctc, user_index, uidx);
+ if (ucmd->flags & MLX5_QP_FLAG_SCATTER_CQE)
+ configure_responder_scat_cqe(attr, dctc);
+
qp->state = IB_QPS_RESET;
return &qp->ibqp;
--
2.14.4
^ permalink raw reply related
* [PATCH mlx5-next 1/4] net/mlx5: Expose DC scatter to CQE capability bit
From: Leon Romanovsky @ 2018-10-07 9:03 UTC (permalink / raw)
To: Doug Ledford, Jason Gunthorpe
Cc: Leon Romanovsky, RDMA mailing list, Guy Levi, Yonatan Cohen,
Saeed Mahameed, linux-netdev
In-Reply-To: <20181007090337.21037-1-leon@kernel.org>
From: Yonatan Cohen <yonatanc@mellanox.com>
dc_req_scat_data_cqe capability bit determines
if requester scatter to cqe is available for 64 bytes CQE over
DC transport type.
Signed-off-by: Yonatan Cohen <yonatanc@mellanox.com>
Reviewed-by: Guy Levi <guyle@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
include/linux/mlx5/mlx5_ifc.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h
index 68f4d5f9d929..0f460fb22c31 100644
--- a/include/linux/mlx5/mlx5_ifc.h
+++ b/include/linux/mlx5/mlx5_ifc.h
@@ -1005,7 +1005,8 @@ struct mlx5_ifc_cmd_hca_cap_bits {
u8 umr_modify_atomic_disabled[0x1];
u8 umr_indirect_mkey_disabled[0x1];
u8 umr_fence[0x2];
- u8 reserved_at_20c[0x3];
+ u8 dc_req_scat_data_cqe[0x1];
+ u8 reserved_at_20d[0x2];
u8 drain_sigerr[0x1];
u8 cmdif_checksum[0x2];
u8 sigerr_cqe[0x1];
--
2.14.4
^ permalink raw reply related
* [PATCH rdma-next 0/4] Scatter to CQE
From: Leon Romanovsky @ 2018-10-07 9:03 UTC (permalink / raw)
To: Doug Ledford, Jason Gunthorpe
Cc: Leon Romanovsky, RDMA mailing list, Guy Levi, Yonatan Cohen,
Saeed Mahameed, linux-netdev
From: Leon Romanovsky <leonro@mellanox.com>
>From Yonatan,
Scatter to CQE is a HW offload feature that saves PCI writes by scattering
the payload to the CQE.
The feature depends on the CQE size and if the CQE size is 64B, it will work
for payload smaller than 32. If the CQE size is 128B, it will work for payload
smaller than 64.
The feature works for responder and requestor:
1. For responder, if the payload is small as required above, the data will
be part of the CQE, and thus we save another PCI transaction the recv buffers.
2. For requestor, this can be used to get the RDMA_READ response and RDMA_ATOMIC
response in the CQE. This feature is already supported in upstream.
As part of this series, we are adding support for DC transport type and
ability to enable the feature (force enable) in the requestor when SQ
is not configured to signal all WRs.
Thanks
Yonatan Cohen (4):
net/mlx5: Expose DC scatter to CQE capability bit
IB/mlx5: Support scatter to CQE for DC transport type
IB/mlx5: Verify that driver supports user flags
IB/mlx5: Allow scatter to CQE without global signaled WRs
drivers/infiniband/hw/mlx5/cq.c | 2 +-
drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 +-
drivers/infiniband/hw/mlx5/qp.c | 91 ++++++++++++++++++++++++++++--------
include/linux/mlx5/mlx5_ifc.h | 3 +-
include/uapi/rdma/mlx5-abi.h | 1 +
5 files changed, 77 insertions(+), 22 deletions(-)
^ permalink raw reply
* [PATCH] bpf, doc: Document Jump X addressing mode
From: Arthur Fabre @ 2018-10-07 8:45 UTC (permalink / raw)
To: Alexei Starovoitov, Daniel Borkmann, David S. Miller,
Jonathan Corbet, netdev, linux-doc
Cc: Arthur Fabre
bpf_asm and the other classic BPF tools support jump conditions
comparing register A to register X, in addition to comparing register A
with constant K.
Only the latter was documented in filter.txt, add two new addressing
modes that describe the former.
Signed-off-by: Arthur Fabre <arthur@arthurfabre.com>
---
Documentation/networking/filter.txt | 30 +++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/Documentation/networking/filter.txt b/Documentation/networking/filter.txt
index e6b4ebb2b243..b90dad6fea6d 100644
--- a/Documentation/networking/filter.txt
+++ b/Documentation/networking/filter.txt
@@ -203,11 +203,11 @@ opcodes as defined in linux/filter.h stand for:
Instruction Addressing mode Description
- ld 1, 2, 3, 4, 10 Load word into A
+ ld 1, 2, 3, 4, 12 Load word into A
ldi 4 Load word into A
ldh 1, 2 Load half-word into A
ldb 1, 2 Load byte into A
- ldx 3, 4, 5, 10 Load word into X
+ ldx 3, 4, 5, 12 Load word into X
ldxi 4 Load word into X
ldxb 5 Load byte into X
@@ -216,14 +216,14 @@ opcodes as defined in linux/filter.h stand for:
jmp 6 Jump to label
ja 6 Jump to label
- jeq 7, 8 Jump on A == k
- jneq 8 Jump on A != k
- jne 8 Jump on A != k
- jlt 8 Jump on A < k
- jle 8 Jump on A <= k
- jgt 7, 8 Jump on A > k
- jge 7, 8 Jump on A >= k
- jset 7, 8 Jump on A & k
+ jeq 7, 8, 9, 10 Jump on A == <x>
+ jneq 9, 10 Jump on A != <x>
+ jne 9, 10 Jump on A != <x>
+ jlt 9, 10 Jump on A < <x>
+ jle 9, 10 Jump on A <= <x>
+ jgt 7, 8, 9, 10 Jump on A > <x>
+ jge 7, 8, 9, 10 Jump on A >= <x>
+ jset 7, 8, 9, 10 Jump on A & <x>
add 0, 4 A + <x>
sub 0, 4 A - <x>
@@ -240,7 +240,7 @@ opcodes as defined in linux/filter.h stand for:
tax Copy A into X
txa Copy X into A
- ret 4, 9 Return
+ ret 4, 11 Return
The next table shows addressing formats from the 2nd column:
@@ -254,9 +254,11 @@ The next table shows addressing formats from the 2nd column:
5 4*([k]&0xf) Lower nibble * 4 at byte offset k in the packet
6 L Jump label L
7 #k,Lt,Lf Jump to Lt if true, otherwise jump to Lf
- 8 #k,Lt Jump to Lt if predicate is true
- 9 a/%a Accumulator A
- 10 extension BPF extension
+ 8 x/%x,Lt,Lf Jump to Lt if true, otherwise jump to Lf
+ 9 #k,Lt Jump to Lt if predicate is true
+ 10 x/%x,Lt Jump to Lt if predicate is true
+ 11 a/%a Accumulator A
+ 12 extension BPF extension
The Linux kernel also has a couple of BPF extensions that are used along
with the class of load instructions by "overloading" the k argument with
--
2.19.1
^ permalink raw reply related
* Re: [PATCH net 2/2] net/smc: retain old name for diag_mode field
From: Sergei Shtylyov @ 2018-10-07 8:34 UTC (permalink / raw)
To: Eugene Syromiatnikov, netdev
Cc: David S. Miller, linux-kernel, Ursula Braun, Karsten Graul,
Hans Wippel
In-Reply-To: <20181006203226.GA11438@asgard.redhat.com>
On 10/6/2018 11:32 PM, Eugene Syromiatnikov wrote:
> Commit v4.19-rc1~140^2~285^2~4 changed the name of diag_fallback field
The commit citing style should be the same as in the "Fixes:" tag.
> of struct smc_diag_msg structure to diag_mode. However, this structure
> is a part of UAPI, and this change breaks user space applications that
> use it ([1], for example). Since the new name is more suitable, convert
> the field to a union that provides access to the data via both the new
> and the old name.
>
> [1] https://gitlab.com/strace/strace/blob/v4.24/netlink_smc_diag.c#L165
>
> Fixes: c601171d7a60 ("net/smc: provide smc mode in smc_diag.c")
> Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
[...]
MBR, Sergei
^ permalink raw reply
* [PATCH net v2 2/2] net/smc: retain old name for diag_mode field
From: Eugene Syromiatnikov @ 2018-10-07 14:57 UTC (permalink / raw)
To: netdev
Cc: David S. Miller, linux-kernel, Ursula Braun, Karsten Graul,
Hans Wippel, Sergei Shtylyov
Commit c601171d7a60 ("net/smc: provide smc mode in smc_diag.c") changed
the name of diag_fallback field of struct smc_diag_msg structure
to diag_mode. However, this structure is a part of UAPI, and this change
breaks user space applications that use it ([1], for example). Since
the new name is more suitable, convert the field to a union that provides
access to the data via both the new and the old name.
[1] https://gitlab.com/strace/strace/blob/v4.24/netlink_smc_diag.c#L165
Fixes: c601171d7a60 ("net/smc: provide smc mode in smc_diag.c")
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
---
include/uapi/linux/smc_diag.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/smc_diag.h b/include/uapi/linux/smc_diag.h
index 6180c6d..8cb3a6f 100644
--- a/include/uapi/linux/smc_diag.h
+++ b/include/uapi/linux/smc_diag.h
@@ -20,7 +20,10 @@ struct smc_diag_req {
struct smc_diag_msg {
__u8 diag_family;
__u8 diag_state;
- __u8 diag_mode;
+ union {
+ __u8 diag_mode;
+ __u8 diag_fallback; /* the old name of the field */
+ };
__u8 diag_shutdown;
struct inet_diag_sockid id;
--
2.1.4
^ permalink raw reply related
* [PATCH net v2 1/2] net/smc: use __aligned_u64 for 64-bit smc_diag fields
From: Eugene Syromiatnikov @ 2018-10-07 14:57 UTC (permalink / raw)
To: netdev
Cc: David S. Miller, linux-kernel, Ursula Braun, Karsten Graul,
Hans Wippel, Sergei Shtylyov
Commit 4b1b7d3b30a6 ("net/smc: add SMC-D diag support") introduced
new UAPI-exposed structure, struct smcd_diag_dmbinfo. However,
it's not usable by compat binaries, as it has different layout there.
Probably, the most straightforward fix that will avoid similar issues
in the future is to use __aligned_u64 for 64-bit fields.
Fixes: 4b1b7d3b30a6 ("net/smc: add SMC-D diag support")
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
---
include/uapi/linux/smc_diag.h | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/include/uapi/linux/smc_diag.h b/include/uapi/linux/smc_diag.h
index ac9e8c9..6180c6d 100644
--- a/include/uapi/linux/smc_diag.h
+++ b/include/uapi/linux/smc_diag.h
@@ -18,14 +18,14 @@ struct smc_diag_req {
* on the internal clcsock, and more SMC-related socket data
*/
struct smc_diag_msg {
- __u8 diag_family;
- __u8 diag_state;
- __u8 diag_mode;
- __u8 diag_shutdown;
+ __u8 diag_family;
+ __u8 diag_state;
+ __u8 diag_mode;
+ __u8 diag_shutdown;
struct inet_diag_sockid id;
- __u32 diag_uid;
- __u64 diag_inode;
+ __u32 diag_uid;
+ __aligned_u64 diag_inode;
};
/* Mode of a connection */
@@ -99,11 +99,11 @@ struct smc_diag_fallback {
};
struct smcd_diag_dmbinfo { /* SMC-D Socket internals */
- __u32 linkid; /* Link identifier */
- __u64 peer_gid; /* Peer GID */
- __u64 my_gid; /* My GID */
- __u64 token; /* Token of DMB */
- __u64 peer_token; /* Token of remote DMBE */
+ __u32 linkid; /* Link identifier */
+ __aligned_u64 peer_gid; /* Peer GID */
+ __aligned_u64 my_gid; /* My GID */
+ __aligned_u64 token; /* Token of DMB */
+ __aligned_u64 peer_token; /* Token of remote DMBE */
};
#endif /* _UAPI_SMC_DIAG_H_ */
--
2.1.4
^ permalink raw reply related
* [PATCH net v2 0/2] net/smc: userspace breakage fixes
From: Eugene Syromiatnikov @ 2018-10-07 14:57 UTC (permalink / raw)
To: netdev
Cc: David S. Miller, linux-kernel, Ursula Braun, Karsten Graul,
Hans Wippel, Sergei Shtylyov
Hello.
These two patches correct some userspace-affecting issues introduced
during 4.19 development cycle, specifically:
* New structure "struct smcd_diag_dmbinfo" has been defined in a way
that would lead to different layout of the structure on most 32-bit
ABIs in comparison with layout on 64-bit ABIs;
* One of the commits renamed an UAPI-exposed field name.
Changes since v1:
* Managed not to forget to add --cover-letter.
* Commit ID format in commit message has been changed in accordance
with Sergei Shtylyov's recommendations.
Eugene Syromiatnikov (2):
net/smc: use __aligned_u64 for 64-bit smc_diag fields
net/smc: retain old name for diag_mode field
include/uapi/linux/smc_diag.h | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
--
2.1.4
^ permalink raw reply
* [PATCH v2 net-next] inet: do not set backlog if listen fails
From: Yafang Shao @ 2018-10-07 13:36 UTC (permalink / raw)
To: edumazet, davem; +Cc: netdev, linux-kernel, Yafang Shao
We don't need to set the backlog if listen fails.
The sk_max_ack_backlog will be set in the caller inet_listen() and
dccp_listen_start() if inet_csk_listen_start() return without error.
So just remove this line to avoid this unnecessary operation.
Regarding sk_ack_backlog, we have to set it before a TCP/DCCP socket is
ready to accept new flows to avoid race, because dccp and tcp have lockless
listeners
Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
---
net/ipv4/inet_connection_sock.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index dfd5009..cdd5c95 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -871,7 +871,6 @@ int inet_csk_listen_start(struct sock *sk, int backlog)
reqsk_queue_alloc(&icsk->icsk_accept_queue);
- sk->sk_max_ack_backlog = backlog;
sk->sk_ack_backlog = 0;
inet_csk_delack_init(sk);
--
1.8.3.1
^ permalink raw reply related
* Re: PMTU discovery broken in Linux for UDP/raw application if the socket is not bound to a device
From: David Ahern @ 2018-10-07 3:28 UTC (permalink / raw)
To: Preethi Ramachandra; +Cc: Reji Thomas, Yogesh Ankolekar, netdev@vger.kernel.org
In-Reply-To: <E27EC374-F7B1-4DD2-960A-6A63818DDBD7@juniper.net>
The correct mailing list is netdev@vger.kernel.org (added)
non-text emails will be rejected.
On 10/3/18 10:15 PM, Preethi Ramachandra wrote:
> Hi,
>
>
>
> While testing the PMTU discovery for UDP/raw applications, Linux is not
> doing PMTU discovery if the UDP server socket is not bound to a device.
> In the scenario we are testing there could be multiple VRF devices
> created and an application like UDP/RAW can use a common socket for all
> vrf devices. While sending packet IP_PKTINFO socket option can be used
> to specify the vrf interface through which packet will be sent out. In
> this case, when packet too big icmp6 error message comes back to Linux
> on a vrf device, a route lookup is done on default routing-table(0) for
> src/dst address which case, the route will not be found and packet is
> dropped. If the route lookup happened with proper VRF device (packet’s
> incoming index), the route lookup succeeds, PMTU discovery is successful.
>
>
>
> This might need a fix, please take a look.
>
>
>
> *Linux version *
>
>
>
> Linux 4.8.24
>
>
>
> *Code flow *
>
>
>
> Linux code where it expects socket’s bound device in order for PMTU
> discovery to happen.
>
> *void ip6_sk_update_pmtu*(struct sk_buff *skb, struct sock *sk, __be32 mtu)
>
> {
>
> struct dst_entry *dst;
>
>
>
> ip6_update_pmtu(skb, sock_net(sk), mtu,
>
>
> sk->sk_bound_dev_if, sk->sk_mark, sk->sk_uid);*<<<<< This is the point
> where it expects socket’s sk_bound_dev_if to be set. In our testing this
> is actually 0, since the socket is not really bound to a vrf device.*
Try this based on top of tree for 4.19-next (whitespace damaged on paste
so you'll need to manually apply and handle differences with 4.8):
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 6c1d817151ca..50b95b48b911 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2360,10 +2360,13 @@ EXPORT_SYMBOL_GPL(ip6_update_pmtu);
void ip6_sk_update_pmtu(struct sk_buff *skb, struct sock *sk, __be32 mtu)
{
+ int oif = sk->sk_bound_dev_if;
struct dst_entry *dst;
- ip6_update_pmtu(skb, sock_net(sk), mtu,
- sk->sk_bound_dev_if, sk->sk_mark, sk->sk_uid);
+ if (!oif && skb->dev)
+ oif = l3mdev_master_ifindex(skb->dev);
+
+ ip6_update_pmtu(skb, sock_net(sk), mtu, oif, sk->sk_mark,
sk->sk_uid);
dst = __sk_dst_get(sk);
if (!dst || !dst->obsolete ||
^ permalink raw reply related
* [PATCH][ipsec-next] xfrm: use correct size to initialise sp->ovec
From: Li RongQing @ 2018-10-07 2:22 UTC (permalink / raw)
To: netdev, steffen.klassert
This place should want to initialize array, not a element,
so it should be sizeof(array) instead of sizeof(element)
but now this array only has one element, so no error in
this condition that XFRM_MAX_OFFLOAD_DEPTH is 1
Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
net/xfrm/xfrm_input.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c
index be3520e429c9..684c0bc01e2c 100644
--- a/net/xfrm/xfrm_input.c
+++ b/net/xfrm/xfrm_input.c
@@ -131,7 +131,7 @@ struct sec_path *secpath_dup(struct sec_path *src)
sp->len = 0;
sp->olen = 0;
- memset(sp->ovec, 0, sizeof(sp->ovec[XFRM_MAX_OFFLOAD_DEPTH]));
+ memset(sp->ovec, 0, sizeof(sp->ovec));
if (src) {
int i;
--
2.16.2
^ permalink raw reply related
* Re: [PATCH net-next v7 28/28] net: WireGuard secure network tunnel
From: Jason A. Donenfeld @ 2018-10-07 1:57 UTC (permalink / raw)
To: Andrew Lunn; +Cc: LKML, Netdev, David Miller, Greg Kroah-Hartman
In-Reply-To: <20181006235414.GA11773@lunn.ch>
Hey Andrew,
On Sun, Oct 7, 2018 at 2:01 AM Andrew Lunn <andrew@lunn.ch> wrote:
> The BUG() statements all seemed to be removed. Thanks.
>
> We still have 1 errors, 193 warnings, 7529 lines checked from
> checkpatch. There are still some Macros flow control statements in
> them, despite me pointed them out multiple times.
>
> Im not reviewing this version any further. Until you get the very
> basics right, i doubt this patch is going to make much progress
> towards inclusion.
Dave mentioned he wanted the Zinc stuff to be all set before looking
at this, so I've been focusing my efforts mostly on that. But I
haven't forgotten about your reviews, and seeing as you're actually
interested in looking at this now, I'll be sure to address everything
you've mentioned for v8. When I'm reasonably sure that's all done,
I'll let you know, so that you're not disappointed again.
Jason
^ permalink raw reply
* [PATCH][ipsec-next] xfrm: remove unnecessary check in xfrmi_get_stats64
From: Li RongQing @ 2018-10-07 1:56 UTC (permalink / raw)
To: netdev, steffen.klassert
if tstats of a device is not allocated, this device is not
registered correctly and can not be used.
Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
net/xfrm/xfrm_interface.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/net/xfrm/xfrm_interface.c b/net/xfrm/xfrm_interface.c
index dc5b20bf29cf..abafd49cc65d 100644
--- a/net/xfrm/xfrm_interface.c
+++ b/net/xfrm/xfrm_interface.c
@@ -561,9 +561,6 @@ static void xfrmi_get_stats64(struct net_device *dev,
{
int cpu;
- if (!dev->tstats)
- return;
-
for_each_possible_cpu(cpu) {
struct pcpu_sw_netstats *stats;
struct pcpu_sw_netstats tmp;
--
2.16.2
^ permalink raw reply related
* Re: [PATCH net 1/2] net/smc: use __aigned_u64 for 64-bit smc_diag fields
From: Sergei Shtylyov @ 2018-10-07 8:32 UTC (permalink / raw)
To: Eugene Syromiatnikov, netdev
Cc: David S. Miller, linux-kernel, Ursula Braun, Karsten Graul,
Hans Wippel
In-Reply-To: <20181006203222.GA11338@asgard.redhat.com>
Hello!
On 10/6/2018 11:32 PM, Eugene Syromiatnikov wrote:
> Commit v4.19-rc1~140^2~507^2~1 ("net/smc: add SMC-D diag support")
You have the SHA1 below in the "Fixes:" tag, need the same 12 digits here.
> introduced new UAPI-exposed structure, struct smcd_diag_dmbinfo.
> However, it's not usable by compat binaries, as it has different
> layout there. Probably, the most straightforward fix that will avoid
> the similar issues in the future is to use __aligned_u64 for 64-bit
> fields.
>
> Fixes: 4b1b7d3b30a6 ("net/smc: add SMC-D diag support")
> Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
[...]
MBR, Sergei
^ permalink raw reply
* Re: [net-next,v2,2/4] net/smc: ipv6 support for smc_diag.c
From: Eugene Syromiatnikov @ 2018-10-07 1:11 UTC (permalink / raw)
To: Ursula Braun
Cc: davem, netdev, linux-s390, schwidefsky, heiko.carstens, raspl
In-Reply-To: <20180502145647.36147-3-ubraun@linux.ibm.com>
On Wed, May 02, 2018 at 04:56:45PM +0200, Ursula Braun wrote:
> From: Karsten Graul <kgraul@linux.ibm.com>
>
> Update smc_diag.c to support ipv6 addresses on the diagnosis interface.
>
> Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
> Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
> ---
> net/smc/smc_diag.c | 39 ++++++++++++++++++++++++++++++---------
> 1 file changed, 30 insertions(+), 9 deletions(-)
>
> diff --git a/net/smc/smc_diag.c b/net/smc/smc_diag.c
> index 427b91c1c964..05dd7e6d314d 100644
> --- a/net/smc/smc_diag.c
> +++ b/net/smc/smc_diag.c
> @@ -38,17 +38,27 @@ static void smc_diag_msg_common_fill(struct smc_diag_msg *r, struct sock *sk)
> {
> struct smc_sock *smc = smc_sk(sk);
>
> - r->diag_family = sk->sk_family;
> if (!smc->clcsock)
> return;
> r->id.idiag_sport = htons(smc->clcsock->sk->sk_num);
> r->id.idiag_dport = smc->clcsock->sk->sk_dport;
> r->id.idiag_if = smc->clcsock->sk->sk_bound_dev_if;
> sock_diag_save_cookie(sk, r->id.idiag_cookie);
> - memset(&r->id.idiag_src, 0, sizeof(r->id.idiag_src));
> - memset(&r->id.idiag_dst, 0, sizeof(r->id.idiag_dst));
> - r->id.idiag_src[0] = smc->clcsock->sk->sk_rcv_saddr;
> - r->id.idiag_dst[0] = smc->clcsock->sk->sk_daddr;
> + if (sk->sk_protocol == SMCPROTO_SMC) {
> + r->diag_family = PF_INET;
> + memset(&r->id.idiag_src, 0, sizeof(r->id.idiag_src));
> + memset(&r->id.idiag_dst, 0, sizeof(r->id.idiag_dst));
> + r->id.idiag_src[0] = smc->clcsock->sk->sk_rcv_saddr;
> + r->id.idiag_dst[0] = smc->clcsock->sk->sk_daddr;
> +#if IS_ENABLED(CONFIG_IPV6)
> + } else if (sk->sk_protocol == SMCPROTO_SMC6) {
> + r->diag_family = PF_INET6;
> + memcpy(&r->id.idiag_src, &smc->clcsock->sk->sk_v6_rcv_saddr,
> + sizeof(smc->clcsock->sk->sk_v6_rcv_saddr));
> + memcpy(&r->id.idiag_dst, &smc->clcsock->sk->sk_v6_daddr,
> + sizeof(smc->clcsock->sk->sk_v6_daddr));
> +#endif
> + }
This change makes it impossible to distinguish an inet_sock_diag
response message from SMC sock_diag response (previously it reported
AF_SMC in diag_family which allows deciding whether that a part of
struct smc_diag_msg or struct inet_diag_msg).
^ permalink raw reply
* [PATCH v2] libertas: return errno from lbs_add_card()
From: Lubomir Rintel @ 2018-10-07 0:33 UTC (permalink / raw)
To: Kalle Valo
Cc: David S. Miller, libertas-dev, linux-wireless, netdev,
linux-kernel, Lubomir Rintel
This makes the error handling somewhat cleaner -- lbs_add_card() does no
logner throw away the errno and lets its callers propagate it.
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
---
Changes since v1:
- Address SPI & USB build failures
drivers/net/wireless/marvell/libertas/if_cs.c | 4 ++--
drivers/net/wireless/marvell/libertas/if_sdio.c | 4 ++--
drivers/net/wireless/marvell/libertas/if_spi.c | 4 ++--
drivers/net/wireless/marvell/libertas/if_usb.c | 5 ++++-
drivers/net/wireless/marvell/libertas/main.c | 17 ++++++++++-------
5 files changed, 20 insertions(+), 14 deletions(-)
diff --git a/drivers/net/wireless/marvell/libertas/if_cs.c b/drivers/net/wireless/marvell/libertas/if_cs.c
index 7d88223f890b..cebf03c6a622 100644
--- a/drivers/net/wireless/marvell/libertas/if_cs.c
+++ b/drivers/net/wireless/marvell/libertas/if_cs.c
@@ -900,8 +900,8 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
/* Make this card known to the libertas driver */
priv = lbs_add_card(card, &p_dev->dev);
- if (!priv) {
- ret = -ENOMEM;
+ if (IS_ERR(priv)) {
+ ret = PTR_ERR(priv);
goto out2;
}
diff --git a/drivers/net/wireless/marvell/libertas/if_sdio.c b/drivers/net/wireless/marvell/libertas/if_sdio.c
index 43743c26c071..2fd54a0aeb5a 100644
--- a/drivers/net/wireless/marvell/libertas/if_sdio.c
+++ b/drivers/net/wireless/marvell/libertas/if_sdio.c
@@ -1206,8 +1206,8 @@ static int if_sdio_probe(struct sdio_func *func,
priv = lbs_add_card(card, &func->dev);
- if (!priv) {
- ret = -ENOMEM;
+ if (IS_ERR(priv)) {
+ ret = PTR_ERR(priv);
goto free;
}
diff --git a/drivers/net/wireless/marvell/libertas/if_spi.c b/drivers/net/wireless/marvell/libertas/if_spi.c
index e9aec6cb1105..504d6e096476 100644
--- a/drivers/net/wireless/marvell/libertas/if_spi.c
+++ b/drivers/net/wireless/marvell/libertas/if_spi.c
@@ -1146,8 +1146,8 @@ static int if_spi_probe(struct spi_device *spi)
* This will call alloc_etherdev.
*/
priv = lbs_add_card(card, &spi->dev);
- if (!priv) {
- err = -ENOMEM;
+ if (IS_ERR(priv)) {
+ err = PTR_ERR(priv);
goto free_card;
}
card->priv = priv;
diff --git a/drivers/net/wireless/marvell/libertas/if_usb.c b/drivers/net/wireless/marvell/libertas/if_usb.c
index c67a8e7be310..5fee555a3d60 100644
--- a/drivers/net/wireless/marvell/libertas/if_usb.c
+++ b/drivers/net/wireless/marvell/libertas/if_usb.c
@@ -254,8 +254,11 @@ static int if_usb_probe(struct usb_interface *intf,
goto dealloc;
}
- if (!(priv = lbs_add_card(cardp, &intf->dev)))
+ priv = lbs_add_card(cardp, &intf->dev);
+ if (IS_ERR(priv)) {
+ r = PTR_ERR(priv);
goto err_add_card;
+ }
cardp->priv = priv;
diff --git a/drivers/net/wireless/marvell/libertas/main.c b/drivers/net/wireless/marvell/libertas/main.c
index f22e1c220cba..f7db60bc7c7f 100644
--- a/drivers/net/wireless/marvell/libertas/main.c
+++ b/drivers/net/wireless/marvell/libertas/main.c
@@ -907,25 +907,29 @@ struct lbs_private *lbs_add_card(void *card, struct device *dmdev)
struct net_device *dev;
struct wireless_dev *wdev;
struct lbs_private *priv = NULL;
+ int err;
/* Allocate an Ethernet device and register it */
wdev = lbs_cfg_alloc(dmdev);
if (IS_ERR(wdev)) {
+ err = PTR_ERR(wdev);
pr_err("cfg80211 init failed\n");
- goto done;
+ goto err_cfg;
}
wdev->iftype = NL80211_IFTYPE_STATION;
priv = wdev_priv(wdev);
priv->wdev = wdev;
- if (lbs_init_adapter(priv)) {
+ err = lbs_init_adapter(priv);
+ if (err) {
pr_err("failed to initialize adapter structure\n");
goto err_wdev;
}
dev = alloc_netdev(0, "wlan%d", NET_NAME_UNKNOWN, ether_setup);
if (!dev) {
+ err = -ENOMEM;
dev_err(dmdev, "no memory for network device instance\n");
goto err_adapter;
}
@@ -949,6 +953,7 @@ struct lbs_private *lbs_add_card(void *card, struct device *dmdev)
init_waitqueue_head(&priv->waitq);
priv->main_thread = kthread_run(lbs_thread, dev, "lbs_main");
if (IS_ERR(priv->main_thread)) {
+ err = PTR_ERR(priv->main_thread);
lbs_deb_thread("Error creating main thread.\n");
goto err_ndev;
}
@@ -961,7 +966,7 @@ struct lbs_private *lbs_add_card(void *card, struct device *dmdev)
priv->wol_gap = 20;
priv->ehs_remove_supported = true;
- goto done;
+ return priv;
err_ndev:
free_netdev(dev);
@@ -972,10 +977,8 @@ struct lbs_private *lbs_add_card(void *card, struct device *dmdev)
err_wdev:
lbs_cfg_free(priv);
- priv = NULL;
-
-done:
- return priv;
+ err_cfg:
+ return ERR_PTR(err);
}
EXPORT_SYMBOL_GPL(lbs_add_card);
--
2.19.0
^ permalink raw reply related
* pull-request: wireless-drivers-next 2018-10-07
From: Kalle Valo @ 2018-10-07 7:37 UTC (permalink / raw)
To: David Miller; +Cc: linux-wireless, netdev, linux-kernel
Hi Dave,
another pull request to net-next for 4.20. I'm sending this a bit
earlier than I prefer as I'm not sure if the merge window starts today
or not. Not all of these patches have been in linux-next, and also the
kbuild bot has been offline this week due to a service break, so there
might be some build problems which I have missed. Though a local
allmodconfig build with GCC 7.3.0 did work without problems.
Kalle
The following changes since commit 4e6d47206c32d1bbb4931f1d851dae3870e0df81:
tls: Add support for inplace records encryption (2018-10-02 23:03:47 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git tags/wireless-drivers-next-for-davem-2018-10-07
for you to fetch changes up to 5580d810560da33804053ae3bca13110c9a8d5e8:
Merge tag 'mt76-for-kvalo-2018-10-05' of https://github.com/nbd168/wireless (2018-10-06 14:22:47 +0300)
----------------------------------------------------------------
wireless-drivers-next patches for 4.20
Second set of patches for 4.20. Heavy refactoring on mt76 continues
and the usual drivers in active development (iwlwifi, qtnfmac, ath10k)
getting new features. And as always, fixes and cleanup all over.
Major changes:
mt76
* more major refactoring to make it easier add new hardware support
* more work on mt76x0e support
* support for getting firmware version via ethtool
* add mt7650 PCI ID
iwlwifi
* HE radiotap cleanup and improvements
* reorder channel optimization for scans
* bump the FW API version
qtnfmac
* fixes for 'iw' output: rates for enabled SGI, 'dump station'
* expose more scan features to host: scan flush and dwell time
* inform cfg80211 when OBSS is not supported by firmware
wlcore
* add support for optional wakeirq
ath10k
* retrieve MAC address from system firmware if provided
* support extended board data download for dual-band QCA9984
* extended per sta tx statistics support via debugfs
* average ack rssi support for data frames
* speed up QCA6174 and QCA9377 firmware download using diag Copy
Engine
* HTT High Latency mode support needed by SDIO and USB support
* get STA power save state via debugfs
ath9k
* add reset functionality for airtime station debugfs file
----------------------------------------------------------------
Anilkumar Kolli (4):
ath10k: get the legacy rate index to update the txrate table
ath10k: add debugfs entry to enable extended tx stats
ath10k: add extended per sta tx statistics support
ath10k: add debugfs support to dump per sta tx stats
Ayala Beker (1):
iwlwifi: mvm: allow channel reorder optimization during scan
Balaji Pothunoori (1):
ath10k: average ack rssi support for data frames
Ben Greear (1):
ath10k: fix vdev-start timeout on error
Brian Norris (3):
ath10k: retrieve MAC address from system firmware if provided
ath10k: utilize random MAC address if none is provided
ath10k: add missing sanity check on diag download
Carl Huang (3):
ath10k: optimize pci diag mem read & write operations
ath10k: support to access target space below 1M for qca6174 and qca9377
ath10k: download firmware via diag Copy Engine for QCA6174 and QCA9377.
Chung-Hsien Hsu (2):
brcmfmac: reduce timeout for action frame scan
brcmfmac: fix full timeout waiting for action frame on-channel tx
Colin Ian King (1):
mt76: fix header guard macro define names
Davide Caratti (1):
mt76: report firmware version using ethtool
Emmanuel Grumbach (1):
iwlwifi: mvm: clear HW_RESTART_REQUESTED when stopping the interface
Erik Stromdahl (14):
ath10k: add struct ath10k_bus_params
ath10k: add device type enum to ath10k_bus_params
ath10k: add bus type check in ath10k_init_hw_params
ath10k: use hw_params.num_peers for num_tids in TLV init
ath10k: add per target config of max_num_peers
ath10k: DMA related fixes for high latency devices
ath10k: add HTT TX HL ops
ath10k: add HTT RX HL ops
ath10k: htt: RX ring config HL support
ath10k: htt: High latency TX support
ath10k: htt: High latency RX support
ath10k: wmi: disable softirq's while calling ieee80211_rx
ath10k: add default value for num_peers in WMI TLV init
ath10k: remove num_peers in hw_params for most targets
Felix Fietkau (7):
mt76: add stbc entries to mt76_rate_power
mt76: include linux/module.h in files using MODULE_*
mt76x2: disable WLAN core before probe
mt76: fix handling ps-poll frames
mt76: check aggregation sequence number for frames sent via drv_tx
mt76: mt76x2: fix multi-interface beacon configuration
ath9k: add back support for using active monitor interfaces for tx99
Govind Singh (4):
ath10k: introduce CE_ATTR_POLL attribute for polling pipe
ath10k: enable pktlog for WCN3990 target
ath10k: move napi_enable to hif_start for consistent pairing
ath10k: disable napi before resource cleanup to avoid "use after free"
Gustavo A. R. Silva (2):
wil6210: fix unsigned cid comparison with >= 0
ssb: chipcommon: fix fall-through annotation
Haim Dreyfuss (1):
iwlwifi: mvm Support new MCC update response
Hauke Mehrtens (1):
mt76: use skb_pad() instead of __skb_pad()
Igor Mitsyanko (4):
qtnfmac: generate local disconnect event in disconnect callback
qtnfmac: request userspace to do OBSS scanning if FW can not
qtnfmac: do not initialize per-MAC data multiple times
qtnfmac: do not cancel scan in disconnect callback
Johannes Berg (16):
iwlwifi: mvm: remove unnecessary overload variable
iwlwifi: mvm: minor cleanups to HE radiotap code
iwlwifi: mvm: put HE SIG-B symbols/users data correctly
iwlwifi: mvm: pull some he_phy_data decoding into a separate function
iwlwifi: mvm: clean up HE radiotap RU allocation parsing
iwlwifi: mvm: move HE-MU LTF_NUM parsing to he_phy_data parsing
iwlwifi: mvm: add TXOP to HE radiotap data
iwlwifi: mvm: add LDPC-XSYM to HE radiotap data
iwlwifi: mvm: add more information to HE radiotap
iwlwifi: mvm: set max TX/RX A-MPDU subframes to HE limit
iwlwifi: pcie gen2: check iwl_pcie_gen2_set_tb() return value
iwlwifi: add fall through comment
iwlwifi: pcie: check iwl_pcie_txq_build_tfd() return value
iwlwifi: bump firmware API version for 9000 and 22000 series devices
iwlwifi: mvm: decode HE information for MU (without ext info)
iwlwifi: mvm: show more HE radiotap data for TB PPDUs
K.T.VIJAYAKUMAAR (1):
ath10k: avoid possible memory access violation
Kalle Valo (4):
Merge ath-next from git://git.kernel.org/.../kvalo/ath.git
Merge tag 'mt76-for-kvalo-2018-10-01' of https://github.com/nbd168/wireless
Merge tag 'iwlwifi-next-for-kalle-2018-10-06' of git://git.kernel.org/.../iwlwifi/iwlwifi-next
Merge tag 'mt76-for-kvalo-2018-10-05' of https://github.com/nbd168/wireless
Lance Roy (1):
zd1211rw: Replace spin_is_locked() with lockdep
Lorenzo Bianconi (84):
mt76x2: fix tx power configuration for VHT mcs 9
mt76x0: pci: add mt7650 PCI ID
mt76x0: pci: add fw uploading routine
mt76: move seq_put_array in mt76-core module
mt76: move common eeprom definitions in mt76x02-lib module
mt76: move eeprom utility routines in mt76x02_eeprom.h
mt76: move mt76x2_eeprom_get in mt76x02_eeprom.h
mt76: move mt76x02_mac_setaddr in mt76x02-lib module
mt76: move mt76x2_get_efuse_data in mt76x02-lib module
mt76: move mt76x2_ext_pa_enabled routine in mt76x02_eeprom.c
mt76x0: remove mt76x0_set_country_reg routine
mt76: add mt76x02_get_rx_gain and mt76x02_get_lna_gain utility routines
mt76x0: unify lna_gain parsing
mt76x0: unify rssi_offset parsing
mt76x0: unify temperature offset parsing
mt76x0: unify freq offset parsing
mt76: move mt76x02_eeprom_parse_hw_cap in mt76x02-lib module
mt76x0: unify parse hw capabilities
mt76: move mt76x2_tssi_enabled in mt76x02_eeprom.h
mt76: usb: remove WARN_ON in mt76u_get_rx_entry_len
mt76: move mt76_rate_power in mt76_dev
mt76: add mt76x02_phy_set_txpower utility routine
mt76: move rate_txpower handler in mt76 debugfs
mt76: move mt76x02_rate_power_val in mt76x02-lib module
mt76x0: remove mt76x0_phy_set_tx_power and mt76x0_extra_power_over_mac
mt76x0: remove eeprom dependency from mt76x0_set_tx_power_per_rate
mt76x0: remove eeprom dependency from mt76x0_get_power_info
mt76x0: use shared debugfs implementation
mt76x0: phy: introduce mt76x0_phy_set_txpower routine
mt76: usb: make rx page_frag_cache access atomic
mt76x0: use mt76_poll in mt76x0_set_wlan_state
mt76: move wait_for_wpdma in mt76x02_dma.h
mt76: add mt76x02_dma_enable/mt76x02_dma_disable utility routines
mt76: move mt76x02_set_irq_mask in mt76x02_mmio.c
mt76: move queue initialization in mt76x02_mmio.c
mt76: move mt76x02_beacon_offset in mt76x02_util.c
mt76: mmio: add implementation of wr_rp and rd_rp
mt76: move mt76x2_wait_for_bbp in mt76x02-lib module
mt76x0: update initvals to latest version of vendor driver
mt76x0: pci: move mcu code in pci_mcu.c
mt76x0: usb: move mcu code in usb_mcu.c
mt76x0: use mt76x02 utility routines in mt76x0 init code
mt76x0: init: remove duplicated initialization
mt76x0: init: remove MT_PBF_SYS_CTRL configuration in mt76x0_reset_csr_bbp
mt76x0: init rx filter in mt76x0_init_hardware
mt76: add mt76x02_mac_start routine
mt76x0: usb: move initialization code in usb.c
mt76x0: pci: add hw initialization at bootstrap
mt76x0: phy: set antenna parameter according to wireless band
mt76: move set_{tx,rx}_path routines in mt76x02-lib module
mt76x0: add ieee80211_ops ops pointer to mt76x0_alloc_device signature
mt76x0: pci: add mt76x0e_{start/stop} callbacks
mt76x0: eeprom: load eeprom data from mtd by default
mt76x0: usb: move mt76x0u_tx_prepare_skb in usb.c
mt76x0: pci: add mt76x0e_cleanup routine
mt76x2: move mt76x2 source files to mt76x2 folder
mt76: usb: fix hw initialization sequence
mt76x0: usb: stop cal/mac workqueues at hw stop
mt76: move mt76x02_tx_get_max_txpwr_adj in mt76x02_util.c
mt76: add get_tx_txpwr_adj function pointer to mt76_driver_ops
mt76: move mt76x02_mac_write_txwi in mt76x02-lib module
mt76: usb: use mt76x02u_tx_prepare_skb to fill txwi
mt76x0: init: remove unnecessary configurations
mt76: move mt76x02_phy_get_min_avg_rssi in mt76x02_phy.c
mt76: move mt76x02_rx_get_sta and mt76x02_rx_get_sta_wcid in mt76x02_util.h
mt76x0: mac: use sta ewma estimation for rssi tracking
mt76x0: remove unused variable in mt76x0_dev
mt76x0: remove hw_atomic_mutex mutex in mt76x0_dev
mt76x2: move mt76x2_dev in mt76x02_util.h
mt76x0: merge mt76x0_dev in mt76x02_dev
mt76: move mt76x02_mac_process_rx in mt76x02-lib module
mt76: unify rxwi parsing between mt76x2 and mt76x0 drivers
mt76: move mt76x02_tx in mt76x02-lib module
mt76: move txrx shared routines in mt76x02_txrx.c
mt76: rename mt76x02_util.h in mt76x02.h
mt76x2: remove leftover function declatarions
mt76: move tpc routines in mt76x02-lib module
mt76: move mt76x02_tx_prepare_skb in mt76x02_txrx.c
mt76: usb: move mt76x02u_tx_complete_skb in mt76x02_usb_core.c
mt76: move mt76x02_mac_poll_tx_status in mt76x02-lib moudle
mt76: move mt76x02_tx_complete in mt76x02-lib module
mt76: use mt76x02_dev instead of mt76_dev in mt76x02_mmio.c
mt76: move tx_tasklet management in mt76x02-lib moudle
mt76: move irq handler in mt76x02-lib moudle
Louie Lu (1):
ath9k: add reset for airtime station debugfs
Luca Coelho (1):
iwlwifi: mvm: check for n_profiles validity in EWRD ACPI
Maharaja Kennadyrajan (2):
ath10k: add debugfs support to get power save state change of STA
ath10k: advertize beacon_int_min_gcd as 100 while bring up multi vaps
Naftali Goldstein (1):
iwlwifi: nvm: get num of hw addresses from firmware
Niklas Cassel (1):
ath10k: allow ATH10K_SNOC with COMPILE_TEST
Ping-Ke Shih (1):
rtlwifi: Removed unused define and code efuse_re_pg* from wifi.h
Rakesh Pillai (1):
ath10k: fix tx status flag setting for management frames
Rob Herring (1):
ath6kl: convert to using %pOFn instead of device_node.name
Sara Sharon (8):
iwlwifi: dbg: move debug data to a struct
iwlwifi: dbg: refactor dump code to improve readability
iwlwifi: dbg: split iwl_fw_error_dump to two functions
iwlwifi: dbg: dump memory in a helper function
iwlwifi: dbg: group trigger condition to helper function
iwlwifi: dbg: make iwl_fw_dbg_no_trig_window trigger agnostic
iwlwifi: dbg: decrement occurrences for all triggers
iwlwifi: dbg: make trigger functions type agnostic
Sathishkumar Muruganandam (2):
ath10k: refactoring needed for extended board data download
ath10k: support extended board data download for dual-band QCA9984
Sergey Matyukevich (9):
qtnfmac: do not track STA states in driver
qtnfmac: cleanup and unify command error handling
qtnfmac: pass sgi rate info flag to wireless core
qtnfmac: inform wireless core about supported extended capabilities
qtnfmac: drop error reports for out-of-bounds key indexes
qtnfmac: add support for scan flush
qtnfmac: add support for scan dwell time configuration
qtnfmac: drop redundant data copy in control path
qtnfmac: implement dump_station support for STA mode
Shahar S Matityahu (3):
iwlwifi: add dump collection in case alive flow fails
iwlwifi: runtime: add send host command op to firmware runtime op struct
iwlwifi: add debugfs to send host command
Shaul Triebitz (1):
iwlwifi: pcie: avoid empty free RB queue
Simon Wunderlich (5):
ath9k: add counters for good and errorneous FFT/spectral frames
ath9k: return when short FFT frame was handled
ath9k: fix and simplify FFT max index retrieval
ath9k: FFT magnitude check: don't consider lower 3 data bits
ath9k: fix reporting calculated new FFT upper max
Sriram R (1):
ath10k: add support for configuring management packet rate
Stanislaw Gruszka (3):
mt76: fix return value of mt76x02_wait_for_mac
mt76x0: add quirk to disable 2.4GHz band for Archer T1U
mt76: fix frag length allocation for usb
Tony Lindgren (2):
wlcore: Fix BUG with clear completion on timeout
wlcore: Add support for optional wakeirq
Wen Gong (1):
ath10k: add waiting htt tx complete before wow enable
Yisheng Xie (1):
iwlwifi: mvm: use match_string() helper
YueHaibing (4):
ath10k: remove duplicated includes
ath9k: debug: remove set but not used variable 'fops_dump_nfcal'
wil6210: remove set but not used variable 'start'
b43: remove set but not used variable 'wl'
drivers/net/wireless/ath/ath10k/Kconfig | 3 +-
drivers/net/wireless/ath/ath10k/ahb.c | 9 +-
drivers/net/wireless/ath/ath10k/bmi.c | 23 +
drivers/net/wireless/ath/ath10k/bmi.h | 36 +
drivers/net/wireless/ath/ath10k/ce.c | 18 +-
drivers/net/wireless/ath/ath10k/ce.h | 11 +-
drivers/net/wireless/ath/ath10k/core.c | 737 +++++++++++++--------
drivers/net/wireless/ath/ath10k/core.h | 64 +-
drivers/net/wireless/ath/ath10k/debug.c | 144 +++-
drivers/net/wireless/ath/ath10k/debug.h | 9 +
drivers/net/wireless/ath/ath10k/debugfs_sta.c | 130 ++++
drivers/net/wireless/ath/ath10k/htc.c | 82 ++-
drivers/net/wireless/ath/ath10k/htt.h | 52 +-
drivers/net/wireless/ath/ath10k/htt_rx.c | 296 ++++++++-
drivers/net/wireless/ath/ath10k/htt_tx.c | 155 ++++-
drivers/net/wireless/ath/ath10k/hw.c | 191 ++++++
drivers/net/wireless/ath/ath10k/hw.h | 32 +
drivers/net/wireless/ath/ath10k/mac.c | 114 +++-
drivers/net/wireless/ath/ath10k/mac.h | 1 +
drivers/net/wireless/ath/ath10k/pci.c | 76 ++-
drivers/net/wireless/ath/ath10k/pci.h | 3 +-
drivers/net/wireless/ath/ath10k/rx_desc.h | 15 +
drivers/net/wireless/ath/ath10k/sdio.c | 8 +-
drivers/net/wireless/ath/ath10k/snoc.c | 22 +-
drivers/net/wireless/ath/ath10k/targaddrs.h | 4 +
drivers/net/wireless/ath/ath10k/txrx.c | 3 +-
drivers/net/wireless/ath/ath10k/usb.c | 7 +-
drivers/net/wireless/ath/ath10k/wmi-tlv.c | 11 +-
drivers/net/wireless/ath/ath10k/wmi.c | 78 ++-
drivers/net/wireless/ath/ath10k/wmi.h | 43 +-
drivers/net/wireless/ath/ath10k/wow.c | 2 +
drivers/net/wireless/ath/ath6kl/init.c | 4 +-
drivers/net/wireless/ath/ath9k/ath9k.h | 1 +
drivers/net/wireless/ath/ath9k/common-debug.c | 2 +
drivers/net/wireless/ath/ath9k/common-debug.h | 4 +
drivers/net/wireless/ath/ath9k/common-spectral.c | 83 +--
drivers/net/wireless/ath/ath9k/common-spectral.h | 17 +
drivers/net/wireless/ath/ath9k/debug.c | 13 -
drivers/net/wireless/ath/ath9k/debug_sta.c | 18 +-
drivers/net/wireless/ath/ath9k/main.c | 10 +-
drivers/net/wireless/ath/ath9k/tx99.c | 7 +
drivers/net/wireless/ath/ath9k/xmit.c | 2 +-
drivers/net/wireless/ath/wil6210/pm.c | 3 +-
drivers/net/wireless/ath/wil6210/wil6210.h | 2 +-
drivers/net/wireless/ath/wil6210/wmi.c | 2 +-
drivers/net/wireless/broadcom/b43/main.c | 2 -
.../net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 26 +-
.../net/wireless/broadcom/brcm80211/brcmfmac/p2p.h | 2 +
drivers/net/wireless/intel/iwlwifi/cfg/22000.c | 2 +-
drivers/net/wireless/intel/iwlwifi/cfg/9000.c | 2 +-
.../net/wireless/intel/iwlwifi/fw/api/nvm-reg.h | 81 +--
drivers/net/wireless/intel/iwlwifi/fw/api/rx.h | 8 +-
drivers/net/wireless/intel/iwlwifi/fw/api/scan.h | 5 +-
drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 411 ++++++------
drivers/net/wireless/intel/iwlwifi/fw/dbg.h | 45 +-
drivers/net/wireless/intel/iwlwifi/fw/debugfs.c | 64 ++
drivers/net/wireless/intel/iwlwifi/fw/error-dump.h | 2 +
drivers/net/wireless/intel/iwlwifi/fw/file.h | 7 +-
drivers/net/wireless/intel/iwlwifi/fw/img.h | 41 +-
drivers/net/wireless/intel/iwlwifi/fw/runtime.h | 2 +
drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 77 ++-
drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 10 +-
drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 4 +-
drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 13 +-
drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 12 +-
drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 12 +-
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 42 +-
drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 25 +-
drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 39 +-
drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 29 +-
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 373 ++++++-----
drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 3 +
.../net/wireless/intel/iwlwifi/mvm/time-event.c | 11 +-
drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 15 +-
drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 16 +-
drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 32 +-
drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 2 +-
drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 2 +
drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 2 +
drivers/net/wireless/mediatek/mt76/Kconfig | 43 +-
drivers/net/wireless/mediatek/mt76/Makefile | 27 +-
drivers/net/wireless/mediatek/mt76/debugfs.c | 31 +
drivers/net/wireless/mediatek/mt76/mac80211.c | 6 +
drivers/net/wireless/mediatek/mt76/mmio.c | 27 +
drivers/net/wireless/mediatek/mt76/mt76.h | 37 +-
drivers/net/wireless/mediatek/mt76/mt76x0/Kconfig | 20 +
drivers/net/wireless/mediatek/mt76/mt76x0/Makefile | 6 +-
.../net/wireless/mediatek/mt76/mt76x0/debugfs.c | 85 +--
drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c | 568 +++++++---------
drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.h | 132 +---
drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 237 ++-----
.../net/wireless/mediatek/mt76/mt76x0/initvals.h | 406 +++++-------
drivers/net/wireless/mediatek/mt76/mt76x0/mac.c | 82 +--
drivers/net/wireless/mediatek/mt76/mt76x0/mac.h | 20 -
drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 117 ++--
drivers/net/wireless/mediatek/mt76/mt76x0/mcu.h | 9 +-
drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h | 157 +----
drivers/net/wireless/mediatek/mt76/mt76x0/pci.c | 127 +++-
.../net/wireless/mediatek/mt76/mt76x0/pci_mcu.c | 146 ++++
drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | 274 +++-----
drivers/net/wireless/mediatek/mt76/mt76x0/trace.h | 1 -
drivers/net/wireless/mediatek/mt76/mt76x0/tx.c | 115 ----
drivers/net/wireless/mediatek/mt76/mt76x0/usb.c | 308 ++++-----
.../net/wireless/mediatek/mt76/mt76x0/usb_mcu.c | 176 +++++
drivers/net/wireless/mediatek/mt76/mt76x02.h | 208 ++++++
.../mediatek/mt76/{mt76x2_dfs.h => mt76x02_dfs.h} | 40 +-
drivers/net/wireless/mediatek/mt76/mt76x02_dma.h | 17 +
.../net/wireless/mediatek/mt76/mt76x02_eeprom.c | 156 +++++
.../mt76/{mt76x2_eeprom.h => mt76x02_eeprom.h} | 147 ++--
drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 257 ++++++-
drivers/net/wireless/mediatek/mt76/mt76x02_mac.h | 35 +-
drivers/net/wireless/mediatek/mt76/mt76x02_mcu.c | 13 +
drivers/net/wireless/mediatek/mt76/mt76x02_mcu.h | 13 +-
drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c | 260 ++++++++
drivers/net/wireless/mediatek/mt76/mt76x02_phy.c | 183 +++++
drivers/net/wireless/mediatek/mt76/mt76x02_phy.h | 30 +
.../mt76/{mt76x2_trace.c => mt76x02_trace.c} | 2 +-
.../mt76/{mt76x2_trace.h => mt76x02_trace.h} | 31 +-
drivers/net/wireless/mediatek/mt76/mt76x02_txrx.c | 203 ++++++
drivers/net/wireless/mediatek/mt76/mt76x02_usb.h | 9 +-
.../net/wireless/mediatek/mt76/mt76x02_usb_core.c | 59 +-
.../net/wireless/mediatek/mt76/mt76x02_usb_mcu.c | 1 +
drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 80 +--
drivers/net/wireless/mediatek/mt76/mt76x02_util.h | 54 --
drivers/net/wireless/mediatek/mt76/mt76x2.h | 250 -------
drivers/net/wireless/mediatek/mt76/mt76x2/Kconfig | 20 +
drivers/net/wireless/mediatek/mt76/mt76x2/Makefile | 16 +
.../mt76/{mt76x2_debugfs.c => mt76x2/debugfs.c} | 35 +-
drivers/net/wireless/mediatek/mt76/mt76x2/dfs.h | 26 +
.../mt76/{mt76x2_eeprom.c => mt76x2/eeprom.c} | 356 ++++------
drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.h | 73 ++
.../mt76/{mt76x2_init_common.c => mt76x2/init.c} | 36 +-
drivers/net/wireless/mediatek/mt76/mt76x2/mac.c | 54 ++
.../mt76/{mt76x2_common.c => mt76x2/mac.h} | 37 +-
.../mt76/{mt76x2_mcu_common.c => mt76x2/mcu.c} | 20 +-
.../mediatek/mt76/{mt76x2_mcu.h => mt76x2/mcu.h} | 13 +-
drivers/net/wireless/mediatek/mt76/mt76x2/mt76x2.h | 107 +++
.../wireless/mediatek/mt76/{ => mt76x2}/mt76x2u.h | 44 +-
.../mediatek/mt76/{mt76x2_pci.c => mt76x2/pci.c} | 8 +-
.../mt76/{mt76x2_dfs.c => mt76x2/pci_dfs.c} | 145 ++--
.../mt76/{mt76x2_init.c => mt76x2/pci_init.c} | 141 +---
.../mt76/{mt76x2_mac.c => mt76x2/pci_mac.c} | 108 +--
.../mt76/{mt76x2_main.c => mt76x2/pci_main.c} | 39 +-
.../mt76/{mt76x2_mcu.c => mt76x2/pci_mcu.c} | 14 +-
.../mt76/{mt76x2_phy.c => mt76x2/pci_phy.c} | 43 +-
.../mediatek/mt76/{mt76x2_tx.c => mt76x2/pci_tx.c} | 43 +-
.../mt76/{mt76x2_phy_common.c => mt76x2/phy.c} | 145 +---
.../mediatek/mt76/{mt76x2_usb.c => mt76x2/usb.c} | 10 +-
.../mt76/{mt76x2u_init.c => mt76x2/usb_init.c} | 63 +-
.../mt76/{mt76x2u_mac.c => mt76x2/usb_mac.c} | 40 +-
.../mt76/{mt76x2u_main.c => mt76x2/usb_main.c} | 25 +-
.../mt76/{mt76x2u_mcu.c => mt76x2/usb_mcu.c} | 21 +-
.../mt76/{mt76x2u_phy.c => mt76x2/usb_phy.c} | 54 +-
drivers/net/wireless/mediatek/mt76/mt76x2_core.c | 88 ---
drivers/net/wireless/mediatek/mt76/mt76x2_dma.c | 124 ----
drivers/net/wireless/mediatek/mt76/mt76x2_mac.h | 64 --
.../net/wireless/mediatek/mt76/mt76x2_mac_common.c | 239 -------
.../net/wireless/mediatek/mt76/mt76x2_tx_common.c | 118 ----
drivers/net/wireless/mediatek/mt76/mt76x2u_core.c | 53 --
drivers/net/wireless/mediatek/mt76/tx.c | 36 +-
drivers/net/wireless/mediatek/mt76/usb.c | 17 +-
drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 193 +++---
drivers/net/wireless/quantenna/qtnfmac/commands.c | 535 ++++-----------
drivers/net/wireless/quantenna/qtnfmac/core.c | 39 +-
drivers/net/wireless/quantenna/qtnfmac/core.h | 8 +-
drivers/net/wireless/quantenna/qtnfmac/event.c | 18 +-
drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | 5 +-
drivers/net/wireless/quantenna/qtnfmac/qlink.h | 5 +
.../net/wireless/quantenna/qtnfmac/qlink_util.h | 8 +
drivers/net/wireless/quantenna/qtnfmac/shm_ipc.c | 13 +-
drivers/net/wireless/quantenna/qtnfmac/shm_ipc.h | 4 +-
drivers/net/wireless/realtek/rtlwifi/wifi.h | 4 -
drivers/net/wireless/ti/wlcore/main.c | 48 +-
drivers/net/wireless/ti/wlcore/sdio.c | 17 +-
drivers/net/wireless/ti/wlcore/wlcore.h | 2 +
drivers/net/wireless/zydas/zd1211rw/zd_mac.c | 2 +-
drivers/ssb/driver_chipcommon.c | 2 +-
177 files changed, 6916 insertions(+), 5633 deletions(-)
create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x0/Kconfig
delete mode 100644 drivers/net/wireless/mediatek/mt76/mt76x0/mac.h
create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x0/pci_mcu.c
delete mode 100644 drivers/net/wireless/mediatek/mt76/mt76x0/tx.c
create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x0/usb_mcu.c
create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x02.h
rename drivers/net/wireless/mediatek/mt76/{mt76x2_dfs.h => mt76x02_dfs.h} (76%)
create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x02_eeprom.c
rename drivers/net/wireless/mediatek/mt76/{mt76x2_eeprom.h => mt76x02_eeprom.h} (56%)
create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c
create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x02_phy.c
create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x02_phy.h
rename drivers/net/wireless/mediatek/mt76/{mt76x2_trace.c => mt76x02_trace.c} (97%)
rename drivers/net/wireless/mediatek/mt76/{mt76x2_trace.h => mt76x02_trace.h} (86%)
create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x02_txrx.c
delete mode 100644 drivers/net/wireless/mediatek/mt76/mt76x02_util.h
delete mode 100644 drivers/net/wireless/mediatek/mt76/mt76x2.h
create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x2/Kconfig
create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x2/Makefile
rename drivers/net/wireless/mediatek/mt76/{mt76x2_debugfs.c => mt76x2/debugfs.c} (78%)
create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x2/dfs.h
rename drivers/net/wireless/mediatek/mt76/{mt76x2_eeprom.c => mt76x2/eeprom.c} (52%)
create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.h
rename drivers/net/wireless/mediatek/mt76/{mt76x2_init_common.c => mt76x2/init.c} (89%)
create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x2/mac.c
rename drivers/net/wireless/mediatek/mt76/{mt76x2_common.c => mt76x2/mac.h} (56%)
rename drivers/net/wireless/mediatek/mt76/{mt76x2_mcu_common.c => mt76x2/mcu.c} (84%)
rename drivers/net/wireless/mediatek/mt76/{mt76x2_mcu.h => mt76x2/mcu.h} (87%)
create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x2/mt76x2.h
rename drivers/net/wireless/mediatek/mt76/{ => mt76x2}/mt76x2u.h (51%)
rename drivers/net/wireless/mediatek/mt76/{mt76x2_pci.c => mt76x2/pci.c} (92%)
rename drivers/net/wireless/mediatek/mt76/{mt76x2_dfs.c => mt76x2/pci_dfs.c} (84%)
rename drivers/net/wireless/mediatek/mt76/{mt76x2_init.c => mt76x2/pci_init.c} (78%)
rename drivers/net/wireless/mediatek/mt76/{mt76x2_mac.c => mt76x2/pci_mac.c} (63%)
rename drivers/net/wireless/mediatek/mt76/{mt76x2_main.c => mt76x2/pci_main.c} (89%)
rename drivers/net/wireless/mediatek/mt76/{mt76x2_mcu.c => mt76x2/pci_mcu.c} (94%)
rename drivers/net/wireless/mediatek/mt76/{mt76x2_phy.c => mt76x2/pci_phy.c} (91%)
rename drivers/net/wireless/mediatek/mt76/{mt76x2_tx.c => mt76x2/pci_tx.c} (75%)
rename drivers/net/wireless/mediatek/mt76/{mt76x2_phy_common.c => mt76x2/phy.c} (66%)
rename drivers/net/wireless/mediatek/mt76/{mt76x2_usb.c => mt76x2/usb.c} (95%)
rename drivers/net/wireless/mediatek/mt76/{mt76x2u_init.c => mt76x2/usb_init.c} (83%)
rename drivers/net/wireless/mediatek/mt76/{mt76x2u_mac.c => mt76x2/usb_mac.c} (83%)
rename drivers/net/wireless/mediatek/mt76/{mt76x2u_main.c => mt76x2/usb_main.c} (90%)
rename drivers/net/wireless/mediatek/mt76/{mt76x2u_mcu.c => mt76x2/usb_mcu.c} (92%)
rename drivers/net/wireless/mediatek/mt76/{mt76x2u_phy.c => mt76x2/usb_phy.c} (86%)
delete mode 100644 drivers/net/wireless/mediatek/mt76/mt76x2_core.c
delete mode 100644 drivers/net/wireless/mediatek/mt76/mt76x2_dma.c
delete mode 100644 drivers/net/wireless/mediatek/mt76/mt76x2_mac.h
delete mode 100644 drivers/net/wireless/mediatek/mt76/mt76x2_mac_common.c
delete mode 100644 drivers/net/wireless/mediatek/mt76/mt76x2_tx_common.c
delete mode 100644 drivers/net/wireless/mediatek/mt76/mt76x2u_core.c
^ permalink raw reply
* Re: [PATCH net-next] net: dsa: mc88e6xxx: Fix 88E6141/6341 2500mbps SERDES speed
From: Marek Behun @ 2018-10-06 22:00 UTC (permalink / raw)
To: Andrew Lunn; +Cc: netdev, Florian Fainelli, David S . Miller
In-Reply-To: <20181006183700.GO4730@lunn.ch>
Hi Andrew, I think that dividing this patch into three would be too
much. How about this commit message?
net: dsa: mv88e6xxx: Fix 88E6141/6341 2500mbps SERDES speed
This is a fix for the port_set_speed method for the Topaz family.
Currently the same method is used as for the Peridot family, but
this is wrong for the SERDES port.
On Topaz, the SERDES port is port 5, not 9 and 10 as in Peridot.
Moreover setting alt_bit on Topaz only makes sense for port 0 (for
(differentiating 100mbps vs 200mbps). The SERDES port does not
support more than 2500mbps, so alt_bit does not make any difference.
On Sat, 6 Oct 2018 20:37:00 +0200
Andrew Lunn <andrew@lunn.ch> wrote:
> On Sat, Oct 06, 2018 at 02:38:10AM +0200, Marek Behun wrote:
> > > Hi Marek
> > >
> > > I'm confused.
> > >
> > > The alt bit is used for configuring 2500. You say 2500 is only
> > > supported on port 5. But !port is only true for port 0?
> > >
> > > Andrew
> >
> > On Topaz alt_bit is used only for port 0 for differentiating 100
> > mbps vs 200 mbps. The choices for SpdValue are 0 for 10 mbps, 1 for
> > 100 mbps or 200 mbps (if alt_bit), 2 for 1000 mbps and 3 for 2500
> > mbps. 2500 is allowed only on port 5. alt_bit is not used on Topaz
> > for port 5 (serdes), therefore I used !port.
>
> Hi Marek
>
> The commit message could be clearer. It might be going too far, but
> you could split this into three.
>
> 1) Basic framework code, with works correctly for ports 1-4.
> 2) The special 200Mbps for port 0
> 3) The special 2500Mbps for port 5.
>
> But i would also accept a clearer commit message.
>
> Thanks
> Andrew
^ permalink raw reply
* Re: [PATCH v7 04/15] octeontx2-af: Add mailbox support infra
From: David Miller @ 2018-10-06 21:42 UTC (permalink / raw)
To: sunil.kovvuri; +Cc: netdev, arnd, linux-soc, amakarov, sgoutham, lbartosik
In-Reply-To: <1538805993-10815-5-git-send-email-sunil.kovvuri@gmail.com>
From: sunil.kovvuri@gmail.com
Date: Sat, 6 Oct 2018 11:36:22 +0530
> + tx_hdr = (struct mbox_hdr *)(mdev->mbase + mbox->tx_start);
> + rx_hdr = (struct mbox_hdr *)(mdev->mbase + mbox->rx_start);
Since mdev->mbase is a void pointer, you do not need these casts, nor
the parenthesis, at all.
Please remove them.
^ permalink raw reply
* Re: [PATCH] rtlwifi: rtl8821ae: add in a missing break in switch statement
From: Larry Finger @ 2018-10-06 20:05 UTC (permalink / raw)
To: Kalle Valo, Colin King
Cc: Ping-Ke Shih, David S . Miller, Tsang-Shian Lin, linux-wireless,
netdev, kernel-janitors, linux-kernel
In-Reply-To: <87r2h2euuy.fsf@kamboji.qca.qualcomm.com>
On 10/6/18 2:30 PM, Kalle Valo wrote:
> Colin King <colin.king@canonical.com> writes:
>
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> The switch case RATR_INX_WIRELESS_MC has a missing break, this seems
>> to be unintentional as the setting of variable ret gets overwritten
>> when the case falls through to the following RATR_INX_WIRELESS_AC_5N
>> case. Fix this by adding in the missing break.
>>
>> Detected by CoverityScan, CID#1167237 ("Missing break in switch")
>>
>> Fixes: 3c05bedb5fef ("Staging: rtl8812ae: Add Realtek 8821 PCI WIFI driver")
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>> ---
>> drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 1 +
>
> Is the fixes line correct? This patch is not for staging.
No, the correct fixes commit is 21e4b0726dc67 (" rtlwifi: rtl8821ae: Move driver
from staging to regular tree").
This driver was initially placed in staging as it was needed for a special
project, which is the commit that Colin used. As the patch subject states, the
driver was later moved to the regular wireless tree.
That break is required, thus ACKed-by: Larry Finger <Larry.Finger@lwfinger.net>
thanks,
Larry
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox