Lines 1481-1509
Link Here
|
1481 |
uint32_t enables = 0; |
1481 |
uint32_t enables = 0; |
1482 |
int rc = 0; |
1482 |
int rc = 0; |
1483 |
if (*filter_id != -1) { |
1483 |
// if (*filter_id != -1) { |
1484 |
device_printf(softc->dev, "Attempt to re-allocate l2 ctx " |
1484 |
// device_printf(softc->dev, "Attempt to re-allocate l2 ctx " |
1485 |
"filter (fid: 0x%jx)\n", (uintmax_t)*filter_id); |
1485 |
// "filter (fid: 0x%jx)\n", (uintmax_t)*filter_id); |
1486 |
return EDOOFUS; |
1486 |
// return EDOOFUS; |
1487 |
} |
1487 |
// } |
|
|
1488 |
|
1488 |
resp = (void *)softc->hwrm_cmd_resp.idi_vaddr; |
1489 |
resp = (void *)softc->hwrm_cmd_resp.idi_vaddr; |
1489 |
bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_CFA_L2_FILTER_ALLOC); |
1490 |
bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_CFA_L2_FILTER_ALLOC); |
1490 |
req.flags = htole32(HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_RX); |
1491 |
req.flags = htole32(HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_RX); |
1491 |
enables = HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR |
1492 |
enables = |
1492 |
| HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR_MASK |
1493 |
HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR |
1493 |
| HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_DST_ID; |
1494 |
| HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR_MASK |
|
|
1495 |
| HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_DST_ID; |
1494 |
if (vlan_tag != 0xffff) { |
1496 |
// if (vlan_tag != 0xffff) { |
1495 |
enables |= |
1497 |
// enables |= |
1496 |
HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN | |
1498 |
// HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN | |
1497 |
HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN_MASK | |
1499 |
// HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN_MASK | |
1498 |
HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_NUM_VLANS; |
1500 |
// HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_NUM_VLANS; |
1499 |
req.l2_ivlan_mask = 0xffff; |
1501 |
// req.l2_ivlan_mask = 0xF000; |
1500 |
req.l2_ivlan = vlan_tag; |
1502 |
// req.l2_ivlan = vlan_tag; |
1501 |
req.num_vlans = 1; |
1503 |
// req.num_vlans = 1; |
1502 |
} |
1504 |
// } |
1503 |
req.enables = htole32(enables); |
1505 |
req.enables = htole32(enables); |
1504 |
req.dst_id = htole16(vnic->id); |
1506 |
req.dst_id = htole16(vnic->id); |