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

Function memif_intr_handler

dpdk/drivers/net/memif/memif_socket.c:780–815  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

778}
779
780static void
781memif_intr_handler(void *arg)
782{
783 struct memif_control_channel *cc = arg;
784 int ret;
785
786 ret = memif_msg_receive(cc);
787 /* if driver failed to assign device */
788 if (cc->dev == NULL) {
789 memif_msg_send_from_queue(cc);
790 ret = rte_intr_callback_unregister_pending(cc->intr_handle,
791 memif_intr_handler,
792 cc,
793 memif_intr_unregister_handler);
794 if (ret < 0)
795 MIF_LOG(WARNING,
796 "Failed to unregister control channel callback.");
797 return;
798 }
799 /* if memif_msg_receive failed */
800 if (ret < 0)
801 goto disconnect;
802
803 ret = memif_msg_send_from_queue(cc);
804 if (ret < 0)
805 goto disconnect;
806
807 return;
808
809 disconnect:
810 if (cc->dev == NULL) {
811 MIF_LOG(WARNING, "eth dev not allocated");
812 return;
813 }
814 memif_disconnect(cc->dev);
815}
816
817static void
818memif_listener_handler(void *arg)

Callers

nothing calls this directly

Calls 4

memif_msg_receiveFunction · 0.85
memif_disconnectFunction · 0.85

Tested by

no test coverage detected