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

Function handle_knictl_msg

lib/ff_dpdk_if.c:1860–1889  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1858
1859#ifdef FF_KNI
1860static inline void
1861handle_knictl_msg(struct ff_msg *msg)
1862{
1863 if (msg->knictl.kni_cmd == FF_KNICTL_CMD_SET){
1864 switch (msg->knictl.kni_action){
1865 case FF_KNICTL_ACTION_ALL_TO_FF:
1866 knictl_action = FF_KNICTL_ACTION_ALL_TO_FF;
1867 msg->result = 0;
1868 ff_log(FF_LOG_INFO, FF_LOGTYPE_FSTACK_LIB, "new kni action: alltoff\n");
1869 break;
1870 case FF_KNICTL_ACTION_ALL_TO_KNI:
1871 knictl_action = FF_KNICTL_ACTION_ALL_TO_KNI;
1872 msg->result = 0;
1873 ff_log(FF_LOG_INFO, FF_LOGTYPE_FSTACK_LIB, "new kni action: alltokni\n");
1874 break;
1875 case FF_KNICTL_ACTION_DEFAULT:
1876 knictl_action = FF_KNICTL_ACTION_DEFAULT;
1877 msg->result = 0;
1878 ff_log(FF_LOG_INFO, FF_LOGTYPE_FSTACK_LIB, "new kni action: default\n");
1879 break;
1880 default:
1881 msg->result = -1;
1882 }
1883 }
1884 else if (msg->knictl.kni_cmd == FF_KNICTL_CMD_GET){
1885 msg->knictl.kni_action = knictl_action;
1886 } else {
1887 msg->result = -2;
1888 }
1889}
1890#endif
1891
1892static inline void

Callers 1

handle_msgFunction · 0.85

Calls 1

ff_logFunction · 0.85

Tested by

no test coverage detected