Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

IB/hfi1: Add support to receive 16B bypass packets

We introduce a struct hfi1_16b_header to support 16B headers.
16B bypass packets are received by the driver and processed
similar to 9B packets. Add basic support to handle 16B packets.

Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Don Hiatt <don.hiatt@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>

authored by

Don Hiatt and committed by
Doug Ledford
72c07e2b 13c19222

+274 -51
+6
drivers/infiniband/hw/hfi1/chip.c
··· 14468 14468 static void init_rxe(struct hfi1_devdata *dd) 14469 14469 { 14470 14470 struct rsm_map_table *rmt; 14471 + u64 val; 14471 14472 14472 14473 /* enable all receive errors */ 14473 14474 write_csr(dd, RCV_ERR_MASK, ~0ull); ··· 14493 14492 * (64 bytes). Max_Payload_Size is possibly modified upward in 14494 14493 * tune_pcie_caps() which is called after this routine. 14495 14494 */ 14495 + 14496 + /* Have 16 bytes (4DW) of bypass header available in header queue */ 14497 + val = read_csr(dd, RCV_BYPASS); 14498 + val |= (4ull << 16); 14499 + write_csr(dd, RCV_BYPASS, val); 14496 14500 } 14497 14501 14498 14502 static void init_other(struct hfi1_devdata *dd)
+1
drivers/infiniband/hw/hfi1/common.h
··· 327 327 /* misc. */ 328 328 #define SC15_PACKET 0xF 329 329 #define SIZE_OF_CRC 1 330 + #define SIZE_OF_LT 1 330 331 331 332 #define LIM_MGMT_P_KEY 0x7FFF 332 333 #define FULL_MGMT_P_KEY 0xFFFF
+112 -15
drivers/infiniband/hw/hfi1/driver.c
··· 237 237 return (struct ib_header *)hfi1_get_header(dd, rhf_addr); 238 238 } 239 239 240 + static inline struct hfi1_16b_header 241 + *hfi1_get_16B_header(struct hfi1_devdata *dd, 242 + __le32 *rhf_addr) 243 + { 244 + return (struct hfi1_16b_header *)hfi1_get_header(dd, rhf_addr); 245 + } 246 + 240 247 /* 241 248 * Validate and encode the a given RcvArray Buffer size. 242 249 * The function will check whether the given size falls within ··· 932 925 struct ib_header *hdr = hfi1_get_msgheader(packet->rcd->dd, 933 926 packet->rhf_addr); 934 927 sc = hfi1_9B_get_sc5(hdr, packet->rhf); 928 + } else if (etype == RHF_RCV_TYPE_BYPASS) { 929 + struct hfi1_16b_header *hdr = hfi1_get_16B_header( 930 + packet->rcd->dd, 931 + packet->rhf_addr); 932 + sc = hfi1_16B_get_sc(hdr); 935 933 } 936 934 if (sc != SC15_PACKET) { 937 935 int hwstate = driver_lstate(rcd->ppd); ··· 1398 1386 } 1399 1387 1400 1388 /* Query commonly used fields from packet header */ 1389 + packet->payload = packet->ebuf; 1401 1390 packet->opcode = ib_bth_get_opcode(packet->ohdr); 1402 1391 packet->slid = ib_get_slid(hdr); 1403 1392 packet->dlid = ib_get_dlid(hdr); 1393 + if (unlikely((packet->dlid >= be16_to_cpu(IB_MULTICAST_LID_BASE)) && 1394 + (packet->dlid != be16_to_cpu(IB_LID_PERMISSIVE)))) 1395 + packet->dlid += opa_get_mcast_base(OPA_MCAST_NR) - 1396 + be16_to_cpu(IB_MULTICAST_LID_BASE); 1404 1397 packet->sl = ib_get_sl(hdr); 1405 1398 packet->sc = hfi1_9B_get_sc5(hdr, packet->rhf); 1406 1399 packet->pad = ib_bth_get_pad(packet->ohdr); ··· 1415 1398 1416 1399 return 0; 1417 1400 drop: 1401 + ibp->rvp.n_pkt_drops++; 1402 + return -EINVAL; 1403 + } 1404 + 1405 + static int hfi1_setup_bypass_packet(struct hfi1_packet *packet) 1406 + { 1407 + /* 1408 + * Bypass packets have a different header/payload split 1409 + * compared to an IB packet. 1410 + * Current split is set such that 16 bytes of the actual 1411 + * header is in the header buffer and the remining is in 1412 + * the eager buffer. We chose 16 since hfi1 driver only 1413 + * supports 16B bypass packets and we will be able to 1414 + * receive the entire LRH with such a split. 1415 + */ 1416 + 1417 + struct hfi1_ctxtdata *rcd = packet->rcd; 1418 + struct hfi1_pportdata *ppd = rcd->ppd; 1419 + struct hfi1_ibport *ibp = &ppd->ibport_data; 1420 + u8 l4; 1421 + u8 grh_len; 1422 + 1423 + packet->hdr = (struct hfi1_16b_header *) 1424 + hfi1_get_16B_header(packet->rcd->dd, 1425 + packet->rhf_addr); 1426 + packet->hlen = (u8 *)packet->rhf_addr - (u8 *)packet->hdr; 1427 + 1428 + l4 = hfi1_16B_get_l4(packet->hdr); 1429 + if (l4 == OPA_16B_L4_IB_LOCAL) { 1430 + grh_len = 0; 1431 + packet->ohdr = packet->ebuf; 1432 + packet->grh = NULL; 1433 + } else if (l4 == OPA_16B_L4_IB_GLOBAL) { 1434 + u32 vtf; 1435 + 1436 + grh_len = sizeof(struct ib_grh); 1437 + packet->ohdr = packet->ebuf + grh_len; 1438 + packet->grh = packet->ebuf; 1439 + if (packet->grh->next_hdr != IB_GRH_NEXT_HDR) 1440 + goto drop; 1441 + vtf = be32_to_cpu(packet->grh->version_tclass_flow); 1442 + if ((vtf >> IB_GRH_VERSION_SHIFT) != IB_GRH_VERSION) 1443 + goto drop; 1444 + } else { 1445 + goto drop; 1446 + } 1447 + 1448 + /* Query commonly used fields from packet header */ 1449 + packet->opcode = ib_bth_get_opcode(packet->ohdr); 1450 + packet->hlen = hdr_len_by_opcode[packet->opcode] + 8 + grh_len; 1451 + packet->payload = packet->ebuf + packet->hlen - (4 * sizeof(u32)); 1452 + packet->slid = hfi1_16B_get_slid(packet->hdr); 1453 + packet->dlid = hfi1_16B_get_dlid(packet->hdr); 1454 + if (unlikely(hfi1_is_16B_mcast(packet->dlid))) 1455 + packet->dlid += opa_get_mcast_base(OPA_MCAST_NR) - 1456 + opa_get_lid(opa_get_mcast_base(OPA_MCAST_NR), 1457 + 16B); 1458 + packet->sc = hfi1_16B_get_sc(packet->hdr); 1459 + packet->sl = ibp->sc_to_sl[packet->sc]; 1460 + packet->pad = hfi1_16B_bth_get_pad(packet->ohdr); 1461 + packet->extra_byte = SIZE_OF_LT; 1462 + packet->fecn = hfi1_16B_get_fecn(packet->hdr); 1463 + packet->becn = hfi1_16B_get_becn(packet->hdr); 1464 + 1465 + return 0; 1466 + drop: 1467 + hfi1_cdbg(PKT, "%s: packet dropped\n", __func__); 1418 1468 ibp->rvp.n_pkt_drops++; 1419 1469 return -EINVAL; 1420 1470 } ··· 1548 1464 if (packet->rcd->is_vnic) 1549 1465 return true; 1550 1466 1551 - if ((HFI1_GET_L2_TYPE(packet->ebuf) == OPA_VNIC_L2_TYPE) && 1552 - (HFI1_GET_L4_TYPE(packet->ebuf) == OPA_VNIC_L4_ETHR)) 1467 + if ((hfi1_16B_get_l2(packet->ebuf) == OPA_16B_L2_TYPE) && 1468 + (hfi1_16B_get_l4(packet->ebuf) == OPA_16B_L4_ETHR)) 1553 1469 return true; 1554 1470 1555 1471 return false; ··· 1559 1475 { 1560 1476 struct hfi1_devdata *dd = packet->rcd->dd; 1561 1477 1562 - if (unlikely(rhf_err_flags(packet->rhf))) { 1563 - handle_eflags(packet); 1564 - } else if (hfi1_is_vnic_packet(packet)) { 1478 + if (hfi1_is_vnic_packet(packet)) { 1565 1479 hfi1_vnic_bypass_rcv(packet); 1566 1480 return RHF_RCV_CONTINUE; 1567 1481 } 1568 1482 1569 - dd_dev_err(dd, "Unsupported bypass packet. Dropping\n"); 1570 - incr_cntr64(&dd->sw_rcv_bypass_packet_errors); 1571 - if (!(dd->err_info_rcvport.status_and_code & OPA_EI_STATUS_SMASK)) { 1572 - u64 *flits = packet->ebuf; 1483 + if (hfi1_setup_bypass_packet(packet)) 1484 + return RHF_RCV_CONTINUE; 1573 1485 1574 - if (flits && !(packet->rhf & RHF_LEN_ERR)) { 1575 - dd->err_info_rcvport.packet_flit1 = flits[0]; 1576 - dd->err_info_rcvport.packet_flit2 = 1577 - packet->tlen > sizeof(flits[0]) ? flits[1] : 0; 1486 + if (unlikely(rhf_err_flags(packet->rhf))) { 1487 + handle_eflags(packet); 1488 + return RHF_RCV_CONTINUE; 1489 + } 1490 + 1491 + if (hfi1_16B_get_l2(packet->hdr) == 0x2) { 1492 + hfi1_16B_rcv(packet); 1493 + } else { 1494 + dd_dev_err(dd, 1495 + "Bypass packets other than 16B are not supported in normal operation. Dropping\n"); 1496 + incr_cntr64(&dd->sw_rcv_bypass_packet_errors); 1497 + if (!(dd->err_info_rcvport.status_and_code & 1498 + OPA_EI_STATUS_SMASK)) { 1499 + u64 *flits = packet->ebuf; 1500 + 1501 + if (flits && !(packet->rhf & RHF_LEN_ERR)) { 1502 + dd->err_info_rcvport.packet_flit1 = flits[0]; 1503 + dd->err_info_rcvport.packet_flit2 = 1504 + packet->tlen > sizeof(flits[0]) ? 1505 + flits[1] : 0; 1506 + } 1507 + dd->err_info_rcvport.status_and_code |= 1508 + (OPA_EI_STATUS_SMASK | BAD_L2_ERR); 1578 1509 } 1579 - dd->err_info_rcvport.status_and_code |= 1580 - (OPA_EI_STATUS_SMASK | BAD_L2_ERR); 1581 1510 } 1582 1511 return RHF_RCV_CONTINUE; 1583 1512 }
+127 -4
drivers/infiniband/hw/hfi1/hfi.h
··· 66 66 #include <linux/i2c.h> 67 67 #include <linux/i2c-algo-bit.h> 68 68 #include <rdma/ib_hdrs.h> 69 + #include <rdma/opa_addr.h> 69 70 #include <linux/rhashtable.h> 70 71 #include <linux/netdevice.h> 71 72 #include <rdma/rdma_vt.h> ··· 326 325 struct hfi1_packet { 327 326 void *ebuf; 328 327 void *hdr; 328 + void *payload; 329 329 struct hfi1_ctxtdata *rcd; 330 330 __le32 *rhf_addr; 331 331 struct rvt_qp *qp; ··· 352 350 bool becn; 353 351 bool fecn; 354 352 }; 353 + 354 + /* 355 + * OPA 16B Header 356 + */ 357 + #define OPA_16B_L4_MASK 0xFFull 358 + #define OPA_16B_SC_MASK 0x1F00000ull 359 + #define OPA_16B_SC_SHIFT 20 360 + #define OPA_16B_LID_MASK 0xFFFFFull 361 + #define OPA_16B_DLID_MASK 0xF000ull 362 + #define OPA_16B_DLID_SHIFT 20 363 + #define OPA_16B_DLID_HIGH_SHIFT 12 364 + #define OPA_16B_SLID_MASK 0xF00ull 365 + #define OPA_16B_SLID_SHIFT 20 366 + #define OPA_16B_SLID_HIGH_SHIFT 8 367 + #define OPA_16B_BECN_MASK 0x80000000ull 368 + #define OPA_16B_BECN_SHIFT 31 369 + #define OPA_16B_FECN_MASK 0x10000000ull 370 + #define OPA_16B_FECN_SHIFT 28 371 + #define OPA_16B_L2_MASK 0x60000000ull 372 + #define OPA_16B_L2_SHIFT 29 373 + 374 + /* 375 + * OPA 16B L2/L4 Encodings 376 + */ 377 + #define OPA_16B_L2_TYPE 0x02 378 + #define OPA_16B_L4_IB_LOCAL 0x09 379 + #define OPA_16B_L4_IB_GLOBAL 0x0A 380 + #define OPA_16B_L4_ETHR OPA_VNIC_L4_ETHR 381 + 382 + static inline u8 hfi1_16B_get_l4(struct hfi1_16b_header *hdr) 383 + { 384 + return (u8)(hdr->lrh[2] & OPA_16B_L4_MASK); 385 + } 386 + 387 + static inline u8 hfi1_16B_get_sc(struct hfi1_16b_header *hdr) 388 + { 389 + return (u8)((hdr->lrh[1] & OPA_16B_SC_MASK) >> OPA_16B_SC_SHIFT); 390 + } 391 + 392 + static inline u32 hfi1_16B_get_dlid(struct hfi1_16b_header *hdr) 393 + { 394 + return (u32)((hdr->lrh[1] & OPA_16B_LID_MASK) | 395 + (((hdr->lrh[2] & OPA_16B_DLID_MASK) >> 396 + OPA_16B_DLID_HIGH_SHIFT) << OPA_16B_DLID_SHIFT)); 397 + } 398 + 399 + static inline u32 hfi1_16B_get_slid(struct hfi1_16b_header *hdr) 400 + { 401 + return (u32)((hdr->lrh[0] & OPA_16B_LID_MASK) | 402 + (((hdr->lrh[2] & OPA_16B_SLID_MASK) >> 403 + OPA_16B_SLID_HIGH_SHIFT) << OPA_16B_SLID_SHIFT)); 404 + } 405 + 406 + static inline u8 hfi1_16B_get_becn(struct hfi1_16b_header *hdr) 407 + { 408 + return (u8)((hdr->lrh[0] & OPA_16B_BECN_MASK) >> OPA_16B_BECN_SHIFT); 409 + } 410 + 411 + static inline u8 hfi1_16B_get_fecn(struct hfi1_16b_header *hdr) 412 + { 413 + return (u8)((hdr->lrh[1] & OPA_16B_FECN_MASK) >> OPA_16B_FECN_SHIFT); 414 + } 415 + 416 + static inline u8 hfi1_16B_get_l2(struct hfi1_16b_header *hdr) 417 + { 418 + return (u8)((hdr->lrh[1] & OPA_16B_L2_MASK) >> OPA_16B_L2_SHIFT); 419 + } 420 + 421 + /* 422 + * BTH 423 + */ 424 + #define OPA_16B_BTH_PAD_MASK 7 425 + static inline u8 hfi1_16B_bth_get_pad(struct ib_other_headers *ohdr) 426 + { 427 + return (u8)((be32_to_cpu(ohdr->bth[0]) >> IB_BTH_PAD_SHIFT) & 428 + OPA_16B_BTH_PAD_MASK); 429 + } 355 430 356 431 struct rvt_sge_state; 357 432 ··· 2163 2084 2164 2085 /* 2165 2086 * hfi1_check_mcast- Check if the given lid is 2166 - * in the IB multicast range. 2087 + * in the OPA multicast range. 2088 + * 2089 + * The LID might either reside in ah.dlid or might be 2090 + * in the GRH of the address handle as DGID if extended 2091 + * addresses are in use. 2167 2092 */ 2168 - static inline bool hfi1_check_mcast(u16 lid) 2093 + static inline bool hfi1_check_mcast(u32 lid) 2169 2094 { 2170 - return ((lid >= be16_to_cpu(IB_MULTICAST_LID_BASE)) && 2171 - (lid != be16_to_cpu(IB_LID_PERMISSIVE))); 2095 + return ((lid >= opa_get_mcast_base(OPA_MCAST_NR)) && 2096 + (lid != be32_to_cpu(OPA_LID_PERMISSIVE))); 2097 + } 2098 + 2099 + #define opa_get_lid(lid, format) \ 2100 + __opa_get_lid(lid, OPA_PORT_PACKET_FORMAT_##format) 2101 + 2102 + /* Convert a lid to a specific lid space */ 2103 + static inline u32 __opa_get_lid(u32 lid, u8 format) 2104 + { 2105 + bool is_mcast = hfi1_check_mcast(lid); 2106 + 2107 + switch (format) { 2108 + case OPA_PORT_PACKET_FORMAT_8B: 2109 + case OPA_PORT_PACKET_FORMAT_10B: 2110 + if (is_mcast) 2111 + return (lid - opa_get_mcast_base(OPA_MCAST_NR) + 2112 + 0xF0000); 2113 + return lid & 0xFFFFF; 2114 + case OPA_PORT_PACKET_FORMAT_16B: 2115 + if (is_mcast) 2116 + return (lid - opa_get_mcast_base(OPA_MCAST_NR) + 2117 + 0xF00000); 2118 + return lid & 0xFFFFFF; 2119 + case OPA_PORT_PACKET_FORMAT_9B: 2120 + if (is_mcast) 2121 + return (lid - 2122 + opa_get_mcast_base(OPA_MCAST_NR) + 2123 + be16_to_cpu(IB_MULTICAST_LID_BASE)); 2124 + else 2125 + return lid & 0xFFFF; 2126 + default: 2127 + return lid; 2128 + } 2129 + } 2130 + 2131 + /* Return true if the given lid is the OPA 16B multicast range */ 2132 + static inline bool hfi1_is_16B_mcast(u32 lid) 2133 + { 2134 + return ((lid >= 2135 + opa_get_lid(opa_get_mcast_base(OPA_MCAST_NR), 16B)) && 2136 + (lid != opa_get_lid(be32_to_cpu(OPA_LID_PERMISSIVE), 16B))); 2172 2137 } 2173 2138 #endif /* _HFI1_KERNEL_H */
+1 -1
drivers/infiniband/hw/hfi1/rc.c
··· 1916 1916 void hfi1_rc_rcv(struct hfi1_packet *packet) 1917 1917 { 1918 1918 struct hfi1_ctxtdata *rcd = packet->rcd; 1919 - void *data = packet->ebuf; 1919 + void *data = packet->payload; 1920 1920 u32 tlen = packet->tlen; 1921 1921 struct rvt_qp *qp = packet->qp; 1922 1922 struct hfi1_ibport *ibp = rcd_to_iport(rcd);
+1 -1
drivers/infiniband/hw/hfi1/uc.c
··· 297 297 void hfi1_uc_rcv(struct hfi1_packet *packet) 298 298 { 299 299 struct hfi1_ibport *ibp = rcd_to_iport(packet->rcd); 300 - void *data = packet->ebuf; 300 + void *data = packet->payload; 301 301 u32 tlen = packet->tlen; 302 302 struct rvt_qp *qp = packet->qp; 303 303 struct ib_other_headers *ohdr = packet->ohdr;
+1 -3
drivers/infiniband/hw/hfi1/ud.c
··· 667 667 struct hfi1_ibport *ibp = rcd_to_iport(packet->rcd); 668 668 struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); 669 669 struct ib_header *hdr = packet->hdr; 670 - void *data = packet->ebuf; 670 + void *data = packet->payload; 671 671 u32 tlen = packet->tlen; 672 672 struct rvt_qp *qp = packet->qp; 673 673 u8 sc5 = hfi1_9B_get_sc5(hdr, packet->rhf); 674 - u32 bth1; 675 674 u8 sl_from_sc; 676 675 u8 extra_bytes = packet->pad; 677 676 u8 opcode = packet->opcode; ··· 678 679 u32 dlid = packet->dlid; 679 680 u32 slid = packet->slid; 680 681 681 - bth1 = be32_to_cpu(ohdr->bth[1]); 682 682 qkey = ib_get_qkey(ohdr); 683 683 src_qp = ib_get_sqpn(ohdr); 684 684 pkey = ib_bth_get_pkey(ohdr);
+10 -7
drivers/infiniband/hw/hfi1/verbs.c
··· 571 571 goto drop; 572 572 mcast = rvt_mcast_find(&ibp->rvp, 573 573 &packet->grh->dgid, 574 - packet->dlid); 574 + opa_get_lid(packet->dlid, 9B)); 575 575 if (!mcast) 576 576 goto drop; 577 577 list_for_each_entry_rcu(p, &mcast->qp_list, list) { ··· 627 627 void hfi1_ib_rcv(struct hfi1_packet *packet) 628 628 { 629 629 struct hfi1_ctxtdata *rcd = packet->rcd; 630 - bool is_mcast = false; 631 630 632 - if (unlikely(hfi1_check_mcast(packet->dlid))) 633 - is_mcast = true; 631 + trace_input_ibhdr(rcd->dd, packet, !!(rhf_dc_info(packet->rhf))); 632 + hfi1_handle_packet(packet, hfi1_check_mcast(packet->dlid)); 633 + } 634 634 635 - trace_input_ibhdr(rcd->dd, packet, 636 - !!(packet->rhf & RHF_DC_INFO_SMASK)); 637 - hfi1_handle_packet(packet, is_mcast); 635 + void hfi1_16B_rcv(struct hfi1_packet *packet) 636 + { 637 + struct hfi1_ctxtdata *rcd = packet->rcd; 638 + 639 + trace_input_ibhdr(rcd->dd, packet, false); 640 + hfi1_handle_packet(packet, hfi1_check_mcast(packet->dlid)); 638 641 } 639 642 640 643 /*
+13
drivers/infiniband/hw/hfi1/verbs.h
··· 104 104 HFI1_HAS_GRH = (1 << 0), 105 105 }; 106 106 107 + struct hfi1_16b_header { 108 + u32 lrh[4]; 109 + union { 110 + struct { 111 + struct ib_grh grh; 112 + struct ib_other_headers oth; 113 + } l; 114 + struct ib_other_headers oth; 115 + } u; 116 + } __packed; 117 + 107 118 struct hfi1_ahg_info { 108 119 u32 ahgdesc[2]; 109 120 u16 tx_flags; ··· 388 377 void hfi1_unregister_ib_device(struct hfi1_devdata *); 389 378 390 379 void hfi1_ib_rcv(struct hfi1_packet *packet); 380 + 381 + void hfi1_16B_rcv(struct hfi1_packet *packet); 391 382 392 383 unsigned hfi1_get_npkeys(struct hfi1_devdata *); 393 384
-15
drivers/infiniband/hw/hfi1/vnic.h
··· 54 54 #define HFI1_VNIC_MAX_TXQ 16 55 55 #define HFI1_VNIC_MAX_PAD 12 56 56 57 - /* L2 header definitions */ 58 - #define HFI1_L2_TYPE_OFFSET 0x7 59 - #define HFI1_L2_TYPE_SHFT 0x5 60 - #define HFI1_L2_TYPE_MASK 0x3 61 - 62 - #define HFI1_GET_L2_TYPE(hdr) \ 63 - ((*((u8 *)(hdr) + HFI1_L2_TYPE_OFFSET) >> HFI1_L2_TYPE_SHFT) & \ 64 - HFI1_L2_TYPE_MASK) 65 - 66 - /* L4 type definitions */ 67 - #define HFI1_L4_TYPE_OFFSET 8 68 - 69 - #define HFI1_GET_L4_TYPE(data) \ 70 - (*((u8 *)(data) + HFI1_L4_TYPE_OFFSET)) 71 - 72 57 /* L4 header definitions */ 73 58 #define HFI1_VNIC_L4_HDR_OFFSET OPA_VNIC_L2_HDR_LEN 74 59
+2 -2
drivers/infiniband/hw/hfi1/vnic_main.c
··· 564 564 int l4_type, vesw_id = -1; 565 565 u8 q_idx; 566 566 567 - l4_type = HFI1_GET_L4_TYPE(packet->ebuf); 568 - if (likely(l4_type == OPA_VNIC_L4_ETHR)) { 567 + l4_type = hfi1_16B_get_l4(packet->ebuf); 568 + if (likely(l4_type == OPA_16B_L4_ETHR)) { 569 569 vesw_id = HFI1_VNIC_GET_VESWID(packet->ebuf); 570 570 vinfo = idr_find(&dd->vnic.vesw_idr, vesw_id); 571 571
-3
include/rdma/opa_vnic.h
··· 54 54 55 55 #include <rdma/ib_verbs.h> 56 56 57 - /* VNIC uses 16B header format */ 58 - #define OPA_VNIC_L2_TYPE 0x2 59 - 60 57 /* 16 header bytes + 2 reserved bytes */ 61 58 #define OPA_VNIC_L2_HDR_LEN (16 + 2) 62 59