Hey Justin, Thanks for your time The mapping I need is datapath port number.
Is there any way in which I can make the datapath port numbers sequential? eg system@ovs-system: lookups: hit:155 missed:948 lost:0 flows: 4 masks: hit:4052 total:5 hit/pkt:3.67 port 0: ovs-system (internal) port 1: s1 (internal) port 2: s1-eth1 port 3: s1-eth2 port 4: s1-eth3 port 5: s1-eth4 port 6: s1-eth5 port 7: s1-eth6 port 8: s2 (internal) port 9: s2-eth1 port 10: s2-eth2 port 11: s2-eth3 In the above snap the datapath port numbers are all sequential ie s1eth1 has 1 s1eth2 has 2 and so on . Once interfaces of s1 are finished s2 starts. (If this order is preserved I can identify the datapath port numbers from floodlight. Bul this ordr isnt preserved everytime) *void ovs_dp_process_received_packet(struct vport *p, struct sk_buff *skb)* say a packet is being processed by this function. Is there any way to identify the datapath port number from this function? eg swith s1 eth1 ---datapath port=68 if I have the information 1 then from this function can I map it to 68?? On Mon, Nov 16, 2015 at 11:52 AM, Justin Pettit <jpet...@ovn.org> wrote: > > > On Nov 15, 2015, at 9:35 PM, Sree Vidya S D <vidya...@gmail.com> wrote: > > > > Hey, > > > > Snap of *sudo ovs-dpctl show *output for a random topology > > > > > > system@ovs-system: > > lookups: hit:2069 missed:2861 lost:0 > > flows: 0 > > masks: hit:7849 total:1 hit/pkt:1.59 > > port 0: ovs-system (internal) > > port 1: s38 (internal) > > port 2: s38-eth1 > > port 3: s38-eth2 > > port 4: s38-eth3 > > port 5: s45 (internal) > > port 6: s45-eth1 > > *port 7: s45-eth2* > > port 8: s45-eth3 > > port 9: s36 (internal) > > Those "ovs-dpctl" commands are showing you the datapath port numbers, not > the OpenFlow ones. You need to use a command like "ovs-ofctl show" to see > the OpenFlow port numbers. > > > Is there any way to detect from the floodlight controller what will be > the > > openflow pot number > > I don't know enough about FloodLight to say whether it exposes that > information, but it's available through OVSDB. You can use an OVSDB CLI > utility like ovs-vsctl to get that information. Here's the relevant > information from the FAQ: > > -=-=-=-=-=-=-=-=-=- > Q: How can I figure out the OpenFlow port number for a given port? > > A: The OFPT_FEATURES_REQUEST message requests an OpenFlow switch to > respond with an OFPT_FEATURES_REPLY that, among other information, includes > a mapping between OpenFlow port names and numbers. From a command prompt, > "ovs-ofctl show br0" makes such a request and prints the response for > switch br0. > > The Interface table in the Open vSwitch database also maps OpenFlow port > names to numbers. To print the OpenFlow port number associated with > interface eth0, run: > > ovs-vsctl get Interface eth0 ofport > > You can print the entire mapping with: > > ovs-vsctl -- --columns=name,ofport list Interface > > but the output mixes together interfaces from all bridges in the database, > so it may be confusing if more than one bridge exists. > > In the Open vSwitch database, ofport value -1 means that the interface > could not be created due to an error. (The Open vSwitch log should indicate > the reason.) ofport value means that the interface hasn't been created yet. > The latter is normally an intermittent condition (unless ovs-vswitchd is > not running). > -=-=-=-=-=-=-=-=-=- > > --Justin > > > -- -- *яєgαя∂ѕ, sreevidya* *There is a beautiful intricacy in law!* _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev