[dpdk-dev] How classification happens in scheduling ?

ravulakollu.kumar at wipro.com ravulakollu.kumar at wipro.com
Wed Jan 20 13:06:21 CET 2016


Hi all,

Could someone explain me how this code snippet determining subport,pipe,traffic_class,queue,color.

        uint16_t *pdata = rte_pktmbuf_mtod(m, uint16_t *); //points to the start of the data in the mbuf

        *subport = (rte_be_to_cpu_16(pdata[SUBPORT_OFFSET]) & 0x0FFF) &(port_params.n_subports_per_port - 1); /* Outer VLAN ID*/
        *pipe = (rte_be_to_cpu_16(pdata[PIPE_OFFSET]) & 0x0FFF) & (port_params.n_pipes_per_subport - 1); /* Inner VLAN ID */
        *traffic_class = (pdata[QUEUE_OFFSET] & 0x0F) & (RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE - 1); /* Destination IP */
        *queue = ((pdata[QUEUE_OFFSET] >> 8) & 0x0F) & (RTE_SCHED_QUEUES_PER_TRAFFIC_CLASS - 1) ; /* Destination IP */
        *color = pdata[COLOR_OFFSET] & 0x03;    /* Destination IP */

Thanks & Regards,
Uday
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com


More information about the dev mailing list