DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <arybchenko@solarflare.com>
To: rkudurumalla <rkudurumalla@caviumnetworks.com>,
	Ferruh Yigit <ferruh.yigit@intel.com>,
	Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>,
	<jerin.jacob@caviumnetworks.com>,
	<santosh.shukla@caviumnetworks.com>
Cc: <dev@dpdk.org>,
	"Kudurumalla, Rakesh" <rakesh.kudurumalla@cavium.com>,
	Shahaf Shuler <shahafs@mellanox.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	Olivier MATZ <olivier.matz@6wind.com>
Subject: Re: [dpdk-dev] [PATCH] net/thunderx: add support for Rx VLAN offload
Date: Sat, 14 Jul 2018 11:02:26 +0300	[thread overview]
Message-ID: <5b4889f3-2b72-509d-216c-63d435d332f9@solarflare.com> (raw)
In-Reply-To: <ebdba71e-4671-85cb-860a-a4fa1e409362@caviumnetworks.com>

On 13.07.2018 17:16, rkudurumalla wrote:
> On 07/04/2018 11:06 PM, Ferruh Yigit wrote:
>> External Email
>>
>> On 7/1/2018 5:46 PM, Pavan Nikhilesh wrote:
>>> From: "Kudurumalla, Rakesh" <rakesh.kudurumalla@cavium.com>
>>>
>>> This feature is used to offload stripping of vlan header from recevied
>>> packets and update vlan_tci field in mbuf when
>>> DEV_RX_OFFLOAD_VLAN_STRIP & ETH_VLAN_STRIP_MASK flag is set.
>>>
>>> Signed-off-by: Rakesh Kudurumalla <rkudurumalla@caviumnetworks.com>
>>> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
>>> ---
>>>   drivers/net/thunderx/base/nicvf_hw.c |  1 +
>>>   drivers/net/thunderx/nicvf_ethdev.c  | 59 +++++++++++++++++------
>>>   drivers/net/thunderx/nicvf_rxtx.c    | 70 ++++++++++++++++++++++++----
>>>   drivers/net/thunderx/nicvf_rxtx.h    | 15 ++++--
>>>   drivers/net/thunderx/nicvf_struct.h  |  1 +
>> In thunderx.ini, "VLAN offload" already marked as P(Partially) is it still
>> partially? Why?
>>
>> It is still partial because Tx VLAN offload(insertion of vlan header >
> for tx packets) is yet to be Implemented
>> <...>
>>
>>> @@ -1590,9 +1595,9 @@ nicvf_vf_start(struct rte_eth_dev *dev, struct nicvf *nic, uint32_t rbdrsz)
>>>                     nic->rbdr->tail, nb_rbdr_desc, nic->vf_id);
>>>
>>>        /* Configure VLAN Strip */
>>> -     vlan_strip = !!(dev->data->dev_conf.rxmode.offloads &
>>> -                     DEV_RX_OFFLOAD_VLAN_STRIP);
>>> -     nicvf_vlan_hw_strip(nic, vlan_strip);
>>> +     mask = ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK |
>>> +             ETH_VLAN_EXTEND_MASK;
>> You don't need anything more than ETH_VLAN_STRIP_MASK but agreed no issue add
>> more if you prefer.
>>
>>> +     ret = nicvf_vlan_offload_config(dev, mask);
>>>
>>>        /* Based on the packet type(IPv4 or IPv6), the nicvf HW aligns L3 data
>>>         * to the 64bit memory address.
>>> @@ -1983,6 +1988,7 @@ static const struct eth_dev_ops nicvf_eth_dev_ops = {
>>>        .dev_infos_get            = nicvf_dev_info_get,
>>>        .dev_supported_ptypes_get = nicvf_dev_supported_ptypes_get,
>>>        .mtu_set                  = nicvf_dev_set_mtu,
>>> +     .vlan_offload_set         = nicvf_vlan_offload_set,
>> Not related to this patch but I believe this name 'vlan_offload_set' is
>> confusing, it enable/disable VLAN related config:
>> - vlan strip offload
>> - vlan filtering package (drop/accept specific vlans)
>> - double vlan feature (not offload if I am not missing anything)
>> We can think about a more proper name later...
>>
>> Also rte_eth_dev_set_vlan_offload() API may have a defect, it seems not taking
>> capability flags into account, cc'ed Shahaf and Andrew for information.

Yes, the function could check if corresponding offloads are supported.

Right now we have unified interface to control offloads on device configure
and queues setup. This API to change VLAN offloads looks really legacy now.
If we really need API to control offloads at run time (I'm not sure), it 
should
be generic API for all offloads and corresponding information in dev_info
which specifies offloads are controllable at run time.

>> And I have a question about DEV_TX_OFFLOAD_VLAN_INSERT, perhaps goes to Olivier,
>> if DEV_TX_OFFLOAD_VLAN_INSERT enabled what is the correct way to provide
>> vlan_tci to insert?
>> And do we need something like PKT_RX_VLAN_INSERT and use mbuf->vlan_tci value to
>> have the ability to insert VLAN to some packets?

As I understand ol_flags should have PKT_TX_VLAN. Right now the description
does not mentione it, however the description for double-tagged insertion
PKT_TX_QINQ does.

  reply	other threads:[~2018-07-14  8:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-01 16:46 Pavan Nikhilesh
2018-07-04 17:36 ` Ferruh Yigit
2018-07-13 14:16   ` rkudurumalla
2018-07-14  8:02     ` Andrew Rybchenko [this message]
2018-07-16  9:26 ` [dpdk-dev] [PATCH v2 1/2] net/thunderx: enable Rx checksum offload Pavan Nikhilesh
2018-07-16  9:26   ` [dpdk-dev] [PATCH v2 2/2] net/thunderx: add support for Rx VLAN offload Pavan Nikhilesh
2018-07-18 13:48   ` [dpdk-dev] [PATCH v2 1/2] net/thunderx: enable Rx checksum offload Ferruh Yigit
2018-07-18 15:05 ` [dpdk-dev] [PATCH v3 " Pavan Nikhilesh
2018-07-18 15:05   ` [dpdk-dev] [PATCH v3 2/2] net/thunderx: add support for Rx VLAN offload Pavan Nikhilesh
2018-07-18 17:30     ` Jerin Jacob
2018-07-18 17:27   ` [dpdk-dev] [PATCH v3 1/2] net/thunderx: enable Rx checksum offload Jerin Jacob
2018-07-19 13:15     ` Ferruh Yigit

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=5b4889f3-2b72-509d-216c-63d435d332f9@solarflare.com \
    --to=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=olivier.matz@6wind.com \
    --cc=pbhagavatula@caviumnetworks.com \
    --cc=rakesh.kudurumalla@cavium.com \
    --cc=rkudurumalla@caviumnetworks.com \
    --cc=santosh.shukla@caviumnetworks.com \
    --cc=shahafs@mellanox.com \
    --cc=thomas@monjalon.net \
    /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).