From: Chuck Lever III <chuck.lever@oracle.com>
To: Bernard Metzler <BMT@zurich.ibm.com>
Cc: Chuck Lever <cel@kernel.org>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH RFC] RDMA/core: Store zero GIDs in some cases
Date: Thu, 27 Apr 2023 17:48:20 +0000 [thread overview]
Message-ID: <29A9F2AE-ECF8-4EFC-B1EB-7B147FB17737@oracle.com> (raw)
In-Reply-To: <SA0PR15MB39193598A4C64E84F6E07582996A9@SA0PR15MB3919.namprd15.prod.outlook.com>
> On Apr 27, 2023, at 1:46 PM, Bernard Metzler <BMT@zurich.ibm.com> wrote:
>
>
>
>> -----Original Message-----
>> From: Chuck Lever <cel@kernel.org>
>> Sent: Thursday, 27 April 2023 19:15
>> To: Bernard Metzler <BMT@zurich.ibm.com>
>> Cc: linux-rdma@vger.kernel.org; linux-nfs@vger.kernel.org
>> Subject: [EXTERNAL] [PATCH RFC] RDMA/core: Store zero GIDs in some cases
>>
>> From: Bernard Metzler <bmt@zurich.ibm.com>
>>
>> Tunnel devices have zero GIDs, so skip the zero GID check when
>> setting up soft iWARP over a tunnel device.
>>
>> Suggested-by: Bernard Metzler <bmt@zurich.ibm.com>
>> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
>> ---
>> drivers/infiniband/core/cache.c | 4 +++-
>> drivers/infiniband/sw/siw/siw_main.c | 1 +
>> include/rdma/iw_cm.h | 9 ++++++++-
>> 3 files changed, 12 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/infiniband/core/cache.c
>> b/drivers/infiniband/core/cache.c
>> index 2e91d8879326..2493ca4f2739 100644
>> --- a/drivers/infiniband/core/cache.c
>> +++ b/drivers/infiniband/core/cache.c
>> @@ -41,6 +41,7 @@
>> #include <net/addrconf.h>
>>
>> #include <rdma/ib_cache.h>
>> +#include <rdma/iw_cm.h>
>>
>> #include "core_priv.h"
>>
>> @@ -441,7 +442,8 @@ static int add_modify_gid(struct ib_gid_table *table,
>> * leave other unused entries as the zero GID. Convert zero GIDs to
>> * empty table entries instead of storing them.
>> */
>> - if (rdma_is_zero_gid(&attr->gid))
>> + if (rdma_is_zero_gid(&attr->gid) &&
>> + !(attr->device->iw_driver_flags & IW_F_STORE_0GID))
>> return 0;
>>
>> entry = alloc_gid_entry(attr);
>> diff --git a/drivers/infiniband/sw/siw/siw_main.c
>> b/drivers/infiniband/sw/siw/siw_main.c
>> index dacc174604bf..842a039fa457 100644
>> --- a/drivers/infiniband/sw/siw/siw_main.c
>> +++ b/drivers/infiniband/sw/siw/siw_main.c
>> @@ -359,6 +359,7 @@ static struct siw_device *siw_device_create(struct
>> net_device *netdev)
>>
>> /* Disable TCP port mapping */
>> base_dev->iw_driver_flags = IW_F_NO_PORT_MAP;
>> + base_dev->iw_driver_flags = IW_F_STORE_0GID;
>>
> That overwrites the first assignment. Probably better
> '|= IW_F_STORE_0GID;' ? Or put them on one line...
D'oh! Will fix.
>> sdev->attrs.max_qp = SIW_MAX_QP;
>> sdev->attrs.max_qp_wr = SIW_MAX_QP_WR;
>> diff --git a/include/rdma/iw_cm.h b/include/rdma/iw_cm.h
>> index 03abd30e6c8c..c48f2cbe37b5 100644
>> --- a/include/rdma/iw_cm.h
>> +++ b/include/rdma/iw_cm.h
>> @@ -90,7 +90,14 @@ enum iw_flags {
>> * reserve the port. This is required for soft iwarp
>> * to play in the port mapped iwarp space.
>> */
>> - IW_F_NO_PORT_MAP = (1 << 0),
>> + IW_F_NO_PORT_MAP = BIT(0),
>> +
>> + /*
>> + * This flag allows the insertion of zero GIDs into the
>> + * stored GID table. That is needed to enable soft iWARP
>> + * on tunnel devices.
>> + */
>> + IW_F_STORE_0GID = BIT(1),
>> };
>>
>> /**
--
Chuck Lever
next prev parent reply other threads:[~2023-04-27 17:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-27 17:14 [PATCH RFC] RDMA/core: Store zero GIDs in some cases Chuck Lever
2023-04-27 17:46 ` Bernard Metzler
2023-04-27 17:48 ` Chuck Lever III [this message]
2023-04-28 6:44 ` Bernard Metzler
2023-04-28 13:39 ` Jason Gunthorpe
2023-04-28 13:42 ` Chuck Lever III
2023-04-28 13:47 ` Jason Gunthorpe
2023-04-28 13:58 ` Chuck Lever III
2023-04-28 14:03 ` Jason Gunthorpe
2023-05-03 8:35 ` Bernard Metzler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=29A9F2AE-ECF8-4EFC-B1EB-7B147FB17737@oracle.com \
--to=chuck.lever@oracle.com \
--cc=BMT@zurich.ibm.com \
--cc=cel@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox