MCPcopy Create free account
hub / github.com/F-Stack/f-stack / intel_ntb_vector_bind

Function intel_ntb_vector_bind

dpdk/drivers/raw/ntb/ntb_hw_intel.c:588–614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

586}
587
588static int
589intel_ntb_vector_bind(const struct rte_rawdev *dev, uint8_t intr, uint8_t msix)
590{
591 struct ntb_hw *hw = dev->dev_private;
592 uint8_t reg_off;
593 void *reg_addr;
594
595 if (intr >= hw->db_cnt) {
596 NTB_LOG(ERR, "Invalid intr source.");
597 return -EINVAL;
598 }
599
600 /* Bind intr source to msix vector */
601 if (is_gen3_ntb(hw))
602 reg_off = XEON_GEN3_INTVEC_OFFSET;
603 else if (is_gen4_ntb(hw))
604 reg_off = XEON_GEN4_INTVEC_OFFSET;
605 else {
606 NTB_LOG(ERR, "Cannot bind vectors for unsupported device.");
607 return -ENOTSUP;
608 }
609 reg_addr = hw->hw_addr + reg_off + intr;
610
611 rte_write8(msix, reg_addr);
612
613 return 0;
614}
615
616/* operations for primary side of local ntb */
617const struct ntb_dev_ops intel_ntb_ops = {

Callers

nothing calls this directly

Calls 3

is_gen3_ntbFunction · 0.85
is_gen4_ntbFunction · 0.85
rte_write8Function · 0.50

Tested by

no test coverage detected