···924924 break;925925926926 case OVS_USERSPACE_ATTR_PID:927927- if (dp->user_features & OVS_DP_F_DISPATCH_UPCALL_PER_CPU)927927+ if (dp->user_features &928928+ OVS_DP_F_DISPATCH_UPCALL_PER_CPU)928929 upcall.portid =929929- ovs_dp_get_upcall_portid(dp, smp_processor_id());930930+ ovs_dp_get_upcall_portid(dp,931931+ smp_processor_id());930932 else931933 upcall.portid = nla_get_u32(a);932934 break;
+10-6
net/openvswitch/datapath.c
···244244 upcall.cmd = OVS_PACKET_CMD_MISS;245245246246 if (dp->user_features & OVS_DP_F_DISPATCH_UPCALL_PER_CPU)247247- upcall.portid = ovs_dp_get_upcall_portid(dp, smp_processor_id());247247+ upcall.portid =248248+ ovs_dp_get_upcall_portid(dp, smp_processor_id());248249 else249250 upcall.portid = ovs_vport_find_upcall_portid(p, skb);250251···16371636 if (dp_nlsk_pids) {16381637 if (cpu_id < dp_nlsk_pids->n_pids) {16391638 return dp_nlsk_pids->pids[cpu_id];16401640- } else if (dp_nlsk_pids->n_pids > 0 && cpu_id >= dp_nlsk_pids->n_pids) {16411641- /* If the number of netlink PIDs is mismatched with the number of16421642- * CPUs as seen by the kernel, log this and send the upcall to an16431643- * arbitrary socket (0) in order to not drop packets16391639+ } else if (dp_nlsk_pids->n_pids > 0 &&16401640+ cpu_id >= dp_nlsk_pids->n_pids) {16411641+ /* If the number of netlink PIDs is mismatched with16421642+ * the number of CPUs as seen by the kernel, log this16431643+ * and send the upcall to an arbitrary socket (0) in16441644+ * order to not drop packets16441645 */16451646 pr_info_ratelimited("cpu_id mismatch with handler threads");16461646- return dp_nlsk_pids->pids[cpu_id % dp_nlsk_pids->n_pids];16471647+ return dp_nlsk_pids->pids[cpu_id %16481648+ dp_nlsk_pids->n_pids];16471649 } else {16481650 return 0;16491651 }