History

IB/mlx4: Don't set VLAN in IBoE WQEs' control segment

There's no need to set the vlan-related fields in an IBoE send WQE control segment: - the vlan to be used by a UD QP is set in the datagram segment. - for GSI (CM) QP, all the headers down to 8021q and MAC are built by the software anyway.

Or Gerlitz committed 15 years ago

Commit 80a2dcd1 parent bcacb891 file · +2 −9Browse files

Unified · Split

drivers/infiniband/hw/mlx4/qp.c+2−9
@@ -1547,14 +1547,13 @@ static void set_masked_atomic_seg(struct mlx4_wqe_masked_atomic_seg *aseg, · 1546 unmodified lines
15471547 }
15481548
15491549 static void set_datagram_seg(struct mlx4_wqe_datagram_seg *dseg,
1550− struct ib_send_wr *wr, __be16 *vlan)
1550+ struct ib_send_wr *wr)
15511551 {
15521552 memcpy(dseg->av, &to_mah(wr->wr.ud.ah)->av, sizeof (struct mlx4_av));
15531553 dseg->dqpn = cpu_to_be32(wr->wr.ud.remote_qpn);
15541554 dseg->qkey = cpu_to_be32(wr->wr.ud.remote_qkey);
15551555 dseg->vlan = to_mah(wr->wr.ud.ah)->av.eth.vlan;
15561556 memcpy(dseg->mac, to_mah(wr->wr.ud.ah)->av.eth.mac, 6);
1557− *vlan = dseg->vlan;
15581557 }
15591558
15601559 static void set_mlx_icrc_seg(void *dseg)
@@ -1657,7 +1656,6 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, · 96 unmodified lines
16571656 __be32 uninitialized_var(lso_hdr_sz);
16581657 __be32 blh;
16591658 int i;
1660− __be16 vlan = cpu_to_be16(0xffff);
16611659
16621660 spin_lock_irqsave(&qp->sq.lock, flags);
16631661
@@ -1761,7 +1759,7 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, · 97 unmodified lines
17611759 break;
17621760
17631761 case IB_QPT_UD:
1764− set_datagram_seg(wqe, wr, &vlan);
1762+ set_datagram_seg(wqe, wr);
17651763 wqe += sizeof (struct mlx4_wqe_datagram_seg);
17661764 size += sizeof (struct mlx4_wqe_datagram_seg) / 16;
17671765
@@ -1824,11 +1822,6 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, · 56 unmodified lines
18241822 ctrl->fence_size = (wr->send_flags & IB_SEND_FENCE ?
18251823 MLX4_WQE_CTRL_FENCE : 0) | size;
18261824
1827− if (be16_to_cpu(vlan) < 0x1000) {
1828− ctrl->ins_vlan = 1 << 6;
1829− ctrl->vlan_tag = vlan;
1830− }
1831−
18321825 /*
18331826 * Make sure descriptor is fully written before
18341827 * setting ownership bit (because HW can start

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t