DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] How classification happens in scheduling ?
@ 2016-01-20 12:06 ravulakollu.kumar
  2016-01-20 14:32 ` Singh, Jasvinder
  0 siblings, 1 reply; 2+ messages in thread
From: ravulakollu.kumar @ 2016-01-20 12:06 UTC (permalink / raw)
  To: dev

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-20 14:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-20 12:06 [dpdk-dev] How classification happens in scheduling ? ravulakollu.kumar
2016-01-20 14:32 ` Singh, Jasvinder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).