2014-07-24 14:42, Helin Zhang: > Two ops of 'check_command_supported' and 'rx_classification_filter_ctl' > are added. > * 'check_command_supported' is for capability discovery. In anothoer > word, it is to check if specific feature/command is supported by > the specific port.
This generic service is really needed to add NIC-specific functions. I'd suggest to name it "is_supported". > * 'rx_classification_filter_ctl' is for receive classifcation filter > configuring. e.g. hash function configuration, flow director > configuration. It is a common API where a lot of commands can > be implemented for different sub features. Not sure about this one. You are hiding specific API in an opaque structure. By the way, it should be in another patch. > +/** > + * Check if the command is supported by an Ethernet device. > + * > + * @param port_id > + * The port identifier of the Ethernet device. > + * @param cmd > + * The command. > + * > + * @return > + * - (> 0) The command is supported. > + * - (0) The command is not supported. > + * - (-ENOTSUP) if hardware doesn't support. > + * - (-ENODEV) if <port_id> is invalid. > + */ > +int rte_eth_dev_check_command_supported(uint8_t port_id, uint32_t cmd); What are the possible commands? You should define enum/constants here. -- Thomas