Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/liquidio/lio_core.c
| Show All 38 Lines | |||||
| #include "lio_response_manager.h" | #include "lio_response_manager.h" | ||||
| #include "lio_device.h" | #include "lio_device.h" | ||||
| #include "lio_ctrl.h" | #include "lio_ctrl.h" | ||||
| #include "lio_main.h" | #include "lio_main.h" | ||||
| #include "lio_rxtx.h" | #include "lio_rxtx.h" | ||||
| #include "lio_network.h" | #include "lio_network.h" | ||||
| int | int | ||||
| lio_set_feature(struct ifnet *ifp, int cmd, uint16_t param1) | lio_set_feature(if_t ifp, int cmd, uint16_t param1) | ||||
| { | { | ||||
| struct lio_ctrl_pkt nctrl; | struct lio_ctrl_pkt nctrl; | ||||
| struct lio *lio = if_getsoftc(ifp); | struct lio *lio = if_getsoftc(ifp); | ||||
| struct octeon_device *oct = lio->oct_dev; | struct octeon_device *oct = lio->oct_dev; | ||||
| int ret = 0; | int ret = 0; | ||||
| bzero(&nctrl, sizeof(struct lio_ctrl_pkt)); | bzero(&nctrl, sizeof(struct lio_ctrl_pkt)); | ||||
| ▲ Show 20 Lines • Show All 202 Lines • ▼ Show 20 Lines | lio_setup_droq(struct octeon_device *oct, int q_no, int num_descs, | ||||
| return (ret_val); | return (ret_val); | ||||
| } | } | ||||
| static void | static void | ||||
| lio_push_packet(void *m_buff, uint32_t len, union octeon_rh *rh, void *rxq, | lio_push_packet(void *m_buff, uint32_t len, union octeon_rh *rh, void *rxq, | ||||
| void *arg) | void *arg) | ||||
| { | { | ||||
| struct mbuf *mbuf = m_buff; | struct mbuf *mbuf = m_buff; | ||||
| struct ifnet *ifp = arg; | if_t ifp = arg; | ||||
| struct lio_droq *droq = rxq; | struct lio_droq *droq = rxq; | ||||
| if (ifp != NULL) { | if (ifp != NULL) { | ||||
| struct lio *lio = if_getsoftc(ifp); | struct lio *lio = if_getsoftc(ifp); | ||||
| /* Do not proceed if the interface is not in RUNNING state. */ | /* Do not proceed if the interface is not in RUNNING state. */ | ||||
| if (!lio_ifstate_check(lio, LIO_IFSTATE_RUNNING)) { | if (!lio_ifstate_check(lio, LIO_IFSTATE_RUNNING)) { | ||||
| lio_recv_buffer_free(mbuf); | lio_recv_buffer_free(mbuf); | ||||
| ▲ Show 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | |||||
| * an input queue is for egress packets, and output queues | * an input queue is for egress packets, and output queues | ||||
| * are for ingress packets. | * are for ingress packets. | ||||
| */ | */ | ||||
| int | int | ||||
| lio_setup_io_queues(struct octeon_device *octeon_dev, int ifidx, | lio_setup_io_queues(struct octeon_device *octeon_dev, int ifidx, | ||||
| uint32_t num_iqs, uint32_t num_oqs) | uint32_t num_iqs, uint32_t num_oqs) | ||||
| { | { | ||||
| struct lio_droq_ops droq_ops; | struct lio_droq_ops droq_ops; | ||||
| struct ifnet *ifp; | if_t ifp; | ||||
| struct lio_droq *droq; | struct lio_droq *droq; | ||||
| struct lio *lio; | struct lio *lio; | ||||
| static int cpu_id, cpu_id_modulus; | static int cpu_id, cpu_id_modulus; | ||||
| int num_tx_descs, q, q_no, retval = 0; | int num_tx_descs, q, q_no, retval = 0; | ||||
| ifp = octeon_dev->props.ifp; | ifp = octeon_dev->props.ifp; | ||||
| lio = if_getsoftc(ifp); | lio = if_getsoftc(ifp); | ||||
| ▲ Show 20 Lines • Show All 269 Lines • Show Last 20 Lines | |||||