DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Issue with rte_eth_dev_set_vlan_offload
@ 2017-03-07 12:30 Hemant Agrawal
  0 siblings, 0 replies; only message in thread
From: Hemant Agrawal @ 2017-03-07 12:30 UTC (permalink / raw)
  To: dev

Hi,
               Currently the "rte_eth_dev_set_vlan_offload" support setting of three different capabilities on the port i.e. strip, filter and extend

The current implementation only returns error when this API is not implemented by the PMD.


1.      First issue is that the documentation says that "(-ENOSUP) if hardware-assisted VLAN filtering not configured." But the APIs is also about strip and extend.

2.      These are three different capabilities, NICs may support one but not other. So, this API should return the which of these capabilities are not supported by the hardware.

I see following options to fix it:

1.      This API should check the hw capabilities and return the error, if there is a mismatch.  In case of error,  it may return the hw supported mask as a possible return value.

2.      Split the APIs into three different APIs for each function.

Regards,
Hemant

/**
* Set VLAN offload configuration on an Ethernet device
* Enable/Disable Extended VLAN by an Ethernet device, This is a register setup
* available on some Intel NIC, not but all, please check the data sheet for
* availability.
* Enable/Disable VLAN Strip can be done on rx queue for certain NIC, but here
* the configuration is applied on the port level.
*
* @param port_id
*   The port identifier of the Ethernet device.
* @param offload_mask
*   The VLAN Offload bit mask can be mixed use with "OR"
*       ETH_VLAN_STRIP_OFFLOAD
*       ETH_VLAN_FILTER_OFFLOAD
*       ETH_VLAN_EXTEND_OFFLOAD
* @return
*   - (0) if successful.
*   - (-ENOSUP) if hardware-assisted VLAN filtering not configured.
*   - (-ENODEV) if *port_id* invalid.
*/
int rte_eth_dev_set_vlan_offload(uint8_t port_id, int offload_mask);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-07 12:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-07 12:30 [dpdk-dev] Issue with rte_eth_dev_set_vlan_offload Hemant Agrawal

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).