DPDK patches and discussions
 help / color / mirror / Atom feed
From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Subject: [dpdk-dev] Issue with rte_eth_dev_set_vlan_offload
Date: Tue, 7 Mar 2017 12:30:00 +0000	[thread overview]
Message-ID: <HE1PR04MB16120B716E3C527055C84693892F0@HE1PR04MB1612.eurprd04.prod.outlook.com> (raw)

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

                 reply	other threads:[~2017-03-07 12:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=HE1PR04MB16120B716E3C527055C84693892F0@HE1PR04MB1612.eurprd04.prod.outlook.com \
    --to=hemant.agrawal@nxp.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).