Limit my applications download bandwidth using QoS and Traffic Control API RRS feed

  • Question

  • I have used QoS and Traffic Control API's like TcAddFlow and TcAddFilter to control my applications download bandwidth usage.

    We need to manipulate TC_GEN_FLOW, send and receive FLOWSPEC paramters.

    Now I want to set the limit to exact 5Mbps, What are the value I will need to set for TokenBucketSize and TokenRate to limit the bandwidth to 5Mbps in FLOWSPEC structure?


    Code snippet:

            newFlow->ReceivingFlowspec.DelayVariation = QOS_NOT_SPECIFIED;
    newFlow->ReceivingFlowspec.Latency = QOS_NOT_SPECIFIED;
    newFlow->ReceivingFlowspec.MaxSduSize = QOS_NOT_SPECIFIED;
    newFlow->ReceivingFlowspec.MinimumPolicedSize = QOS_NOT_SPECIFIED;
    newFlow->ReceivingFlowspec.PeakBandwidth = POSITIVE_INFINITY_RATE; 
    newFlow->ReceivingFlowspec.ServiceType = SERVICETYPE_NETWORK_CONTROL;
    newFlow->ReceivingFlowspec.TokenBucketSize = ?;
    newFlow->ReceivingFlowspec.TokenRate = ?;

    newFlow->SendingFlowspec.DelayVariation = QOS_NOT_SPECIFIED;
    newFlow->SendingFlowspec.Latency = QOS_NOT_SPECIFIED;
    newFlow->SendingFlowspec.MaxSduSize = QOS_NOT_SPECIFIED;
    newFlow->SendingFlowspec.MinimumPolicedSize = QOS_NOT_SPECIFIED;
    newFlow->SendingFlowspec.PeakBandwidth = POSITIVE_INFINITY_RATE;
    newFlow->SendingFlowspec.ServiceType = SERVICETYPE_NETWORK_CONTROL;
    newFlow->SendingFlowspec.TokenBucketSize = ?;
    newFlow->SendingFlowspec.TokenRate = ?;

    Thanks & Regards

    Friday, July 29, 2016 11:55 AM

All replies

  • Currently I'm setting

    newFlow->SendingFlowspec.TokenBucketSize = 1024;
    newFlow->SendingFlowspec.TokenRate = 4500*iSpeed;

    to get 1Mbps download speed for my application i set iSpeed = 1 and vary iSpeed 2,3...5 to get corresponding download speed in Mbps.

    I monitor my application using NetBalancer tool. Is this the right calculation for TokenRate and TokenBucketSize ? 

    • Edited by GeekSS Tuesday, August 2, 2016 12:07 PM
    Tuesday, August 2, 2016 12:07 PM