]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/log
mirror_ubuntu-bionic-kernel.git
7 years agoIB/hns: Update the rq head when modify qp state
Lijun Ou [Tue, 20 Sep 2016 16:07:09 +0000 (17:07 +0100)]
IB/hns: Update the rq head when modify qp state

The rq head in qpc was zero will miss the rq wqes which
have be sent, so here we should take the real value.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: Cq has not been freed
Lijun Ou [Tue, 20 Sep 2016 16:07:08 +0000 (17:07 +0100)]
IB/hns: Cq has not been freed

Cq has not been freed when fail to ib_copy_to_udata, so need to
free it.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Peter Chen <luck.chen@huawei.com>
Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: Validate mtu when modified qp
Lijun Ou [Tue, 20 Sep 2016 16:07:07 +0000 (17:07 +0100)]
IB/hns: Validate mtu when modified qp

The mtu should be validated when modify qp,so we check it.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Peter Chen <luck.chen@huawei.com>
Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: Some items of qpc need to take user param
Lijun Ou [Tue, 20 Sep 2016 16:07:06 +0000 (17:07 +0100)]
IB/hns: Some items of qpc need to take user param

Some items of qpc need to take user param when modified qp
state.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Dongdong Huang(Donald) <hdd.huang@huawei.com>
Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: The Ack timeout need a lower limit value
Lijun Ou [Tue, 20 Sep 2016 16:07:05 +0000 (17:07 +0100)]
IB/hns: The Ack timeout need a lower limit value

The Ack timeout of qpc need a lower limit value,otherwise
the read performance will be very lower.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Dongdong Huang(Donald) <hdd.huang@huawei.com>
Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: Return bad wr while post send failed
Lijun Ou [Tue, 20 Sep 2016 16:07:04 +0000 (17:07 +0100)]
IB/hns: Return bad wr while post send failed

While post failed, hns roce should return the wr failed to user.
We omitted this while qp type is wrong and fixed it.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Dongdong Huang(Donald) <hdd.huang@huawei.com>
Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: Fix bug of memory leakage for registering user mr
Lijun Ou [Tue, 20 Sep 2016 16:07:03 +0000 (17:07 +0100)]
IB/hns: Fix bug of memory leakage for registering user mr

While the page size attribute of umem is illegal, we should release
umem that get by ib_umem_get interface.

Also, we should return a non-zero value while pbl number is wrong.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Dongdong Huang(Donald) <hdd.huang@huawei.com>
Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: Modify the init of iboe lock
Lijun Ou [Tue, 20 Sep 2016 16:07:02 +0000 (17:07 +0100)]
IB/hns: Modify the init of iboe lock

This lock will be used in query port interface, and will be called
while IB device was registered to OFED framework/IB Core. So, the
lock of iboe must be initiated before IB device was registered.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Dongdong Huang(Donald) <hdd.huang@huawei.com>
Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: Optimize code of aeq and ceq interrupt handle and fix the bug of qpn
Wei Hu (Xavier) [Tue, 20 Sep 2016 16:07:01 +0000 (17:07 +0100)]
IB/hns: Optimize code of aeq and ceq interrupt handle and fix the bug of qpn

This patch optimized the codes of aeq and ceq interrupt handle
and fixed the bug in the calculation of qpn. For the special
qp(GSI or SMI), calculated the qp number according to physical
port and the qpn reported in the event of async event queue.

Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: Delete the sqp_start from the structure hns_roce_caps
Wei Hu (Xavier) [Tue, 20 Sep 2016 16:07:00 +0000 (17:07 +0100)]
IB/hns: Delete the sqp_start from the structure hns_roce_caps

This patch deleted the sqp_start from the structure hns_roce_caps, and
modified the calculation of the qp number.

Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: Fix bug of clear hem
Wei Hu (Xavier) [Tue, 20 Sep 2016 16:06:59 +0000 (17:06 +0100)]
IB/hns: Fix bug of clear hem

In hip06, there's no interface to release hem memory. So, hardware can't
identify whether hem memory released or not.
If all context in a hem memory released, the related hem memory will be
released by driver and reused by others. But, hardware don't know that
this memory can't be used already.

In order to fix this bug, hns roce driver reserved 128K memory for each
type of hem(QPC/CQC/MTPT). While unmap hem memory, hns roce driver will
write base address of reserved memory according to hem type.

Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Dongdong Huang(Donald) <hdd.huang@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: Remove unused parameter named qp_type
Lijun Ou [Tue, 20 Sep 2016 16:06:58 +0000 (17:06 +0100)]
IB/hns: Remove unused parameter named qp_type

This patch removes the qp_type parameter in
hns_roce_set_kernel_sq_size().

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Ping Zhang <zhangping5@huawei.com>
Reviewed-by: Wei Hu <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: Simplify function of pd alloc and qp alloc
Lijun Ou [Tue, 20 Sep 2016 16:06:57 +0000 (17:06 +0100)]
IB/hns: Simplify function of pd alloc and qp alloc

Hns_roce_pd_alloc and hns_roce_reserve_range_qp use unnecessary
transformation of parameters. This patch simplify these two
functions.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Dongdong Huang(Donald) <hdd.huang@huawei.com>
Reviewed-by: Wei Hu <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: Fix bug of using uninit refcount and free
Lijun Ou [Tue, 20 Sep 2016 16:06:56 +0000 (17:06 +0100)]
IB/hns: Fix bug of using uninit refcount and free

In current version, it uses uninitialized parameters named
refcount and free in hns_roce_cq_event.
This patch initializes these parameter in cq alloc and add
correspond process in cq free.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Dongdong Huang(Donald) <hdd.huang@huawei.com>
Reviewed-by: Wei Hu <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: Remove parameters of resize cq
Lijun Ou [Tue, 20 Sep 2016 16:06:55 +0000 (17:06 +0100)]
IB/hns: Remove parameters of resize cq

In old version of RoCE, it doesn't support to resize cq.
So, we remove parameters related to resize cq.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Dongdong Huang(Donald) <hdd.huang@huawei.com>
Reviewed-by: Wei Hu <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: Remove unused parameters in some functions
Lijun Ou [Tue, 20 Sep 2016 16:06:54 +0000 (17:06 +0100)]
IB/hns: Remove unused parameters in some functions

The parameter named collapsed unused in hns_roce_cq_alloc.
Also, parameter named doorbell_lock unsed in
hns_roce_v1_cq_set_ci. This patch optimize these parameters.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Reviewed-by: Wei Hu <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: Add node_guid definition to the bindings document
Lijun Ou [Thu, 15 Sep 2016 22:48:14 +0000 (23:48 +0100)]
IB/hns: Add node_guid definition to the bindings document

This patch adds node_guid definition in bindings document.
The value of node_guid will be used during RDMA connection.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Reviewed-by: Wei Hu <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: Fix two bugs for rdma cm connecting
Lijun Ou [Thu, 15 Sep 2016 22:48:13 +0000 (23:48 +0100)]
IB/hns: Fix two bugs for rdma cm connecting

This patch mainly modify the value of HNS_ROCE_SL_SHIFT
and delete the lines for assigning for the field of
local_enable_e2e_credit in QP1C.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Reviewed-by: Wei Hu <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: Fix the bug of rdma cm connecting on user mode
Lijun Ou [Thu, 15 Sep 2016 22:48:12 +0000 (23:48 +0100)]
IB/hns: Fix the bug of rdma cm connecting on user mode

Fix bug of modify qp from init to init on user mode. Otherwise,
it will oops when rmda cm established.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Reviewed-by: Wei Hu <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: Change the logic for allocating uar registers
Lijun Ou [Thu, 15 Sep 2016 22:48:11 +0000 (23:48 +0100)]
IB/hns: Change the logic for allocating uar registers

This patch mainly modifies the logic for allocating uar registers.
In HiP06 SoC, HW has 8 group of uar registers for kernel and
user space application. The uar index is assigned as follows:
    0   ------ for kernel
    1~7 ------ for user space application

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Reviewed-by: Wei Hu <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: Add phy_port for computing GSI/QPN
Lijun Ou [Thu, 15 Sep 2016 22:48:10 +0000 (23:48 +0100)]
IB/hns: Add phy_port for computing GSI/QPN

This patch mainly adds phy_port to HNS RoCE QP. This shall be
used in calculating the GSI QPN for the port.
Initally when RDMA is being established, all IB ports share a
QPN which later needs to be re-assigned to a particular GSI/QPN
and which is per-port.
This also fixes a bug in base driver where iboe port was being
used instead of phy_port at some places. This values might not
be same always.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Reviewed-by: Wei Hu <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: Fix two possible bugs for rdma cm
Lijun Ou [Thu, 15 Sep 2016 22:48:09 +0000 (23:48 +0100)]
IB/hns: Fix two possible bugs for rdma cm

Fix the length of wqe that maybe lead to an error and
write the end bytes of QP1C into the register.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Reviewed-by: Wei Hu <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: Fix the value of device_cap_flags
Lijun Ou [Thu, 15 Sep 2016 22:48:08 +0000 (23:48 +0100)]
IB/hns: Fix the value of device_cap_flags

In the latest IB core version, it has some known issues
with memory registration using the local_dma_lkey.
Thus RoCE don't expose support for it, and remove
device->local_dma_lkey which is introduced to working systems.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Reviewed-by: Wei Hu <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: Add & initialize "node_guid" parameter for RDMA CM
Lijun Ou [Thu, 15 Sep 2016 22:48:07 +0000 (23:48 +0100)]
IB/hns: Add & initialize "node_guid" parameter for RDMA CM

According to the Infiniband spec, NodeGUID uniquely identifies a
node. This must be initialized to some unique value. This patch
adds the support to the HNS RoCE driver to fetch the NodeGUID
value from DT or ACPI and then use this value to initialize the
node_guid parameter of IB device. This value shall be used by
RDMA CM.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Reviewed-by: Wei Hu <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: Register HNS RoCE Driver get_netdev() with IB Core
Lijun Ou [Thu, 15 Sep 2016 22:48:06 +0000 (23:48 +0100)]
IB/hns: Register HNS RoCE Driver get_netdev() with IB Core

This patch adds get_netdev() function to the IB device. This shall be
used to fetch netdev corresponding to the port number. This function
would be called by IB core(Generic CM Agent) for example, when the
RDMA connection is being established.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Reviewed-by: Wei Hu <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agonet: hns: delete redundant broadcast packet filter process
Daode Huang [Thu, 29 Sep 2016 17:09:16 +0000 (18:09 +0100)]
net: hns: delete redundant broadcast packet filter process

The broadcast packets is filtered in the hardware now, so this process
is no need in the driver, just delete it.

Signed-off-by: Daode Huang <huangdaode@hisilicon.com>
Reviewed-by: Yisen Zhuang <yisen.zhuang@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agonet: hns: bug fix about broadcast/multicast packets
Daode Huang [Thu, 29 Sep 2016 17:09:15 +0000 (18:09 +0100)]
net: hns: bug fix about broadcast/multicast packets

When the dsaf mode receives a broadcast packet, it will filter
the packet by comparing the received queue number and destination
queue number(get from forwarding table), if they are the same,
the packet will be filtered. Otherwise, the packet will be loopback.
So this patch select queue 0 to send broadcast and multicast packets.

Signed-off-by: Daode Huang <huangdaode@hisilicon.com>
Reviewed-by: Yisen Zhuang <yisen.zhuang@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agonet: hns: fix the bug of forwarding table
Daode Huang [Thu, 29 Sep 2016 17:09:14 +0000 (18:09 +0100)]
net: hns: fix the bug of forwarding table

As the sub queue id in the broadcast forwarding table is always
set to absolute queue 0 rather than the interface's relative queue 0,
this will cause the received broadcast packets loopback to rcb.
This patch sets the sub queue id to relative queue 0 of each port.

Signed-off-by: Daode Huang <huangdaode@hisilicon.com>
Reviewed-by: Yisen Zhuang <yisen.zhuang@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agonet: hns: fix port not available after testing loopback
Kejian Yan [Thu, 29 Sep 2016 17:09:13 +0000 (18:09 +0100)]
net: hns: fix port not available after testing loopback

After running command "ethtool -t eth0", eth0 can not be connected to
network. It is caused by the changing the inner loopback register and
this register cannot be changed when hns connected to network. The
routine of setting this register needs to be removed and using promisc
mode to let the packet looped back pass by dsaf mode.

Reported-by: Jun He <hjat2005@huawei.com>
Signed-off-by: Kejian Yan <yankejian@huawei.com>
Reviewed-by: Yisen Zhaung <yisen.zhuang@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agonet: hns: delete repeat read fbd num after while
Daode Huang [Thu, 29 Sep 2016 17:09:12 +0000 (18:09 +0100)]
net: hns: delete repeat read fbd num after while

Because we handle the received packets after napi, so delete the checking
before submitting. It delete the code of read the fbd number register,
which reduces the cpu usages while receiving packets

Signed-off-by: Daode Huang <huangdaode@hisilicon.com>
Reviewed-by: Yisen Zhuang <yisen.zhuang@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agonet: hns: add fini_process for v2 napi process
Daode Huang [Thu, 29 Sep 2016 17:09:11 +0000 (18:09 +0100)]
net: hns: add fini_process for v2 napi process

This patch adds fini_process for v2, it handles the packets recevied
by the hardware in the napi porcess. With this patch, the hardware irq
numbers will drop 50% per sec.

Signed-off-by: Daode Huang <huangdaode@hisilicon.com>
Reviewed-by: Yisen Zhuang <yisen.zhuang@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agonet: hns: bug fix about setting coalsecs-usecs to 0
Daode Huang [Thu, 29 Sep 2016 17:09:10 +0000 (18:09 +0100)]
net: hns: bug fix about setting coalsecs-usecs to 0

When set rx/tx coalesce usecs to 0, the interrupt coalesce will be
disabled, but there is a interrupt rate limit which set to 1us, it
will cause no interrupt occurs. This patch disable interrupt limit
when sets coalsecs usecs to 0, and restores it to 1 in other case.

Signed-off-by: Daode Huang <huangdaode@hisilicon.com>
Reviewed-by: Yisen Zhuang <yisen.zhuang@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agonet: hns: fix port unavailable after hnae_reserve_buffer_map fail
lipeng [Thu, 29 Sep 2016 17:09:09 +0000 (18:09 +0100)]
net: hns: fix port unavailable after hnae_reserve_buffer_map fail

When hnae_reserve_buffer_map fail, it will break cycle and some
buffer description has no available memory, therefore the port will
be unavailable.

Signed-off-by: Peng Li <lipeng321@huawei.com>
Reviewed-by: Yisen Zhuang <yisen.zhuang@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: Add support of ACPI to the Hisilicon RoCE driver
Salil [Tue, 23 Aug 2016 20:44:50 +0000 (04:44 +0800)]
IB/hns: Add support of ACPI to the Hisilicon RoCE driver

This patch is meant to add support of ACPI to the Hisilicon RoCE
driver.

Changes done are primarily meant to detect the type and then either
use DT specific or ACPI spcific functions. Where ever possible,
this patch tries to make use of Unified Device Property Interface
APIs to support both DT and ACPI through single interface.

This patch depends upon HNS ethernet driver to Reset RoCE. This
function within HNS ethernet driver has also been enhanced to
support ACPI and is part of other accompanying patch with this
patch-set.

NOTE: The changes in this patch are done over below branch,
https://github.com/dledford/linux/tree/hns-roce

Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agonet: hns: Add support of ACPI to HNS driver RoCE Reset function
Salil [Tue, 23 Aug 2016 20:44:49 +0000 (04:44 +0800)]
net: hns: Add support of ACPI to HNS driver RoCE Reset function

In the Hip06 SoC, the RoCE Engine is part of the Hisilicon Network
Subsystem and is dependent upon DSAF module. Therefore, certain
functions like RESET are exposed through the common registers of
HNS DSAF module which are memory-mapped by the HNS driver and
currently can only be accessed through DT/syscon interface.

This patch adds the support of ACPI to the existing RoCE reset
function in the HNS driver(please refer NOTE 2). Hisilicon RoCE
driver (please refer NOTE 1) shall call this reset function during
probe time to reset the RoCE Engine.

The HNS Reset function indirectly ends up in calling the _DSM()
function part of the DSDT ACPI Table. Actual reset functionality
for ACPI is implemented within the ACPI DSDT Table which also has
been enhanced to support this change.

Support of ACPI in the HNS RoCE driver shall be pushed through a
different accompanying below patch:
"IB/hns: Add support of ACPI to the Hisilicon RoCE Driver"

NOTE 1: HNS RoCE driver has already been accepted by its maintainer
Doug Ledford<dledford@redhat.com>. Please refer below link:
https://www.spinics.net/lists/linux-rdma/msg38850.html

NOTE 2: RoCE reset function patch has been accepted and now is
part of the net-next:
https://www.mail-archive.com/netdev@vger.kernel.org/msg123867.html

Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Reviewed-by: Yisen Zhuang <yisen.zhuang@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: Fix return value check in hns_roce_get_cfg()
Wei Yongjun [Sat, 6 Aug 2016 01:01:24 +0000 (01:01 +0000)]
IB/hns: Fix return value check in hns_roce_get_cfg()

In case of error, the function devm_ioremap_resource() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should
be replaced with IS_ERR().

Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoMAINTAINERS: Add maintainers for Hisilicon RoCE driver
oulijun [Thu, 21 Jul 2016 11:06:57 +0000 (19:06 +0800)]
MAINTAINERS: Add maintainers for Hisilicon RoCE driver

This patch added maintainers for RoCE driver.

Signed-off-by: Wei Hu <xavier.huwei@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: Kconfig and Makefile for RoCE module
oulijun [Thu, 21 Jul 2016 11:06:56 +0000 (19:06 +0800)]
IB/hns: Kconfig and Makefile for RoCE module

This patch added Kconfig and Makefile for building RoCE module.

Signed-off-by: Wei Hu <xavier.huwei@huawei.com>
Signed-off-by: Nenglong Zhao <zhaonenglong@hisilicon.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoIB/hns: Add driver files for hns RoCE driver
oulijun [Thu, 21 Jul 2016 11:06:38 +0000 (19:06 +0800)]
IB/hns: Add driver files for hns RoCE driver

These are the various new source code files for the Hisilicon
RoCE driver for ARM architecture.

Signed-off-by: Wei Hu <xavier.huwei@huawei.com>
Signed-off-by: Nenglong Zhao <zhaonenglong@hisilicon.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agodevicetree: bindings: IB: Add binding document for Hisilicon RoCE
oulijun [Thu, 21 Jul 2016 11:06:37 +0000 (19:06 +0800)]
devicetree: bindings: IB: Add binding document for Hisilicon RoCE

This patch added DTS binding document for Hisilicon RoCE driver.

Signed-off-by: Wei Hu <xavier.huwei@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
7 years agoRevert "l2tp: Refactor the codes with existing macros instead of literal number"
David S. Miller [Sun, 21 Aug 2016 22:50:11 +0000 (15:50 -0700)]
Revert "l2tp: Refactor the codes with existing macros instead of literal number"

This reverts commit 5ab1fe72d5490978104fc493615ea29dd7238766.

This change still has problems.

Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agocxgb4: Simplify the return expression
Wei Yongjun [Sat, 20 Aug 2016 15:32:41 +0000 (15:32 +0000)]
cxgb4: Simplify the return expression

Simplify the return expression.

Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agol2tp: Refactor the codes with existing macros instead of literal number
Gao Feng [Sat, 20 Aug 2016 15:52:27 +0000 (23:52 +0800)]
l2tp: Refactor the codes with existing macros instead of literal number

Use PPP_ALLSTATIONS, PPP_UI, and SEND_SHUTDOWN instead of 0xff,
0x03, and 2 separately.

Signed-off-by: Gao Feng <fgao@ikuai8.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agonet: ethernet: renesas: ravb: use new api ethtool_{get|set}_link_ksettings
Philippe Reynes [Fri, 19 Aug 2016 22:52:19 +0000 (00:52 +0200)]
net: ethernet: renesas: ravb: use new api ethtool_{get|set}_link_ksettings

The ethtool api {get|set}_settings is deprecated.
We move this driver to new api {get|set}_link_ksettings.

Signed-off-by: Philippe Reynes <tremyfr@gmail.com>
Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agonet: ethernet: renesas: ravb: use phydev from struct net_device
Philippe Reynes [Fri, 19 Aug 2016 22:52:18 +0000 (00:52 +0200)]
net: ethernet: renesas: ravb: use phydev from struct net_device

The private structure contain a pointer to phydev, but the structure
net_device already contain such pointer. So we can remove the pointer
phy_dev in the private structure, and update the driver to use the
one contained in struct net_device.

Signed-off-by: Philippe Reynes <tremyfr@gmail.com>
Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agoMerge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next...
David S. Miller [Sun, 21 Aug 2016 04:58:49 +0000 (21:58 -0700)]
Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue

Jeff Kirsher says:

====================
10GbE Intel Wired LAN Driver Updates 2016-08-20

This series contains updates to ixgbe and ixgbevf.

Veola fixes how the backplane reports the media in ethtool, as KR, KX or
KX4 based on the backplane interface present.

Emil fixes ixgbevf since an incorrect size parameter for
ixgbevf_write_msg_read_ack() ended up only giving the PF the first 4
bytes of the MAC address, so correct the size by calculating it on the
fly for all instances where we call ixgbevf_write_msg_read_ack().  Added
geneve receive offload support for x550em_a.

Don fixes the LED interface for x557 since it uses a different interface.
Added support for the new x557 copper device.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agoixgbe: Add support for new X557 device
Don Skidmore [Thu, 18 Aug 2016 00:34:40 +0000 (20:34 -0400)]
ixgbe: Add support for new X557 device

This patch adds support for the new copper device X557.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
7 years agoixgbe: add device to MDIO speed setting
Don Skidmore [Wed, 17 Aug 2016 21:34:07 +0000 (17:34 -0400)]
ixgbe: add device to MDIO speed setting

This shouldn't matter as nothing should be attached still to be
consisted control MDIO speed for these devices as well.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
7 years agoixgbe: Fix led interface for X557 devices
Don Skidmore [Wed, 17 Aug 2016 18:11:57 +0000 (14:11 -0400)]
ixgbe: Fix led interface for X557 devices

The X557 devices use a different interface to the LED for the port.
This patch reflect that change.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
7 years agoixgbe: add support for geneve Rx offload
Emil Tantilov [Wed, 10 Aug 2016 18:19:23 +0000 (11:19 -0700)]
ixgbe: add support for geneve Rx offload

Add geneve Rx offload support for x550em_a.

The implementation follows the vxlan code with the lower 16 bits of
the VXLANCTRL register holding the UDP port for VXLAN and the upper
for Geneve.

Disabled NFS filters in the RFCTL register which allows us to simplify
the check for VXLAN and Geneve packets in ixgbe_rx_checksum().

Removed vxlan from the name of the callback functions and replaced it
with udp_tunnel which is more in line with the new API.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
7 years agoixgbevf: fix incorrect MAC address on load
Emil Tantilov [Wed, 27 Jul 2016 17:55:08 +0000 (10:55 -0700)]
ixgbevf: fix incorrect MAC address on load

The PF driver was only receiving the first 4 bytes of the MAC due
to an incorrect size parameter for ixgbevf_write_msg_read_ack()
in ixgbevf_set_rar_vf().

Correct the size by calculating it on a fly for all instances where
we call ixgbevf_write_msg_read_ack()

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
7 years agoixgbe: report correct media type for KR, KX and KX4 interfaces
Veola Nazareth [Sun, 21 Aug 2016 02:35:37 +0000 (19:35 -0700)]
ixgbe: report correct media type for KR, KX and KX4 interfaces

ethtool reports backplane type interfaces as 1000/10000baseT link modes.
This has been corrected to report the media as KR, KX or KX4 based on the backplane interface present.

Signed-off-by: Veola Nazareth <veola.nazareth@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
7 years agoMerge branch 'tun-cleanups'
David S. Miller [Sun, 21 Aug 2016 02:11:34 +0000 (19:11 -0700)]
Merge branch 'tun-cleanups'

Markus Elfring says:

====================
tun: Fine-tuning for update_filter()

A few update suggestions were taken into account
from static source code analysis.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agotun: Rename a jump label in update_filter()
Markus Elfring [Sat, 20 Aug 2016 07:00:34 +0000 (09:00 +0200)]
tun: Rename a jump label in update_filter()

Adjust a jump target according to the Linux coding style convention.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agotun: Use memdup_user() rather than duplicating its implementation
Markus Elfring [Sat, 20 Aug 2016 06:54:15 +0000 (08:54 +0200)]
tun: Use memdup_user() rather than duplicating its implementation

Reuse existing functionality from memdup_user() instead of keeping
duplicate source code.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Reviewed-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agoMerge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next...
David S. Miller [Sun, 21 Aug 2016 01:56:30 +0000 (18:56 -0700)]
Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue

Jeff Kirsher says:

====================
40GbE Intel Wired LAN Driver Updates 2016-08-19

This series contains updates to i40e and i40evf only.

Jake provides several patches, first just moves a function to co-locate
the two functions related to configuring RSS via the admin queue, which
should help in spotting bugs when comparing the two functions.  Fixed
an issue where commit e69ff813af35 ("i40e: rework the functions to
configure RSS with similar parameters") missed checking whether the seed
is NULL before using it and did not use the passed in *lut parameter.
Fixed an issue where a previous refactor missed i40e_vsi_config_rss()
and the values were being ignored, so checked for the fields and used
them instead of default values.  Lastly replaced calls to
create_singlethread_workqueue() with alloc_workqueue() to provide more
control over workqueue creation and allows explicit setting of the
desired mode of operation.

Mitch adds link speed to log messages and reports speed through ethtool.

Carolyn refactors tail bump check and fixes byte ordering problems found
when enabling this feature support.  Adds support for HMC resources and
profile commands for x722 firmware.

Heinrich Schuchardt fixes format identifiers from %u to %d since the
variable is defined as an integer.

Catherine fixes an issue where there was a race condition between the
completion of the client open and calls to the client ops, so ensured
that client ops are not called until we are sure client is open.

Harshitha makes sure that i40e_client_release() does not try to use
an adapter pointer which may not be initialized, so make sure it is.

Joe Perches fixes the use of the local macro XSTRINGIFY() to use
__stringify() instead.

Avinash corrects the mutex usage in client_subtask().  Fixed the RDMA
client to open again after reset since it is closed during a PF reset.

Jeff (me) clean up whitespace issues, where indentation was done
inconsistently and with spaces versus tabs.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agosamples/bpf: Add tunnel set/get tests.
William Tu [Fri, 19 Aug 2016 18:55:44 +0000 (11:55 -0700)]
samples/bpf: Add tunnel set/get tests.

The patch creates sample code exercising bpf_skb_{set,get}_tunnel_key,
and bpf_skb_{set,get}_tunnel_opt for GRE, VXLAN, and GENEVE.  A native
tunnel device is created in a namespace to interact with a lwtunnel
device out of the namespace, with metadata enabled.  The bpf_skb_set_*
program is attached to tc egress and bpf_skb_get_* is attached to egress
qdisc.  A ping between two tunnels is used to verify correctness and
the result of bpf_skb_get_* printed by bpf_trace_printk.

Signed-off-by: William Tu <u9012063@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agohv_netvsc: Implement batching of receive completions
Haiyang Zhang [Fri, 19 Aug 2016 21:47:09 +0000 (14:47 -0700)]
hv_netvsc: Implement batching of receive completions

The existing code uses busy retry when unable to send out receive
completions due to full ring buffer. It also gives up retrying after limit
is reached, and causes receive buffer slots not being recycled.
This patch implements batching of receive completions. It also prevents
dropping receive completions due to full ring buffer.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agoi40evf: Open RDMA Client after reset
Avinash Dayanand [Wed, 17 Aug 2016 23:04:08 +0000 (16:04 -0700)]
i40evf: Open RDMA Client after reset

RDMA client is closed during the PF reset and needs to be opened again.
Setting the flag so that RDMA client is opened in watchdog() function.

Change-ID: I507b1e4cbd05528cdff68fd360ef3dcac8901263
Signed-off-by: Avinash Dayanand <avinash.dayanand@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
7 years agoi40e/i40evf: Fix indentation
Jeff Kirsher [Sat, 20 Aug 2016 04:47:41 +0000 (21:47 -0700)]
i40e/i40evf: Fix indentation

Several defines and code comments were indented with spaces instead
of tabs, correct the issue to make indentation consistent.

Change-ID: I0dc6bbb990ec4a9e856acc9ec526d876181f092c
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
7 years agoi40e: Correcting mutex usage in client code
Avinash Dayanand [Wed, 17 Aug 2016 23:04:06 +0000 (16:04 -0700)]
i40e: Correcting mutex usage in client code

Correcting the mutex usage, in client_subtask(), mutex_unlock has
to be called just before client_del_instance() since this function opens
and later closes the same mutex again.
Similarly in client_is_registered removing the mutex since it closes
the mutex twice.

This is a patch suggested by RDMA team.

Change-ID: Icce519c266e4221b8a2a72a15ba5bf01750e5852
Signed-off-by: Avinash Dayanand <avinash.dayanand@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
7 years agoi40e: Remove XSTRINGIFY macro definitions and uses
Joe Perches [Wed, 17 Aug 2016 10:37:31 +0000 (03:37 -0700)]
i40e: Remove XSTRINGIFY macro definitions and uses

Use __stringify instead.

Signed-off-by: Joe Perches <joe@perches.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
7 years agoi40e: Initialize pointer in client_release function
Harshitha Ramamurthy [Mon, 15 Aug 2016 21:17:19 +0000 (14:17 -0700)]
i40e: Initialize pointer in client_release function

The function i40e_client_release has a print statement that uses an
adapter pointer which is not initialized if a previous if statement
is not true. Hence, intialize it in the right place.

Change-ID: I1afdaa2c46771ac42be56edcc41bb56b455b06c8
Signed-off-by: Harshitha Ramamurthy <harshitha.ramamurthy@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
7 years agoi40e: Check client is open before calling client ops
Catherine Sullivan [Mon, 15 Aug 2016 21:17:18 +0000 (14:17 -0700)]
i40e: Check client is open before calling client ops

We were having a race between the completion of the client open and
calls to the client ops so don't call a client op unless we are sure the
client is open.

Testing Hints: Load IWARP driver and make sure it works as expected.

Change-Id: I741f4f2aa4fcbfdad3e40dabbbb1b005856c396b
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
7 years agoi40e: use matching format identifiers
Heinrich Schuchardt [Wed, 10 Aug 2016 23:07:22 +0000 (01:07 +0200)]
i40e: use matching format identifiers

i is defined as int but output as %u several times.
Adjust the format identifiers.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
7 years agoi40e: Add support for HMC resource and profile for X722
Carolyn Wyborny [Thu, 4 Aug 2016 18:37:05 +0000 (11:37 -0700)]
i40e: Add support for HMC resource and profile for X722

This patch adds support for HMC resource and profile cmds for X722
firmware.

Change-ID: Icc332101f38ab15d1bfa167823100eb4f6822f7e
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
7 years agoi40e: Fix byte ordering in ARP NS code for X722
Carolyn Wyborny [Thu, 4 Aug 2016 18:37:04 +0000 (11:37 -0700)]
i40e: Fix byte ordering in ARP NS code for X722

This patch fixes byte ordering problems found when enabling this feature
support. Without this patch, the feature will not work correctly. This
patch fixes the definitions to have the correct byte order.

Change-ID: Ic7489fbcbe2195df7be62ff5e359201b827cefe6
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
7 years agoi40e: refactor tail_bump check
Carolyn Wyborny [Thu, 4 Aug 2016 18:37:03 +0000 (11:37 -0700)]
i40e: refactor tail_bump check

This patch refactors tail bump check.

Change-ID: Ide0e19171d67d90cb2b06b8dcd4fa791ae120160
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
7 years agoi40evf: report link speed
Mitch Williams [Thu, 4 Aug 2016 18:37:02 +0000 (11:37 -0700)]
i40evf: report link speed

The PF driver tells us the link speed, so do something with that
information. Add link speed to log messages, and report speed through
ethtool.

Change-Id: I279dc9540cc5203376406050a3e8d67e128d5882
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
7 years agoi40e: use alloc_workqueue instead of create_singlethread_workqueue
Jacob Keller [Thu, 4 Aug 2016 18:37:01 +0000 (11:37 -0700)]
i40e: use alloc_workqueue instead of create_singlethread_workqueue

Replace calls to create_singlethread_workqueue instead with alloc_workqueue
as is style with other Intel drivers. This provides more control over
workqueue creation, and allows explicit setting of the desired mode of
operation. It also makes it more obvious that driver name constant is
passed to a format "%s".

Change-ID: I6192b44caf5140336cd54c5b350d51c73b541fdb
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
7 years agoi40e: use configured RSS key and lookup table in i40e_vsi_config_rss
Jacob Keller [Tue, 19 Jul 2016 23:23:31 +0000 (16:23 -0700)]
i40e: use configured RSS key and lookup table in i40e_vsi_config_rss

A previous refactor added support to store user configuration for VSIs,
so that extra VSIs such as for VMDq can use this information when
configuring. Unfortunately the i40e_vsi_config_rss function was missed
in this refactor, and the values were being ignored. Fix this by
checking for the fields and using those instead of always using the
default values.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
7 years agoi40e: fix broken i40e_config_rss_aq function
Jacob Keller [Tue, 19 Jul 2016 23:23:30 +0000 (16:23 -0700)]
i40e: fix broken i40e_config_rss_aq function

X722 hardware requires using the admin queue to configure RSS. This
function was previously re-written in commit e69ff813af35 ("i40e: rework
the functions to configure RSS with similar parameters").
However, the previous refactor did not work correctly for a few reasons

(a) it does not check whether seed is NULL before using it, resulting in
a NULL pointer dereference

[  402.954721] BUG: unable to handle kernel NULL pointer dereference at           (null)
[  402.955568] IP: [<ffffffffa0090ccf>] i40e_config_rss_aq.constprop.65+0x2f/0x1c0 [i40e]
[  402.956402] PGD ad610067 PUD accc0067 PMD 0
[  402.957235] Oops: 0000 [#1] SMP
[  402.958064] Modules linked in: ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ip_set nfnetlink ebtable_filter ebtable_
broute bridge stp llc ebtable_nat ebtables ip6table_mangle ip6table_raw ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv
6 ip6table_security ip6table_filter ip6_tables iptable_mangle iptable_raw iptable_nat nf_conntrack_ipv4_ nf_defrag_ipv4_ nf_nat_ip
v4_ nf_nat nf_conntrack iptable_security intel_rapl i86_kg_temp_thermal coretemp kvm_intel kvm irqbypass crct10dif_clMl crc32_
pclMl ghash_clMlni_intel iTCO_wdt iTCO_vendor_support shpchp sb_edac dcdbas pcspkr joydev ipmi_devintf wmi edac_core ipmi_ssif
 acpi_ad acpi_ower_meter ipmi_si ipmi_msghandler mei_me nfsd lpc_ich mei ioatdma tpm_tis auth_rpcgss tpm nfs_acl lockd grace s
unrpc ifs nngag200 i2c_algo_bit drm_kms_helper ttm drm iigbe bnx2x i40e dca mdio ptp pps_core libcrc32c fjes crc32c_intel
[  402.965563] CPU: 22 PID: 2461 Conm: ethtool Not tainted 4.6.0-rc7_1.2-ABNidQ+ #20
[  402.966719] Hardware name: Dell Inc. PowerEdge R720/0C4Y3R, BIOS 2.5.2 01/28/2015
[  402.967862] task: ffff880219b51dc0 ti: ffff8800b3408000 task.ti: ffff8800b3408000
[  402.969046] RIP: 0010:[<ffffffffa0090ccf>]  [<ffffffffa0090ccf>] i40e_config_rss_aq.constprop.65+0x2f/0x1c0 [i40e]
[  402.970339] RSP: 0018:ffff8800b340ba90  EFLAGS: 00010246
[  402.971616] RAX: 0000000000000000 RBX: ffff88042ec14000 RCX: 0000000000000200
[  402.972961] RDX: ffff880428eb9200 RSI: 0000000000000000 RDI: ffff88042ec14000
[  402.974312] RBP: ffff8800b340baf8 R08: ffff880237ada8f0 R09: ffff880428eb9200
[  402.975709] R10: ffff880428eb9200 R11: 0000000000000000 R12: ffff88042ec2e000
[  402.977104] R13: ffff88042ec2e000 R14: ffff88042ec14000 R15: ffff88022ea00800
[  402.978541] FS:  00007f84fd054700(0000) GS:ffff880237ac0000(0000) knlGS:0000000000000000
[  402.980003] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  402.981508] CR2: 0000000000000000 CR3: 000000003289e000 CR4: 00000000000406e0
[  402.983028] Stack:
[  402.984578]  0000000002000200 0000000000000000 ffff88023ffeda68 ffff88023ffef000
[  402.986187]  0000000000000268 ffff8800b340bbf8 ffff88023ffedd80 0000000088ce4f1d
[  402.987844]  ffff88042ec14000 ffff88022ea00800 ffff88042ec2e000 ffff88042ec14000
[  402.989509] Call Trace:
[  402.991200]  [<ffffffffa009636f>] i40e_config_rss+0x11f/0x1c0 [i40e]
[  402.992924]  [<ffffffffa00a1ae0>] i40e_set_rifh+0ic0/0x130 [i40e]
[  402.994684]  [<ffffffff816d54b7>] ethtool_set_rifh+0x1f7/0x300
[  402.996446]  [<ffffffff8136d02b>] ? cred_has_capability+0io6b/0x100
[  402.998203]  [<ffffffff8136d102>] ? selinux_capable+0x12/0x20
[  402.999968]  [<ffffffff8136277b>] ? security_capable+0x4b/0x70
[  403.001707]  [<ffffffff816d6da3>] dev_ethtool+0x1423/0x2290
[  403.003461]  [<ffffffff816eab41>] dev_ioctl+0x191/0io630
[  403.005186]  [<ffffffff811cf80a>] ? lru_cache_add+0x3a/0i80
[  403.006942]  [<ffffffff817f2a8e>] ? _raw_spin_unlock+0ie/0x20
[  403.008691]  [<ffffffff816adb95>] sock_do_ioctl+0x45/0i50
[  403.010421]  [<ffffffff816ae229>] sock_ioctl+0x209/0x2d0
[  403.012173]  [<ffffffff81262194>] do_vfs_ioctl+0u4/0io6c0
[  403.013911]  [<ffffffff81262829>] SyS_ioctl+0x79/0x90
[  403.015710]  [<ffffffff817f2e72>] entry_SYSCALL_64_fastpath+0x1a/0u4
[  403.017500] Code: 90 55 48 89 e5 41 57 41 56 41 55 41 54 53 48 89 fb 48 83 ec 40 4c 8b a7 e0 05 00 00 65 48 8b 04 25 28 00 00 00 48 89 45 d0 31 c0 <48> 8b 06 41 0f b7 bc 24 f2 0f 00 00 48 89 45 9c 48 8b 46 08 48
[  403.021454] RIP  [<ffffffffa0090ccf>] i40e_config_rss_aq.constprop.65+0x2f/0x1c0 [i40e]
[  403.023395]  RSP <ffff8800b340ba90>
[  403.025271] CR2: 0000000000000000
[  403.027169] ---[ end trace 64561b528cf61cf0 ]---

(b) it does not even bother to use the passed in *lut parameter which
defines the requested lookup table. Instead it uses its own round robin
table.

Fix these issues by re-writing it to be similar to i40e_config_rss_reg
and i40e_get_rss_aq.

Fixes: e69ff813af35 ("i40e: rework the functions to configure RSS with similar parameters", 2015-10-21)
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
7 years agoi40e: move i40e_vsi_config_rss below i40e_get_rss_aq
Jacob Keller [Tue, 19 Jul 2016 23:23:29 +0000 (16:23 -0700)]
i40e: move i40e_vsi_config_rss below i40e_get_rss_aq

Move this function below the two functions related to configuring RSS
via the admin queue. This helps co-locate the two functions, and made it
easier to spot a bug in the first i40e_config_rss_aq function as
compared to the i40e_get_rss_aq function.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
7 years agonet/irda: remove pointless assignment/check
Vegard Nossum [Fri, 19 Aug 2016 16:08:57 +0000 (18:08 +0200)]
net/irda: remove pointless assignment/check

We've already set sk to sock->sk and dereferenced it, so if it's NULL
we would have crashed already. Moreover, if it was NULL we would have
crashed anyway when jumping to 'out' and trying to unlock the sock.
Furthermore, if we had assigned a different value to 'sk' we would
have been calling lock_sock() and release_sock() on different sockets.

My conclusion is that these two lines are complete nonsense and only
serve to confuse the reader.

Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agoqed: utilize FW 8.10.10.0
Yuval Mintz [Fri, 19 Aug 2016 06:33:31 +0000 (09:33 +0300)]
qed: utilize FW 8.10.10.0

This new firmware for the qed* adpaters fixes several issues:
 - Better blocking of malicious VFs.
 - After FLR, Tx-switching [internal routing] of packets might
   be incorrect.
 - Deletion of unicast MAC filters would sometime have side-effect
   of corrupting the MAC filters configred for a device.
It also contains fixes for future qed* drivers that *hopefully* would be
sent for review in the near future.

In addition, it would allow driver some new functionality, including:
 - Allowing PF/VF driver compaitibility with old drivers [running
   pre-8.10.5.0 firmware].
 - Better debug facilities.

This would also bump the qed* driver versions to 8.10.9.20.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agoMerge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next...
David S. Miller [Sat, 20 Aug 2016 00:19:20 +0000 (17:19 -0700)]
Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue

Jeff Kirsher says:

====================
10GbE Intel Wired LAN Driver Updates 2016-08-18

This series contains updates to ixgbe and ixgbevf.

Emil cleans up confusing amongst the users by making an error message
into a debug message, since the TXDCTL.ENABLE (and comparable
VFTXDCTL.ENABLE for ixgbevf) bit is set only when the
transmit queue is actually enabled, which may not happen during the
configure phase eve if we waited for it.  Converts to using netdev_dbg()
macro instead of our home brewed macro for ixgbevf.  Converted the
service task to use atomic bitwise operations when setting and checking
reset requests to reduce the possibility of race conditions.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agoMerge branch 'bcm_sf2-platform-dev'
David S. Miller [Sat, 20 Aug 2016 00:15:37 +0000 (17:15 -0700)]
Merge branch 'bcm_sf2-platform-dev'

Florian Fainelli says:

====================
net: dsa: bcm_sf2: Platform conversion

This patch series converts the bcm_sf2 driver from a traditional DSA driver
into a platform_device driver and makes it use the new DSA binding that Andrew
introduced in the latest merge window.

Prior attempts used to coerce the code in net/dsa/dsa2.c to accept the old
binding, while really there is only one broken single user out there: bcm_sf2,
so instead, just assume the new DT binding is deployed and use it accordingly.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agonet: dsa: bcm_sf2: Remove probing through old DSA binding
Florian Fainelli [Thu, 18 Aug 2016 22:30:16 +0000 (15:30 -0700)]
net: dsa: bcm_sf2: Remove probing through old DSA binding

Remove our dsa_switch_driver::drv_probe callback to prevent probing
through the old DSA binding, not that this could happen anymore now that
we have moved the matching compatible string from net/dsa/dsa.c to
drivers/net/dsa/bcm_sf2.c, so this is essentially dead code.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agonet: dsa: bcm_sf2: Use device managed helpers
Florian Fainelli [Thu, 18 Aug 2016 22:30:15 +0000 (15:30 -0700)]
net: dsa: bcm_sf2: Use device managed helpers

Now that we have converted the drivers into a proper platform device
driver, we can use the device managed helper functions to simplify the
error paths a bit wrt. register resources and IRQs.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agonet: dsa: bcm_sf2: Make it a real platform device driver
Florian Fainelli [Thu, 18 Aug 2016 22:30:14 +0000 (15:30 -0700)]
net: dsa: bcm_sf2: Make it a real platform device driver

The Broadcom Starfighter 2 switch driver should be a proper platform
driver, now that the DSA code has been updated to allow that, register a
switch device, feed it with the proper configuration data coming from
Device Tree and register our switch device with DSA.

The bulk of the changes consist in moving what bcm_sf2_sw_setup() did
into the platform driver probe function.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agoDocumentation: dt: bindings: Update Broadcom 7445 switch document
Florian Fainelli [Thu, 18 Aug 2016 22:30:13 +0000 (15:30 -0700)]
Documentation: dt: bindings: Update Broadcom 7445 switch document

Document the updated binding which conforms to the new DSA binding in
net/dsa/dsa.txt.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agonet: dsa: Export suspend/resume functions
Florian Fainelli [Thu, 18 Aug 2016 22:30:12 +0000 (15:30 -0700)]
net: dsa: Export suspend/resume functions

In preparation for allowing switch drivers to implement system-wide
suspend/resume functions, export dsa_switch_suspend and
dsa_switch_resume() such that these are callable from the appropriate
driver specific suspend/resume functions.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agoMerge branch 'mv88e6xxx-fix-wait'
David S. Miller [Sat, 20 Aug 2016 00:14:08 +0000 (17:14 -0700)]
Merge branch 'mv88e6xxx-fix-wait'

Andrew Lunn says:

====================
Fix mv88e6xxx wait function

The mv88e6xxx wait function can be upset of the system has nots of
other things to do and a sleep takes a lot longer than expected. Fix
this be using a fixed number of iterations, rather than a fixed
walkclock time.

Witht that change made, it is possible to consoliate another
wait function.

A wait actually timing out should not happen and when it does, it
means something serious is wrong. Make sure an error is logged,
since not all callers will log an error.
====================

Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agodsa: mv88e6xxx: Make mv88e6xxx_wait() timeout verbose
Andrew Lunn [Thu, 18 Aug 2016 22:01:57 +0000 (00:01 +0200)]
dsa: mv88e6xxx: Make mv88e6xxx_wait() timeout verbose

When mv88e6xxx_wait() returns a timeout, something bad has
happened. Make sure it is noticed by logging an error.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agodsa: mv88e6xxx: Use mv88e6xx_wait in mv88e6xxx_update()
Andrew Lunn [Thu, 18 Aug 2016 22:01:56 +0000 (00:01 +0200)]
dsa: mv88e6xxx: Use mv88e6xx_wait in mv88e6xxx_update()

Now that mv88e6xx_wait() iterated on a counter than a fixed time
interval, it implements the same mechanism as mv88e6xxx_update() uses.
So use it in mv88e6xx_wait().

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agodsa: mv88e6xxx: Timeout based on iterations, not time
Andrew Lunn [Thu, 18 Aug 2016 22:01:55 +0000 (00:01 +0200)]
dsa: mv88e6xxx: Timeout based on iterations, not time

The mv88e6xxx driver times out operations on the switch based on
looping until an elapsed wall clock time is reached. However, if
usleep_range() sleeps much longer than expected, it could timeout with
an error without actually checking to see if the devices has completed
the operation. So replace the elapsed time with a fixed upper bound on
the number of loops.

Testing on various switches has shown that switches takes either 0 or
1 iteration, so a maximum of 16 iterations is a safe limit.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agoMerge branch 'phy-next'
David S. Miller [Sat, 20 Aug 2016 00:11:50 +0000 (17:11 -0700)]
Merge branch 'phy-next'

Andrew Lunn says:

====================
PHY Kconfig and Makefile cleanup

The Ethernet PHY directory has slowly been getting more entries.
Split the entries in the Makefile and Kconfig into MDIO bus drivers
and PHYs. Within these two groups, sort them. This should reduce merge
conflicts and aid finding what one searches for.

The Kconfig text contains redundant "Driver for" and "Support for"
which add little value, make the vendor less obvious, and defeat the
shortcut key in the menu. Remove such text.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agonet: phy: Kconfig: Remove redundant "Support for"
Andrew Lunn [Thu, 18 Aug 2016 21:56:06 +0000 (23:56 +0200)]
net: phy: Kconfig: Remove redundant "Support for"

Remove the redundant "Support for" and "Drivers for" from the Kconfig
short description. This makes the manufacture much more prominent in
the list and makes the shortcut keys useful.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agonet: phy: Sort Makefile and Kconfig
Andrew Lunn [Thu, 18 Aug 2016 21:56:05 +0000 (23:56 +0200)]
net: phy: Sort Makefile and Kconfig

Sort the files to reduce merge conflicts and to make it easier to find
drivers by name. Also separate the MDIO bus drivers from the PHY
drivers, again to help find what you need.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agonet: ipv4: fix sparse error in fib_good_nh()
Eric Dumazet [Thu, 18 Aug 2016 17:19:34 +0000 (10:19 -0700)]
net: ipv4: fix sparse error in fib_good_nh()

Fixes following sparse errors :

net/ipv4/fib_semantics.c:1579:61: warning: incorrect type in argument 2
(different base types)
net/ipv4/fib_semantics.c:1579:61:    expected unsigned int [unsigned]
[usertype] key
net/ipv4/fib_semantics.c:1579:61:    got restricted __be32 const
[usertype] nh_gw

Fixes: a6db4494d218c ("net: ipv4: Consider failed nexthops in multipath routes")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agoudp: include addrconf.h
Eric Dumazet [Thu, 18 Aug 2016 16:59:12 +0000 (09:59 -0700)]
udp: include addrconf.h

Include ipv4_rcv_saddr_equal() definition to avoid this sparse error :

net/ipv4/udp.c:362:5: warning: symbol 'ipv4_rcv_saddr_equal' was not
declared. Should it be static?

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agotcp: md5: remove tcp_md5_hash_header()
Eric Dumazet [Thu, 18 Aug 2016 16:49:55 +0000 (09:49 -0700)]
tcp: md5: remove tcp_md5_hash_header()

After commit 19689e38eca5 ("tcp: md5: use kmalloc() backed scratch
areas") this function is no longer used.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agoibmvnic: Handle backing device failover and reinitialization
Thomas Falcon [Thu, 18 Aug 2016 16:37:51 +0000 (11:37 -0500)]
ibmvnic: Handle backing device failover and reinitialization

An upcoming feature of IBM VNIC protocol is the ability to configure
redundant backing devices for a VNIC client. In case of a failure
on the current backing device, the driver will receive a signal
from the hypervisor indicating that a failover will occur. The driver
will then wait for a message from the backing device before
establishing a new connection.

Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agonet: hns: Add reset function support for RoCE driver
oulijun [Thu, 18 Aug 2016 12:32:52 +0000 (20:32 +0800)]
net: hns: Add reset function support for RoCE driver

It added reset function for RoCE driver. RoCE is a feature of hns.
In hip06 SoC, in RoCE reset process, it's needed to configure dsaf
channel reset, port and sl map info. Reset function of RoCE is
located in dsaf module, we only call it in RoCE driver when needed.

This patch is used to fix the conflict, please refer to this link:
  https://www.spinics.net/lists/linux-rdma/msg39114.html

Signed-off-by: Wei Hu <xavier.huwei@huawei.com>
Signed-off-by: Nenglong Zhao <zhaonenglong@hisilicon.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Sheng Li <lisheng011@huawei.com>
Reviewed-by: Yisen Zhuang <yisen.zhuang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agoMerge branch 'rhash-raw-walkers-remove-part-1'
David S. Miller [Fri, 19 Aug 2016 21:40:25 +0000 (14:40 -0700)]
Merge branch 'rhash-raw-walkers-remove-part-1'

Herbert Xu says:

====================
rhashtable: Get rid of raw table walkers part 1

This series starts the process of getting rid of all raw rhashtable
walkers (e.g., using any of the rht_for_each helpers) from the
kernel.

We need to do this before I can fix the resize kmalloc failure issue
by using multi-layered tables.

We should do this anyway because almost all raw table walkers are
already buggy in that they don't handle multiple rhashtables during
a resize.
====================

Dave/Tomas, please keep an eye out for any new patches that try
to introduce raw table walkers and nack them.

Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agonetlink: Use rhashtable walk interface in diag dump
Herbert Xu [Fri, 19 Aug 2016 08:21:37 +0000 (16:21 +0800)]
netlink: Use rhashtable walk interface in diag dump

This patch converts the diag dumping code to use the rhashtable
walk code instead of going through rhashtable by hand.  The lock
nl_table_lock is now only taken while we process the multicast
list as it's not needed for the rhashtable walk.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agoMAINTAINERS: Add extra rhashtable maintainer
Herbert Xu [Thu, 18 Aug 2016 08:50:57 +0000 (16:50 +0800)]
MAINTAINERS: Add extra rhashtable maintainer

As I'm working actively on rhashtable it helps if people CCed me
when they work on in.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agorhashtable: Remove GFP flag from rhashtable_walk_init
Herbert Xu [Thu, 18 Aug 2016 08:50:56 +0000 (16:50 +0800)]
rhashtable: Remove GFP flag from rhashtable_walk_init

The commit 8f6fd83c6c5ec66a4a70c728535ddcdfef4f3697 ("rhashtable:
accept GFP flags in rhashtable_walk_init") added a GFP flag argument
to rhashtable_walk_init because some users wish to use the walker
in an unsleepable context.

In fact we don't need to allocate memory in rhashtable_walk_init
at all.  The walker is always paired with an iterator so we could
just stash ourselves there.

This patch does that by introducing a new enter function to replace
the existing init function.  This way we don't have to churn all
the existing users again.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agoMerge branch 'cxgb-crypto'
David S. Miller [Fri, 19 Aug 2016 07:00:45 +0000 (00:00 -0700)]
Merge branch 'cxgb-crypto'

Hariprasad Shenai says:

====================
crypto/chcr: Add support for Chelsio Crypto Driver

This patch series adds support for Chelsio Crypto driver.

The patch series has been created against net-next tree and includes
patches for Chelsio Low Level Driver(cxgb4) and adds the new crypto
Upper Layer Driver(chcr) under a new directory drivers/crypto/chelsio.

Patch 1/4 ("cxgb4: Add support for dynamic allocation of resources for
ULD") adds support for dynamic allocation of resources for ULD. The
objective of this patch is to provide generic interface for upper layer
drivers to allocate and initialize hardware resources.

The present cxgb4 (network driver) apart from network functionality, also
initializes hardware and thus acts as lower layer driver for other drivers
to use hardware resources. Thus it acts as both a Low level driver for
Upper layer driver's like iw_cxgb4, cxgb4i and cxgb4it and a Network Driver.

Right now the allocation of resources for Upper layer driver's is done
statically. Patch 1/4 adds a new infrastructure for dynamic allocation of
resources. cxgb4 will read the hardware capability through firmware and
allocate/free the queues for Upper layer drivers when the respective
driver's are loaded and freed when unloaded.

Patch 2/3, 3/4 and 4/4 adds support for Chelsio Crypto Driver. The Crypto
driver will act as another ULD on top of cxgb4.

In this patch series, the ULD API framework is used only by crypto and other
ULD's will make use of it in the next series.

This patch series is only for review, if this looks ok we will test it
thoroughly and send request for merge.

We have included all the maintainers of respective drivers. Kindly
review the changes and provide feedback on the same.

V3: - Removed crypto queues from cxgb4 and added support for dynamic
      allocation of resources for Upper layer drivers
    - Dependency fix in Kconfig.

V2: - Some residual code cleanup
    - Adds pr_fmt with chcr (KBUILD_MODNAME) added
    - Changes var name to accomodate them <80 columns in the chcr_register_alg
    - Support for printing the crypto queue stats
    - Fix compile warnings reported by kbuild bot for certain architectures
    - Dependency fix in Kconfig.
    - If the request has the MAY_BACKLOG bit set and hardware queue is
      full the request is queued up else -EBUSY is returned to throttle
      the user. The queue when executed and processed returns -EINPROGRESS
      in completion.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agocrypto: Added Chelsio Menu to the Kconfig file
Hariprasad Shenai [Wed, 17 Aug 2016 07:03:06 +0000 (12:33 +0530)]
crypto: Added Chelsio Menu to the Kconfig file

Adds the config entry for the Chelsio Crypto Driver, Makefile changes
for the same.

Signed-off-by: Atul Gupta <atul.gupta@chelsio.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>