The Infiniband specification (volume 1, section 11.4.1.2 "Post Receive Request") notes that for UD QPs, the GRH will be placed in the first 40 bytes of the receive buffer if present. (If no GRH is present, which is normal, then the first 40 bytes of the receive buffer will be unused.) Mellanox hardware performs this placement automatically: other headers will be stripped (and their values returned via the CQE), but the first 40 bytes of the data buffer will be consumed by the (probably non-existent) GRH. This does not fit neatly into iPXE's internal abstraction, which expects the data buffer to represent just the data payload with the addresses from the GRH (if present) passed as additional parameters to ib_complete_recv(). The end result of this discrepancy is that attempts to receive full-sized 2048-byte IPoIB packets on Mellanox hardware will fail. Fix by allocating a separate ring buffer to hold the received GRHs. Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
|
||
1111 |
|
1111 |
|
1112 |
|
1112 |
|
1113 |
|
1113 |
|
|
1114 |
|
|
|
1115 |
|
|
1114 |
|
1116 |
|
1115 |
|
1117 |
|
1116 |
|
1118 |
|
|
|
||
1147 |
|
1149 |
|
1148 |
|
1150 |
|
1149 |
|
1151 |
|
|
1152 |
|
|
|
1153 |
|
|
|
1154 |
|
|
|
1155 |
|
|
|
1156 |
|
|
1150 |
|
1157 |
|
1151 |
|
|
|
|
1158 |
|
|
|
1159 |
|
|
1152 |
|
1160 |
|
1153 |
|
1161 |
|
1154 |
|
1162 |
|
|
|
||
1156 |
|
1164 |
|
1157 |
|
1165 |
|
1158 |
|
1166 |
|
1159 |
|
|
|
1160 |
|
1167 |
|
|
1168 |
|
|
|
1169 |
|
|
|
1170 |
|
|
|
1171 |
|
|
|
1172 |
|
|
|
1173 |
|
|
|
1174 |
|
|
|
1175 |
|
|
1161 |
|
1176 |
|
|
1177 |
|
|
|
1178 |
|
|
|
1179 |
|
|
|
1180 |
|
|
|
1181 |
|
|
1162 |
|
1182 |
|
1163 |
|
1183 |
|
1164 |
|
1184 |
|
|
|
||
1633 |
|
1653 |
|
1634 |
|
1654 |
|
1635 |
|
1655 |
|
|
1656 |
|
|
|
1657 |
|
|
1636 |
|
1658 |
|
1637 |
|
1659 |
|
1638 |
|
1660 |
|
|
|
||
1646 |
|
1668 |
|
1647 |
|
1669 |
|
1648 |
|
1670 |
|
1649 |
|
|
|
1650 |
|
|
|
1651 |
|
|
|
1652 |
|
|
|
1653 |
|
|
|
1654 |
|
|
|
|
1671 |
|
|
|
1672 |
|
|
|
1673 |
|
|
|
1674 |
|
|
|
1675 |
|
|
|
1676 |
|
|
|
1677 |
|
|
|
1678 |
|
|
|
1679 |
|
|
|
1680 |
|
|
|
1681 |
|
|
|
1682 |
|
|
|
1683 |
|
|
1655 |
|
1684 |
|
1656 |
|
1685 |
|
1657 |
|
1686 |
|
|
|
||
1676 |
|
1705 |
|
1677 |
|
1706 |
|
1678 |
|
1707 |
|
|
1708 |
|
|
1679 |
|
1709 |
|
1680 |
|
1710 |
|
1681 |
|
1711 |
|
|
|
||
1713 |
|
1743 |
|
1714 |
|
1744 |
|
1715 |
|
1745 |
|
|
1746 |
|
|
1716 |
|
1747 |
|
1717 |
|
1748 |
|
1718 |
|
1749 |
|
|
|
||
1747 |
|
1778 |
|
1748 |
|
1779 |
|
1749 |
|
1780 |
|
1750 |
|
|
|
1751 |
|
|
|
1752 |
|
|
|
|
1781 |
|
|
|
1782 |
|
|
|
1783 |
|
|
1753 |
|
1784 |
|
1754 |
|
1785 |
|
1755 |
|
1786 |
|
|
|
||
515 |
|
515 |
|
516 |
|
516 |
|
517 |
|
517 |
|
518 |
|
|
|
|
518 |
|
|
519 |
|
519 |
|
520 |
|
520 |
|
521 |
|
521 |
|
|
|
||
686 |
|
686 |
|
687 |
|
687 |
|
688 |
|
688 |
|
|
689 |
|
|
|
690 |
|
|
|
691 |
|
|
|
692 |
|
|
689 |
|
693 |
|
690 |
|
694 |
|
691 |
|
695 |
|