From patchwork Wed Feb 6 09:32:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10798911 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C953913B4 for ; Wed, 6 Feb 2019 09:32:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B7B072ABD8 for ; Wed, 6 Feb 2019 09:32:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AB8112ABDC; Wed, 6 Feb 2019 09:32:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 842612ABDF for ; Wed, 6 Feb 2019 09:32:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726657AbfBFJcY (ORCPT ); Wed, 6 Feb 2019 04:32:24 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:40424 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726715AbfBFJcY (ORCPT ); Wed, 6 Feb 2019 04:32:24 -0500 Received: by mail-wm1-f66.google.com with SMTP id q21so1831629wmc.5 for ; Wed, 06 Feb 2019 01:32:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PBIw/Uonu5xcR2pA9eH9HsR2o6OO6E7dtFlEmDaaEwU=; b=hhF5T+cbJFLJvQZEu3ROs/VJmFVGp0E/yTkBlK4UR/xYPjWwUv9CNxlbjg8s2IsQ++ QEkDAYKwvMlG5FjKlhSDVKa7wXsuWOLkoyKWsD9rcLgpN8KPsm1p4flHN1or1MvPnS+Q L5N4Jqmpkquqa+/FAU+NL1Jv/6Z91AgHfO322A7mj3wmvjTBLQBO2wB7GgPLSMd4L7GZ avljHH82RdfN7kkeaijYNA4Cx0YvPvWRXPBfRQi2aTi0T/I6WQ63Sgs0GXvVm6DV934/ nj+RqVFIWeN60ktfFrRjinmEgRCexzzLIJ5k0TxVdvX/8vc1dk867xJoYUzUVLnCCL3X pcPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PBIw/Uonu5xcR2pA9eH9HsR2o6OO6E7dtFlEmDaaEwU=; b=RWiJaL1120qAjyJuytRVa0z3ItL7fxkK09yA/G1CEAEN2c1KguOZDmOJmhoI7O8Jzv eP5gsvQO7A2vU5YDHovOc4BIZS/5fGLgnbfYk/8QF5spyuyMnwccdkoTVAxWtXj98ZNf 5fnwXbImqfHqjN/z8KwbbfzbNtl31NlrZ0vj3GFryxagi05i6WipptHUB1jaJvK2TkIj VoK2bAoTcGnEaCWOWxqCOUxQiVTiulghoJ/uNfYdigcQ4jBarRWOJGq/yoLszTHk071z 5CMLWsXZjjZRREXEmIqpan2aVRPm5You/T9cdEoqsfM/riWggLKmScU/5MBkpZgswrMd ggOg== X-Gm-Message-State: AHQUAuZBKM4/moTZXON8sYnzVLKW1Tn7eK8paYV852VG5nvAEtKWXW08 ciX+bnKwbDrv6COuklqW0SA1Oq9d X-Google-Smtp-Source: AHgI3IYT5apFaVdk+OUOy+qBww+BFh8Ow/4WWjEr5wTJuU5g6qeStWbjNvlMjnbJcQp0GObM9GCOvw== X-Received: by 2002:a7b:c156:: with SMTP id z22mr2346341wmi.24.1549445542323; Wed, 06 Feb 2019 01:32:22 -0800 (PST) Received: from kheib-workstation.redhat.com ([192.116.94.216]) by smtp.gmail.com with ESMTPSA id z5sm1783556wmi.15.2019.02.06.01.32.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Feb 2019 01:32:21 -0800 (PST) From: Kamal Heib To: linux-rdma@vger.kernel.org Cc: Yuval Shaia , Marcel Apfelbaum , Kamal Heib Subject: [PATCH rdma-core 1/3] Update kernel headers Date: Wed, 6 Feb 2019 11:32:03 +0200 Message-Id: <20190206093205.7667-2-kamalheib1@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190206093205.7667-1-kamalheib1@gmail.com> References: <20190206093205.7667-1-kamalheib1@gmail.com> MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP To commit 668aa15b5bf8 ("RDMA/rxe: Improve loopback marking") Signed-off-by: Kamal Heib --- kernel-headers/rdma/ib_user_verbs.h | 2 ++ kernel-headers/rdma/rdma_user_rxe.h | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel-headers/rdma/ib_user_verbs.h b/kernel-headers/rdma/ib_user_verbs.h index 480d9a60b68e..0474c7400268 100644 --- a/kernel-headers/rdma/ib_user_verbs.h +++ b/kernel-headers/rdma/ib_user_verbs.h @@ -270,6 +270,8 @@ struct ib_uverbs_ex_query_device_resp { struct ib_uverbs_tm_caps tm_caps; struct ib_uverbs_cq_moderation_caps cq_moderation_caps; __aligned_u64 max_dm_size; + __u32 xrc_odp_caps; + __u32 reserved; }; struct ib_uverbs_query_port { diff --git a/kernel-headers/rdma/rdma_user_rxe.h b/kernel-headers/rdma/rdma_user_rxe.h index 44ef6a3b7afc..aae2e696bb38 100644 --- a/kernel-headers/rdma/rdma_user_rxe.h +++ b/kernel-headers/rdma/rdma_user_rxe.h @@ -58,8 +58,7 @@ struct rxe_global_route { struct rxe_av { __u8 port_num; __u8 network_type; - __u16 reserved1; - __u32 reserved2; + __u8 dmac[6]; struct rxe_global_route grh; union { struct sockaddr_in _sockaddr_in; From patchwork Wed Feb 6 09:32:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10798913 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 932EA13B4 for ; Wed, 6 Feb 2019 09:32:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81A7B2ABDC for ; Wed, 6 Feb 2019 09:32:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 761142ABDF; Wed, 6 Feb 2019 09:32:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1AA322ABDC for ; Wed, 6 Feb 2019 09:32:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728277AbfBFJc0 (ORCPT ); Wed, 6 Feb 2019 04:32:26 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:39436 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726715AbfBFJc0 (ORCPT ); Wed, 6 Feb 2019 04:32:26 -0500 Received: by mail-wr1-f67.google.com with SMTP id t27so6707979wra.6 for ; Wed, 06 Feb 2019 01:32:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OH5ECQP1uGTO8qMhBj2xtT7cU7PgdeTIQIJZwVW9ldM=; b=uM2T0snXE8cg/lHozQmDDzZ255Do983+W8mruD+FnWh4AOool2nTTcKqNPmJvHvHo6 xy8wBPkn4WKejYisEpYspJ7YNaO2b2RNyh/c3aZ5JOGwQSJ2+rY2R+SgNIPBCO2Ve3y6 FQ+Z9Z/Dpae9kCQUpNrKB9mYg4OZj1UyIwnN5pWTQZXxaDWRy/ZhNPkZ5mF7ogMMy4+1 1wAmhlg1LsVNVzJ2IhJZwhrdxf8B0tD76qbP6JS5la4jZme3Xw7axxsTXXm0oHiqAZZT l86OE+yMOukqnA9tfWdR8ihD/Al5UkVL62hXsc0pXst2rOjAPG4yAUPHw0/+zFS6R1YB QYmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OH5ECQP1uGTO8qMhBj2xtT7cU7PgdeTIQIJZwVW9ldM=; b=pM18AILtz8lEjKFbpyNYFapQz6xjFnxD3uNmcb6Zj7jjH0ZdrYYRocP2voUpTDzmke 7lwNbV8BmqVrEf1O+TWh2BV1l6tLe9liFzD2nHZpg5HdQFknzRF2gTodjiAf5jO9nyu2 sgxD2oHVXwdoiRA6pA5bkb2SKw55M4deYHX+75Vy4rBwYRJjDAnke68mu3IPwP/ivuzu +VLzpt8nxONynec/fttRkYZI/UOa+l2fZ1Ndj9sPSKOHopmQZcsIyIQ4fHUSpl0hBwlT c+uJ8ZdfvUJT8UFsFEavzDieb6ZH35OvWI4AayvO/K0qVxHGRRMYgVfYPCyDBDfPIf3D RNmw== X-Gm-Message-State: AHQUAubXcv0zcd1eQWoyB9AM3k3S8vBqNxCgGhaNywh8nWdOGBh3wTRa 0Doxq83u/7+nSH4ZJC5981zTtsxN X-Google-Smtp-Source: AHgI3IYCKg9wG0PfQ4vb37pIOXQ2OIT1l6K3Qcl2DXgeeK7sFJKnpgYbNUoA98S9TT6p+zagv+oXGw== X-Received: by 2002:a5d:4546:: with SMTP id p6mr6992164wrr.35.1549445544351; Wed, 06 Feb 2019 01:32:24 -0800 (PST) Received: from kheib-workstation.redhat.com ([192.116.94.216]) by smtp.gmail.com with ESMTPSA id z5sm1783556wmi.15.2019.02.06.01.32.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Feb 2019 01:32:23 -0800 (PST) From: Kamal Heib To: linux-rdma@vger.kernel.org Cc: Yuval Shaia , Marcel Apfelbaum , Kamal Heib Subject: [PATCH rdma-core 2/3] verbs: Allow passing NULL vid for ibv_resolve_eth_l2_from_gid() Date: Wed, 6 Feb 2019 11:32:04 +0200 Message-Id: <20190206093205.7667-3-kamalheib1@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190206093205.7667-1-kamalheib1@gmail.com> References: <20190206093205.7667-1-kamalheib1@gmail.com> MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Simplify callers for ibv_resolve_eth_l2_from_gid() by let them pass NULL vid, in case that they aren't interested in it. Signed-off-by: Kamal Heib --- libibverbs/verbs.c | 11 +++++++---- providers/mlx5/verbs.c | 4 +--- providers/vmw_pvrdma/verbs.c | 3 +-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libibverbs/verbs.c b/libibverbs/verbs.c index 9cdc361b5610..188bccbaf860 100644 --- a/libibverbs/verbs.c +++ b/libibverbs/verbs.c @@ -1021,10 +1021,12 @@ int ibv_resolve_eth_l2_from_gid(struct ibv_context *context, if (process_get_neigh(&neigh_handler)) goto free_resources; - ret_vid = neigh_get_vlan_id_from_dev(&neigh_handler); + if (vid) { + ret_vid = neigh_get_vlan_id_from_dev(&neigh_handler); - if (ret_vid <= 0xfff) - neigh_set_vlan_id(&neigh_handler, ret_vid); + if (ret_vid <= 0xfff) + neigh_set_vlan_id(&neigh_handler, ret_vid); + } /* We are using only Ethernet here */ ether_len = neigh_get_ll(&neigh_handler, @@ -1034,7 +1036,8 @@ int ibv_resolve_eth_l2_from_gid(struct ibv_context *context, if (ether_len <= 0) goto free_resources; - *vid = ret_vid; + if (vid) + *vid = ret_vid; ret = 0; diff --git a/providers/mlx5/verbs.c b/providers/mlx5/verbs.c index 7a655a174f7b..930d6cd3cc2d 100644 --- a/providers/mlx5/verbs.c +++ b/providers/mlx5/verbs.c @@ -2454,10 +2454,8 @@ struct ibv_ah *mlx5_create_ah(struct ibv_pd *pd, struct ibv_ah_attr *attr) ah->kern_ah = true; memcpy(ah->av.rmac, resp.dmac, ETHERNET_LL_SIZE); } else { - uint16_t vid; - if (ibv_resolve_eth_l2_from_gid(pd->context, attr, - ah->av.rmac, &vid)) + ah->av.rmac, NULL)) goto err; } } diff --git a/providers/vmw_pvrdma/verbs.c b/providers/vmw_pvrdma/verbs.c index b9819390ba8d..e27952bff1bb 100644 --- a/providers/vmw_pvrdma/verbs.c +++ b/providers/vmw_pvrdma/verbs.c @@ -190,7 +190,6 @@ struct ibv_ah *pvrdma_create_ah(struct ibv_pd *pd, struct pvrdma_ah *ah; struct pvrdma_av *av; struct ibv_port_attr port_attr; - uint16_t vlan_id; if (!attr->is_global) return NULL; @@ -224,7 +223,7 @@ struct ibv_ah *pvrdma_create_ah(struct ibv_pd *pd, if (port_attr.port_cap_flags & IBV_PORT_IP_BASED_GIDS) { if (!ibv_resolve_eth_l2_from_gid(pd->context, attr, - av->dmac, &vlan_id)) + av->dmac, NULL)) return &ah->ibv_ah; } else { if (!set_mac_from_gid(&attr->grh.dgid, av->dmac)) From patchwork Wed Feb 6 09:32:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10798915 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2A48113B4 for ; Wed, 6 Feb 2019 09:32:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 193352ABDC for ; Wed, 6 Feb 2019 09:32:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0DAE02ABDF; Wed, 6 Feb 2019 09:32:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A3EEA2ABDC for ; Wed, 6 Feb 2019 09:32:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728654AbfBFJc2 (ORCPT ); Wed, 6 Feb 2019 04:32:28 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:40282 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726715AbfBFJc1 (ORCPT ); Wed, 6 Feb 2019 04:32:27 -0500 Received: by mail-wr1-f68.google.com with SMTP id p4so6709558wrt.7 for ; Wed, 06 Feb 2019 01:32:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=d2qOwEz4utoafjPvr9slPu2GU20vkfVj6TzDnHiGhJw=; b=JvTbxnrleYTcU5pmGXCAOMd/GWOOp9Li+foYfMZ7H+YAU8laLPpyF2TEB3Peh+LLPV tkyP4VvwX9U38CzFpaupJrUHOyaCfuiFPSnDdaHqfu9gMKEMNO0F1IqbBYaEm5cWe0I5 xU3Bs4TpTE/n0eKd4PfFwcX+WDz8AVjGwqGnzYX8ms05IZPLXQ+HqnjYNGAn2L+vphji PWPbTRafguqeo6RUZuPv11GhK5NDCQwxhDGsMYPxSokVS8bgW6+hxBpTKa/IAP4ihiB1 NbU2KgpnopMJI9rRukYvycYueWM2TYG1Dhb747WciZ/WryxK8PQEcrboLiZjYw7Jf4vv TYAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=d2qOwEz4utoafjPvr9slPu2GU20vkfVj6TzDnHiGhJw=; b=OPF8UcqBo/+IjcVYyoVG0e+OylN+fxpHnYKdRQzPxD0YYoxTCbvzRUPD+QGKbm9aYz 7uScHyLPMVrw4nr5AXcge7I39rogbi4lHVc/2ucg4GNcx96A9viEesOOzBcC0Hc2IlP2 faKTeIJ2Q7HORMVDQ8BEfhEJLdRLbjG1KU8NojLWBHLXTEh/qGyE1LAT6F3LZ+6gusoA k3d9nlpHzEuHu2bvzc85ycaM5+ianhq9XZqlfLWKM1+suNwWGGc6i1JmrQB/toZs5aTR D5/MyDcFQogcVEDpawSl06x/zpFN91hdb41a4KPCIn8Hni0e4VdHmnv6MZREBfyT8JxK dTHw== X-Gm-Message-State: AHQUAua2FNwsQVwvSMgdZzvJiGQXicS06SYUF7V9vccjj8PabDCDPwKl xcwzrNh38gWgzhnQ8pXzvsHhFo/c X-Google-Smtp-Source: AHgI3IaezjcLimXahnzqt/TqEq5Zt9xOUtwQchxYo1omqK5x+osbWxsCTJ6KOpNS4UGXQzK0DB0jPA== X-Received: by 2002:a5d:614c:: with SMTP id y12mr4571130wrt.106.1549445545692; Wed, 06 Feb 2019 01:32:25 -0800 (PST) Received: from kheib-workstation.redhat.com ([192.116.94.216]) by smtp.gmail.com with ESMTPSA id z5sm1783556wmi.15.2019.02.06.01.32.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Feb 2019 01:32:25 -0800 (PST) From: Kamal Heib To: linux-rdma@vger.kernel.org Cc: Yuval Shaia , Marcel Apfelbaum , Kamal Heib Subject: [PATCH rdma-core 3/3] rxe: Resolve destination MAC address when creating AH Date: Wed, 6 Feb 2019 11:32:05 +0200 Message-Id: <20190206093205.7667-4-kamalheib1@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190206093205.7667-1-kamalheib1@gmail.com> References: <20190206093205.7667-1-kamalheib1@gmail.com> MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add support for resolving the destination MAC address when creating the AH. The dmac will be used by the driver to mark loopback packets if the dmac and the smac are equal. Signed-off-by: Kamal Heib --- providers/rxe/rxe.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/providers/rxe/rxe.c b/providers/rxe/rxe.c index 857ea0981321..4c21a4a44451 100644 --- a/providers/rxe/rxe.c +++ b/providers/rxe/rxe.c @@ -802,6 +802,10 @@ static struct ibv_ah *rxe_create_ah(struct ibv_pd *pd, struct ibv_ah_attr *attr) rdma_gid2ip(&av->sgid_addr, &sgid); rdma_gid2ip(&av->dgid_addr, &attr->grh.dgid); + if (ibv_resolve_eth_l2_from_gid(pd->context, attr, av->dmac, NULL)) { + free(ah); + return NULL; + } memset(&resp, 0, sizeof(resp)); if (ibv_cmd_create_ah(pd, &ah->ibv_ah, attr, &resp, sizeof(resp))) {