Skip to content

Commit

Permalink
IB/rxe: support for 802.1q VLAN on the listener
Browse files Browse the repository at this point in the history
Set the vlan flag and vlan_id field in the wc for rdma_listen()
to work over VLAN. This is required by ib_init_ah_attr_from_wc()
which is called by the CM REQ handler.

Signed-off-by: Vijay Immanuel <vijayi@attalasystems.com>
Reviewed-by: Yonatan Cohen <yonatanc@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
  • Loading branch information
Vijay Immanuel authored and Jason Gunthorpe committed Jun 18, 2018
1 parent 6a965ee commit 92cf36e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/infiniband/sw/rxe/rxe_resp.c
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,11 @@ static enum resp_states do_complete(struct rxe_qp *qp,
else
wc->network_hdr_type = RDMA_NETWORK_IPV6;

if (is_vlan_dev(skb->dev)) {
wc->wc_flags |= IB_WC_WITH_VLAN;
wc->vlan_id = vlan_dev_vlan_id(skb->dev);
}

if (pkt->mask & RXE_IMMDT_MASK) {
wc->wc_flags |= IB_WC_WITH_IMM;
wc->ex.imm_data = immdt_imm(pkt);
Expand Down

0 comments on commit 92cf36e

Please sign in to comment.