| 107 | } |
| 108 | |
| 109 | static void |
| 110 | kni_set_bitmap(const char *p, unsigned char *port_bitmap) |
| 111 | { |
| 112 | int i; |
| 113 | const char *head, *tail, *tail_num; |
| 114 | if(!p) |
| 115 | return; |
| 116 | |
| 117 | head = p; |
| 118 | while (1) { |
| 119 | tail = strstr(head, ","); |
| 120 | tail_num = strstr(head, "-"); |
| 121 | if(tail_num && (!tail || tail_num < tail - 1)) { |
| 122 | for(i = atoi(head); i <= atoi(tail_num + 1); ++i) { |
| 123 | set_bitmap(i, port_bitmap); |
| 124 | } |
| 125 | } else { |
| 126 | set_bitmap(atoi(head), port_bitmap); |
| 127 | } |
| 128 | |
| 129 | if(!tail) |
| 130 | break; |
| 131 | |
| 132 | head = tail + 1; |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | static int |
| 137 | kni_process_tx(uint16_t port_id, __rte_unused uint16_t queue_id, |
no test coverage detected