From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shards.monkeyblade.net ([184.105.139.130]:54336 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751176AbeCGRR2 (ORCPT ); Wed, 7 Mar 2018 12:17:28 -0500 Date: Wed, 07 Mar 2018 12:17:26 -0500 (EST) Message-Id: <20180307.121726.2198524569867142434.davem@davemloft.net> To: Michal.Kalderon@cavium.com Cc: netdev@vger.kernel.org, dledford@redhat.com, jgg@mellanox.com, linux-rdma@vger.kernel.org, Ariel.Elior@cavium.com Subject: Re: [PATCH V3 net] qed: Free RoCE ILT Memory on rmmod qedr From: David Miller In-Reply-To: <1520286646-24583-1-git-send-email-Michal.Kalderon@cavium.com> References: <1520286646-24583-1-git-send-email-Michal.Kalderon@cavium.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: From: Michal Kalderon Date: Mon, 5 Mar 2018 23:50:46 +0200 > Rdma requires ILT Memory to be allocated for it's QPs. > Each ILT entry points to a page used by several Rdma QPs. > To avoid allocating all the memory in advance, the rdma > implementation dynamically allocates memory as more QPs are > added, however it does not dynamically free the memory. > The memory should have been freed on rmmod qedr, but isn't. > This patch adds the memory freeing on rmmod qedr (currently > it will be freed with qed is removed). > > An outcome of this bug, is that if qedr is unloaded and loaded > without unloaded qed, there will be no more RoCE traffic. > > The reason these are related, is that the logic of detecting the > first QP ever opened is by asking whether ILT memory for RoCE has > been allocated. > > In addition, this patch modifies freeing of the Task context to > always use the PROTOCOLID_ROCE and not the protocol passed, > this is because task context for iWARP and ROCE both use the > ROCE protocol id, as opposed to the connection context. > > Fixes: dbb799c39717 ("qed: Initialize hardware for new protocols") > > Signed-off-by: Michal Kalderon > Signed-off-by: Ariel Elior Please do not put an empty line in between a Fixes: tag and the others. They are all tags, and should be grouped together. > --- > Difference from V2: > > Fixed Broken parenthesis In comment Applied, thank you.