/* Copy the contents of *pkt into the policy.pkt */
policies[i].pkt = *pkt;
get_pcpu_to_control(&policies[i]);
- if (get_pfid(&policies[i]) < 0) {
- updated = 1;
- break;
+ /* Check Eth dev only for Traffic policy */
+ if (policies[i].pkt.policy_to_use == TRAFFIC) {
+ if (get_pfid(&policies[i]) < 0) {
+ updated = 1;
+ break;
+ }
}
core_share_status(i);
policies[i].enabled = 1;
if (policies[i].enabled == 0) {
policies[i].pkt = *pkt;
get_pcpu_to_control(&policies[i]);
- if (get_pfid(&policies[i]) < 0)
- break;
+ /* Check Eth dev only for Traffic policy */
+ if (policies[i].pkt.policy_to_use == TRAFFIC) {
+ if (get_pfid(&policies[i]) < 0) {
+ updated = 1;
+ break;
+ }
+ }
core_share_status(i);
policies[i].enabled = 1;
break;