Re: [ovs-discuss] Can I send a message to the controller whenever a packet arrives on the switch???

2019-02-13 Thread Ben Pfaff
Please don't drop the list.

Yes.

Yes.

On Thu, Feb 14, 2019 at 04:55:17AM +0900, 장예훈 wrote:
> Should I add it to the controller???
> When setting FlowEntry on the controller, do you set two actions??
> 
> Thank you very much for your answer.
> 
> 2019년 2월 14일 (목) 오전 4:43, Ben Pfaff 님이 작성:
> 
> > On Thu, Feb 14, 2019 at 04:29:21AM +0900, 장예훈 wrote:
> > > I would like to send a message to the controller even if there is a
> > FlowEntry
> > > That matches every time a packet enters the switch.
> >
> > Have the controller put a send-to-controller action in its flow entries.
> >
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Can I send a message to the controller whenever a packet arrives on the switch???

2019-02-13 Thread Ben Pfaff
On Thu, Feb 14, 2019 at 04:29:21AM +0900, 장예훈 wrote:
> I would like to send a message to the controller even if there is a FlowEntry
> That matches every time a packet enters the switch.

Have the controller put a send-to-controller action in its flow entries.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] Can I send a message to the controller whenever a packet arrives on the switch???

2019-02-13 Thread 장예훈
Hello.
I’ve been looking for it, but I don’t know what to ask…..

I would like to send a message to the controller even if there is a FlowEntry
That matches every time a packet enters the switch.
To do this, the ovs_dp_process_packet has been added as follows:
If (unlikely(!flow)) {
….
}
If (key->eth.type == 8) {
memset(_temp, 0, sizeof(upcall_temp));
upcall_temp.cmd = OVS_PACKET_CMD_MISS;
upcall_temp.portid = ovs_vport_find_upcall_portid(p, skb);
upcall_temp.mru = OVS_CB(skb)->mru;
error2 = ovs_dp_upcall(dp, skb, key, _temp, 0);
if (unlikely(error2))
kfree_skb(skb);
else
consume_skb(skb);
}
ovs_flow_stats_update(flow, key->tp.flags, skb);
…
But the computer stops….
What should I do???

And added interval variables to struct flow_stats. The interval time between 
packets was then obtained
>From ops_flow_stats_update as follows:
...
flow->stats_last_writer = cpu;
}
}
stats->interval = jiffies – stats->used;
stats->used = jiffies;
stats->packet_count++;
…
How can you send this to the controller??

I’m sorry to keep asking you this…
OVS is too difiicult. I’m so sorry…
Thank you.

___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss