From mboxrd@z Thu Jan 1 00:00:00 1970 From: Subject: How classification happens in scheduling ? Date: Wed, 20 Jan 2016 12:06:21 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable To: Return-path: Received: from wipro-chn-out01.wipro.com (wipro-chn-out01.wipro.com [203.91.208.14]) by dpdk.org (Postfix) with ESMTP id 7C6548E59 for ; Wed, 20 Jan 2016 13:06:33 +0100 (CET) Content-Language: en-US List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi all, Could someone explain me how this code snippet determining subport,pipe,tra= ffic_class,queue,color. uint16_t *pdata =3D rte_pktmbuf_mtod(m, uint16_t *); //points to th= e start of the data in the mbuf *subport =3D (rte_be_to_cpu_16(pdata[SUBPORT_OFFSET]) & 0x0FFF) &(p= ort_params.n_subports_per_port - 1); /* Outer VLAN ID*/ *pipe =3D (rte_be_to_cpu_16(pdata[PIPE_OFFSET]) & 0x0FFF) & (port_p= arams.n_pipes_per_subport - 1); /* Inner VLAN ID */ *traffic_class =3D (pdata[QUEUE_OFFSET] & 0x0F) & (RTE_SCHED_TRAFFI= C_CLASSES_PER_PIPE - 1); /* Destination IP */ *queue =3D ((pdata[QUEUE_OFFSET] >> 8) & 0x0F) & (RTE_SCHED_QUEUES_= PER_TRAFFIC_CLASS - 1) ; /* Destination IP */ *color =3D 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 ma= y contain proprietary, confidential or privileged information. If you are n= ot the intended recipient, you should not disseminate, distribute or copy t= his e-mail. Please notify the sender immediately and destroy all copies of = this message and any attachments. WARNING: Computer viruses can be transmit= ted via email. The recipient should check this email and any attachments fo= r the presence of viruses. The company accepts no liability for any damage = caused by any virus transmitted by this email. www.wipro.com