[dpdk-dev] [PATCH v2 1/3] ethdev: define ctrl_pkt filter type and its structure

Wu, Jingjing jingjing.wu at intel.com
Fri Oct 31 08:05:38 CET 2014


Hi, Thomas

Thanks for your comments

Jingjing 

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> Sent: Friday, October 31, 2014 6:47 AM
> To: Wu, Jingjing
> Cc: dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2 1/3] ethdev: define ctrl_pkt filter type
> and its structure
> 
> 2014-10-22 16:19, Jingjing Wu:
> > +/**
> > + * Define all structures for Control Packet Filter type corresponding with
> specific operations.
> > + */
> 
> Please explain what is a control packet.
A control element in Fortville can be used to receive control packets and control other switching elements. Control packet filter can filter control packet (such as LLDP) to different queues in receive and identify the switch element that should process the packets in transmit.
At the same time, we also can use this filter to route non-control packets to queue or other engine by filtering mac and ether_type. The name "control packet filter" comes from Fortville.

> 
> > +
> > +#define RTE_CONTROL_PACKET_FLAGS_IGNORE_MAC    0x0001
> > +#define RTE_CONTROL_PACKET_FLAGS_DROP          0x0002
> > +#define RTE_CONTROL_PACKET_FLAGS_TO_QUEUE      0x0004
> > +#define RTE_CONTROL_PACKET_FLAGS_TX            0x0008
> > +#define RTE_CONTROL_PACKET_FLAGS_RX            0x0000
> 
> Flag RX is 0?
Yes, RX is default value. Maybe it need to be removed. 
> 
> > +/**
> > + * A structure used to define the control packet filter entry
> > + * to support RTE_ETH_FILTER_CTRL_PKT with RTE_ETH_FILTER_ADD
> > + * and RTE_ETH_FILTER_DELETE operations.
> > + */
> > +struct rte_ctrl_pkt_filter {
> > +	struct ether_addr mac_addr;   /**< mac address to match. */
> > +	uint16_t ether_type;          /**< ether type to match */
> > +	uint16_t flags;               /**< options for filter's behavior*/
> > +	uint16_t dest_id;             /**< destination vsi id or pool id*/
> 
> vsi id and pool id cannot be understood in a generic context.
> Please explain what you mean and why queue is not enough.
If queue is not specified, dest_id defines which element (vsi) will get the packet.
If queue is specified, the queue need belong to the destination element.
> 
> > +	uint16_t queue;               /**< queue assign to if TO QUEUE flag is set
> */
> 
> TO QUEUE is not defined. Is it really needed?
> 
TO QUEUE is just the flag RTE_CONTROL_PACKET_FLAGS_TO_QUEUE above.

> Thanks
> --
> Thomas


More information about the dev mailing list