Hi Purnima,

I think you should try to match the flows on ip_tos

You can refer how the packets gets remarked in function "meter_entry_apply" of 
"udatapath/meter_entry.c" (ofsoftswitch13)

            uint8_t new_dscp = ((*pkt)->handle_std->proto->ipv4->ip_tos >> 5) - 
band_header->prec_level;
            (*pkt)->handle_std->proto->ipv4->ip_tos = (new_dscp << 5) | 
((*pkt)->handle_std->proto->ipv4->ip_tos & 0x1f);


Regards,
Pradeep.V

From: Purnima Mohan [mailto:purnimamoha...@gmail.com]
Sent: Friday, May 24, 2013 2:24 PM
To: Voleti, Pradeep (HP Networking)
Cc: openflow-discuss
Subject: Re: [openflow-discuss] Openflow1.3 Metering with band type as 
DSCP_REMARK

Hi Pradeep,
Thank you.
Now I have associated this meter to a flow (Switch2) in one side of the network 
using the below command.

       dpctl unix:/var/runs2.sock flow-mod cmd=add,table=0 in_port=1 meter:2 
apply:output=2


I want to match field in the other side of the network say in Switch3 to match 
the packets that are dscp marked. I saw a match field for dscp in github as 
ip_dscp.I just don't know how to use it. Since I dint know what exactly happens 
when the packets are marked. looks like the ToS value in the IP header will be 
reduced by the value given by us in "prec_level=x", Am I right?
If so in the below command,

       dpctl unix:/var/runs3.sock flow-mod cmd=add,table=0 
in_port=3,eth_type=0x800,ip_dscp=y apply:output=1
What should be the value of ip_dscp=y when I give prec_level=x?


On Thu, May 23, 2013 at 7:05 PM, Voleti, Pradeep (HP Networking) 
<pvol...@hp.com<mailto:pvol...@hp.com>> wrote:
Hi Purnima,

I think the command should be "dpctl unix:/var/runs2.sock meter-mod 
cmd=add,flags=1,meter=2 dscp_remark:rate=10000,prec_level=x" to create a meter 
which would remark the DSCP precedence to value "x" for all packets that exceed 
10000kbps
(I see that you were using mod command instead of add)

However, I see that the current dpctl code does not have any code using the 
"prec_level" yet. (You may need to modify the same).

To associate this meter to a flow, you would need to use "meter:2" in the 
actions (assuming your meter ID is 2)

All flows that would match the flow would use this meter and that would mean 
that the packets if exceeding the rate would have their DSCP precedence level 
changed by the value mentioned while configuring the meter.

Regards,
Pradeep.V

From: 
openflow-discuss-boun...@lists.stanford.edu<mailto:openflow-discuss-boun...@lists.stanford.edu>
 
[mailto:openflow-discuss-boun...@lists.stanford.edu<mailto:openflow-discuss-boun...@lists.stanford.edu>]
 On Behalf Of Purnima Mohan
Sent: Thursday, May 23, 2013 4:09 PM
To: openflow-discuss
Subject: [openflow-discuss] Openflow1.3 Metering with band type as DSCP_REMARK

Hi,
Can anyone help me with the dscp marking feature in Openflow1.3. I am using 
ofsoftswitch13.
1. For eg. I configure a meter as shown below and attach it to a flow.

dpctl unix:/var/runs2.sock meter-mod cmd=mod,flags=1,meter=2 
dscp_remark:rate=10000

SENDING:
meter_mod{cmd="mod", flags="0x1"", meter_id="2"", bands=[{type = dscp_remark, 
rate="10000", burst_size="0", prec_level="0"}]}


OK.
2. Now how do I use match field to check if the packets are marked? What does 
the dscp_remark feature actually do?
Thanks in advance,

--
Regards,
Purnima


_______________________________________________
openflow-discuss mailing list
openflow-discuss@lists.stanford.edu<mailto:openflow-discuss@lists.stanford.edu>
https://mailman.stanford.edu/mailman/listinfo/openflow-discuss



--
Regards,
Purnima

_______________________________________________
openflow-discuss mailing list
openflow-discuss@lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/openflow-discuss

Reply via email to