On Thu, Jun 06, 2013 at 03:00:34PM +0800, Jason Wang wrote: > On 06/05/2013 06:42 PM, Amos Kong wrote: > > Currently macvtap based macvlan device is working in promiscuous > > mode, we want to implement mac-programming over macvtap through > > Libvirt for better performance.
... > > +SQMP > > +query-rx-filter > > +--------------- > > + > > +Show rx-filter information. > > + > > +Returns a json-array of rx-filter information for all nics (or for the > > +given nic), returning an error if the given nic doesn't exist, or > > +given nic doesn't support rx-filter querying, or no net client > > +supports rx-filter querying. > > + > > +The query will clear the event notification flag of each nic, then qemu > > +will start to emit event to QMP monitor. > > + > > +Each array entry contains the following: > > + > > +- "name": net client name (json-string) > > +- "promiscuous": promiscuous mode is enabled (json-bool) > > +- "multicast": multicast receive state (one of 'normal', 'none', 'all') > > +- "unicast": unicast receive state (one of 'normal', 'none', 'all') > > +- "broadcast-allowed": allow to receive broadcast (json-bool) > > +- "multicast-overflow": multicast table is overflowed (json-bool) > > +- "unicast-overflow": unicast table is overflowed (json-bool) > > +- "main-mac": main macaddr string (json-string) > > +- "vlan-table": a json-array of vlan-table entry > > + - "index": index of vlan filter table (json-int) > > + - "value": 32 bit of indicator for active vlans > > Not sure whether or not this is libvirt friendly. Looks like you expect > libvirt to do some post-processing. Why not just expose vids? vid is used in userspace, I will return vid json-array in output. Thanks. > > +- "unicast-table": a json-array of unicast macaddr string > > +- "multicast-table": a json-array of multicast macaddr string > > + -- Amos.