DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Bing Zhao <bingz@nvidia.com>,
	Slava Ovsiienko <viacheslavo@nvidia.com>,
	Matan Azrad <matan@nvidia.com>, Ori Kam <orika@nvidia.com>,
	Thomas Monjalon <tmonjalon@nvidia.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, Raslan Darawsheh <rasland@nvidia.com>
Subject: Re: [dpdk-dev] [PATCH v2 2/2] net/mlx5: add flow sync API
Date: Fri, 30 Oct 2020 08:59:12 +0000
Message-ID: <201fbdd1-afa7-4f9d-786f-387b7e4220bd@intel.com> (raw)
In-Reply-To: <CY4PR1201MB00726895AD45B579CACB29B1D0150@CY4PR1201MB0072.namprd12.prod.outlook.com>

On 10/30/2020 5:37 AM, Bing Zhao wrote:
> Hi Ferruh,
> Thanks for your comments.
> PSB
> 
>> -----Original Message-----
>> From: Ferruh Yigit <ferruh.yigit@intel.com>
>> Sent: Friday, October 30, 2020 6:43 AM
>> To: Slava Ovsiienko <viacheslavo@nvidia.com>; Bing Zhao
>> <bingz@nvidia.com>; Matan Azrad <matan@nvidia.com>; Ori Kam
>> <orika@nvidia.com>
>> Cc: dev@dpdk.org; Raslan Darawsheh <rasland@nvidia.com>
>> Subject: Re: [dpdk-dev] [PATCH v2 2/2] net/mlx5: add flow sync API
>>
>> External email: Use caution opening links or attachments
>>
>>
>> On 10/27/2020 3:42 PM, Slava Ovsiienko wrote:
>>> Hi, Bing
>>>
>>> Release notes / mlx5 features documentation update?
>>> Beside this:
>>> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
>>>
>>>> -----Original Message-----
>>>> From: Bing Zhao <bingz@nvidia.com>
>>>> Sent: Tuesday, October 27, 2020 16:47
>>>> To: Slava Ovsiienko <viacheslavo@nvidia.com>; Matan Azrad
>>>> <matan@nvidia.com>; Ori Kam <orika@nvidia.com>
>>>> Cc: dev@dpdk.org; Raslan Darawsheh <rasland@nvidia.com>
>>>> Subject: [PATCH v2 2/2] net/mlx5: add flow sync API
>>>>
>>>> When creating a flow, the rule itself might not take effort
>>>> immediately once the function call returns with success. It would
>>>> take some time to let the steering synchronize with the hardware.
>>>>
>>>> If the application wants the packet to be sent to hit the flow
>> after
>>>> it is created, this flow sync API can be used to clear the
>> steering
>>>> HW cache to enforce next packet hits the latest rules.
>>>>
>>>> For TX, usually the NIC TX domain and/or the FDB domain should be
>>>> synchronized depends in which domain the flow is created.
>>>>
>>>> The application could also try to synchronize the NIC RX and/or
>> the
>>>> FDB domain for the ingress packets.
>>>>
>>>> Signed-off-by: Bing Zhao <bingz@nvidia.com>
>>>> Acked-by: Ori Kam <orika@nvidia.com>
>>
>> <...>
>>
>>>> @@ -8169,3 +8179,17 @@ int mlx5_alloc_tunnel_hub(struct
>>>> mlx5_dev_ctx_shared *sh)
>>>>               mlx5_free(thub);
>>>>       return err;
>>>>    }
>>>> +
>>>> +int rte_pmd_mlx5_sync_flow(uint16_t port_id, uint32_t domains) {
>>>> +    struct rte_eth_dev *dev = &rte_eth_devices[port_id];
>>>> +    const struct mlx5_flow_driver_ops *fops;
>>>> +    int ret;
>>>> +    struct rte_flow_attr attr = { .transfer = 0 };
>>>> +
>>>> +    fops = flow_get_drv_ops(flow_get_drv_type(dev, &attr));
>>>> +    ret = fops->sync_domain(dev, domains,
>>>> MLX5DV_DR_DOMAIN_SYNC_FLAGS_HW);
>>>> +    if (ret > 0)
>>>> +            ret = -ret;
>>>> +    return ret;
>>>> +}
>>
>> This is causing build error in the travis [1], I guess this is
>> related to the rdma-core version, is the
>> 'MLX5DV_DR_DOMAIN_SYNC_FLAGS_HW' check required in the header like
>> other usages?
>>
>> Also 'MLX5DV_' macros seems used in 'mlx5_flow_dv.c', is it expected
>> to use it in this file? (just high-level observation, no idea on
>> details.)
> 
> I send a fix for this already yesterday, and the issue should be solved.
> That fix could be squashed.
> http://patches.dpdk.org/patch/82652/
> 

Got it, let me squash it in the next-net, and I will test again.

>>
>> [1]
>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftr
>> avis-
>> ci.org%2Fgithub%2Fferruhy%2Fdpdk%2Fjobs%2F740008969&amp;data=04%7C01
>> %7Cbingz%40nvidia.com%7C59346fa41fce41e08cce08d87c5c1667%7C43083d157
>> 27340c1b7db39efd9ccc17a%7C0%7C0%7C637396082238282132%7CUnknown%7CTWF
>> pbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI
>> 6Mn0%3D%7C1000&amp;sdata=HGY7vbWWR5ZdIikv39IzZAYcdsJq1FvGjuonClJo%2B
>> Pc%3D&amp;reserved=0
>>
>>
>>
>> btw, I just recognized that the patch acked with exception, is the
>> documentation requested above (with ack) provided?
> 
> This is a quite simple internal API. The usage and the information are listed in the API doxygen comments.
> Do I need to list it in the doc?
> 

That is the request from @Slava above.


  reply	other threads:[~2020-10-30  8:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-09 15:01 [dpdk-dev] [PATCH] " Bing Zhao
2020-10-11 14:03 ` Ori Kam
2020-10-27 14:46 ` [dpdk-dev] [PATCH v2 1/2] common/mlx5: add glue function for domain sync Bing Zhao
2020-10-27 14:46   ` [dpdk-dev] [PATCH v2 2/2] net/mlx5: add flow sync API Bing Zhao
2020-10-27 15:42     ` Slava Ovsiienko
2020-10-29 22:43       ` Ferruh Yigit
2020-10-30  5:37         ` Bing Zhao
2020-10-30  8:59           ` Ferruh Yigit [this message]
2020-10-27 15:41   ` [dpdk-dev] [PATCH v2 1/2] common/mlx5: add glue function for domain sync Slava Ovsiienko
2020-10-27 22:30   ` Raslan Darawsheh

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=201fbdd1-afa7-4f9d-786f-387b7e4220bd@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=bingz@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=tmonjalon@nvidia.com \
    --cc=viacheslavo@nvidia.com \
    /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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git