summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorke ge - Sun Microsystems - Beijing China <Kevin.Ge@Sun.COM>2010-02-26 14:35:02 +0800
committerke ge - Sun Microsystems - Beijing China <Kevin.Ge@Sun.COM>2010-02-26 14:35:02 +0800
commit9469b38fa64cb68eac7cc7f4b7595b0de1fb77d6 (patch)
treefb67201cc7ad1a5acc23b97a166f09c787b241e3 /usr/src
parent6ba597c56d749c61b4f783157f63196d7b2445f0 (diff)
downloadillumos-gate-9469b38fa64cb68eac7cc7f4b7595b0de1fb77d6.tar.gz
6919407 no longer able to configure IPv6 for ibd with x86 systems
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/common/io/ib/clients/ibd/ibd.c19
-rw-r--r--usr/src/uts/common/sys/ib/clients/ibd/ibd.h12
2 files changed, 27 insertions, 4 deletions
diff --git a/usr/src/uts/common/io/ib/clients/ibd/ibd.c b/usr/src/uts/common/io/ib/clients/ibd/ibd.c
index d734527364..b3a39a2efc 100644
--- a/usr/src/uts/common/io/ib/clients/ibd/ibd.c
+++ b/usr/src/uts/common/io/ib/clients/ibd/ibd.c
@@ -4946,6 +4946,8 @@ ibd_start(ibd_state_t *state)
ibd_h2n_mac(&state->id_macaddr,
IBD_MAC_ADDR_RC + state->id_qpnum,
state->id_sgid.gid_prefix, state->id_sgid.gid_guid);
+ ibd_h2n_mac(&state->rc_macaddr_loopback, state->id_qpnum,
+ state->id_sgid.gid_prefix, state->id_sgid.gid_guid);
} else {
ibd_h2n_mac(&state->id_macaddr, state->id_qpnum,
state->id_sgid.gid_prefix, state->id_sgid.gid_guid);
@@ -6867,10 +6869,19 @@ ibd_process_rx(ibd_state_t *state, ibd_rwqe_t *rwqe, ibt_wc_t *wc)
phdr->ib_grh.ipoib_sqpn = htonl(wc->wc_qpn);
/* if it is loop back packet, just drop it. */
- if (bcmp(&phdr->ib_grh.ipoib_sqpn, &state->id_macaddr,
- IPOIB_ADDRL) == 0) {
- freemsg(mp);
- return (NULL);
+ if (state->id_enable_rc) {
+ if (bcmp(&phdr->ib_grh.ipoib_sqpn,
+ &state->rc_macaddr_loopback,
+ IPOIB_ADDRL) == 0) {
+ freemsg(mp);
+ return (NULL);
+ }
+ } else {
+ if (bcmp(&phdr->ib_grh.ipoib_sqpn, &state->id_macaddr,
+ IPOIB_ADDRL) == 0) {
+ freemsg(mp);
+ return (NULL);
+ }
}
ovbcopy(&phdr->ib_grh.ipoib_sqpn, &phdr->ib_src,
diff --git a/usr/src/uts/common/sys/ib/clients/ibd/ibd.h b/usr/src/uts/common/sys/ib/clients/ibd/ibd.h
index eaf2a66190..cb8bcc2e0d 100644
--- a/usr/src/uts/common/sys/ib/clients/ibd/ibd.h
+++ b/usr/src/uts/common/sys/ib/clients/ibd/ibd.h
@@ -818,6 +818,18 @@ typedef struct ibd_state_s {
int rc_mtu;
uint32_t rc_tx_max_sqseg;
+ /*
+ * In IPoIB over Reliable Connected mode, its mac address is added
+ * an "IBD_MAC_ADDR_RC" prefix. But for loopback filter in function
+ * ibd_process_rx(), the input mac address should not include the
+ * "IBD_MAC_ADDR_RC" prefix.
+ *
+ * So, we introduce the rc_macaddr_loopback for the loopback filter in
+ * IPoIB over Reliable Connected mode.
+ *
+ * rc_macaddr_loopback = id_macaddr excludes "IBD_MAC_ADDR_RC" prefix.
+ */
+ ipoib_mac_t rc_macaddr_loopback;
ibt_srv_hdl_t rc_listen_hdl;
ibt_sbind_hdl_t rc_listen_bind;