From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 94A9BA0540; Mon, 22 Aug 2022 17:09:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 840F940A81; Mon, 22 Aug 2022 17:09:15 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2073.outbound.protection.outlook.com [40.107.92.73]) by mails.dpdk.org (Postfix) with ESMTP id 3FFD940694; Mon, 22 Aug 2022 17:09:14 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=etg9yuzyLfYJH46WBR4m1CIwAarjWvCr2XMk/L8bBDoUn1s73Nd3zGFUIHkz0QNB4VZ34O56/Gr5uzjk+R1xmzrWnq7PkYKpRIpzyDfVngKooZmbDnMfrNQfdYbn1OmkVpVDO2JZ5dDn+4cTV9QSd85GYAC1VJs2mJ96hrhrBR9ae/hLIRmJcZp36/7G/7p32eFQgfLk6PoQ2qnu6UkLeqOPBCbRJWi6EYDFDD4JpoG0oZy6wQks+AenIumJoe30w8pY4NH4+OS8loWCCKCjHNY6Sea/qhHtm7zgHWzBfntqglGGJHoDws8hb3mBWBZMzkVGPyltgNGK2tMlGlKHWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Q0fcn9BQYvTFO8i7NtLC5oldb2NO+Auny88ZuBNVKKU=; b=ULfm8mx+5Eq6whEAYqz0YnELWeLpymDyICmRyw1fBT1Jwu8hcLpx0NVwjGyvySTpKkBXVESEQX3slBqzFwEeHwfztLs3svqai3BVxYkbd7VFwdGxgQQsg9DswWtoiX/s45jg8KmYl8i4kr4EMjkbgM9HocgnH70NU+SNq1bHOsVUZkEQ9YnSNy1rgROkorw5Z2RTfso8qIvbfHpujFFkqhuB/7Ba/7d6WHcLlGQuARpeeseN/Ovqcw+EPY8bPAJeyWbEoO20eyCJQ7T9ALrqUlfUnHPYu7QvSsb9serLf3hnIQE+PzDiAu+079V7Vb/ZkFGtddXnGQbcVeIXYaBWAQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.80.198) smtp.rcpttodomain=microsoft.com smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Q0fcn9BQYvTFO8i7NtLC5oldb2NO+Auny88ZuBNVKKU=; b=cEo1JPaI4GLvh+3VsGL91itadsW8xKv5+2w0cp616t0Sbcd+GjE/+6U/8RHKGCSLWS+GAdPA6apTQTG1zisijPG0XcC5PfsN2juo9syJuJqQwiSQCuNGyJuGyRkh8/kjQpPU7VgWXgzkWzHRP7/mxrwA+kucEIGGRWla1yWLgRg= Received: from BN0PR04CA0039.namprd04.prod.outlook.com (2603:10b6:408:e8::14) by BL0PR02MB6481.namprd02.prod.outlook.com (2603:10b6:208:1c5::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.16; Mon, 22 Aug 2022 15:09:12 +0000 Received: from BN1NAM02FT047.eop-nam02.prod.protection.outlook.com (2603:10b6:408:e8:cafe::6) by BN0PR04CA0039.outlook.office365.com (2603:10b6:408:e8::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.18 via Frontend Transport; Mon, 22 Aug 2022 15:09:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.80.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.80.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.80.198; helo=xir-pvapexch01.xlnx.xilinx.com; pr=C Received: from xir-pvapexch01.xlnx.xilinx.com (149.199.80.198) by BN1NAM02FT047.mail.protection.outlook.com (10.13.3.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5546.15 via Frontend Transport; Mon, 22 Aug 2022 15:09:12 +0000 Received: from xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) by xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Mon, 22 Aug 2022 16:09:11 +0100 Received: from smtp.xilinx.com (172.21.105.198) by xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Mon, 22 Aug 2022 16:09:11 +0100 Envelope-to: longli@microsoft.com, thomas@monjalon.net, david.marchand@redhat.com, dev@dpdk.org, sharmaajay@microsoft.com, sthemmin@microsoft.com, techboard@dpdk.org Received: from [10.71.194.74] (port=58588) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1oQ939-0005ke-4D; Mon, 22 Aug 2022 16:09:11 +0100 Message-ID: <3a64804d-3316-3042-4204-ca299d583749@xilinx.com> Date: Mon, 22 Aug 2022 16:09:10 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Subject: Re: [Patch v4 15/17] net/mana: add function to send packets Content-Language: en-US To: , Thomas Monjalon , David Marchand CC: , Ajay Sharma , Stephen Hemminger , "techboard@dpdk.org" References: <1657324171-31369-1-git-send-email-longli@linuxonhyperv.com> <1657324171-31369-16-git-send-email-longli@linuxonhyperv.com> From: Ferruh Yigit In-Reply-To: <1657324171-31369-16-git-send-email-longli@linuxonhyperv.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bb9663a5-cdeb-4b84-e739-08da8450457a X-MS-TrafficTypeDiagnostic: BL0PR02MB6481:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1WWnhte19HyJKiQAjDnEmNlCRRZDA1wxeXCjPFtO0qqb+wLNpdTyCBvlG0o4zLXauQvsqJgee/sSNiOvUsck0iL0CgsYsfkejBIm17u5bDy4InZrPSDVdMnosecC3Ql6l1MXeDpPUl5sd+dBII+DJGPWlLJbcC0ojPApnnVlAXisOoBmPfk/+ytwNwJs0tSVrdwO3ApTwEklb1BTYAxk1XO8FHuOKXkKE/SFFwB80gBw0zmyzfEEhJBI9xGITAZy10LzkvMLMgcFe8dpGRT1rZaTzHq7o3/nhITtQjHPxvAeJbie222Z+YIeXoLdHzAxSsyHUwCZlV3OpfxK2X4/L3Yjl6UZcYp+iQmNQ7SFMjzMkSjv3dueqHhJ84/dhyJv1OXR2HVlPVZwdMK3ffEt+SZziVuUnNzsa/kH1ItkJht/YqmcciRji2SD9ymQjinVyxDMGiEX/CbEB72xRls4mOqlLWlt30W2w/zirHueC53KQ5SiDQXnXnZryEtzRjgGJmMff1Q2gquf8HdSGUCFXVjedXZtT58r4ncOgyv0kPrDbU19pA4ESVFP5Kug5cgRmqX6jb7WuLI5OUsTkfnPF2j4gywSi7K3kjNDyQY+nEl8QWD5MccKW5raPENEbqblsG2Ly0+fQW4Jh3HkhH6Kq+E9rus/6wpxNqmKf/vbDmia5Lq9p1Us3ww79y/ExZ5EckmUiaoVHOTIq+IpR8YtsmqIWKiVgp1E6wKDovY501nWml4VMlDVNtM8XXU++3GPMO/yuwZAIrdW1iiCQXZNKDCntATGZCvbGc9R8sWSs07+1BkvsToA21mX1MwFDx4RDg8RcY/rAfwfFv6GDPsRFw== X-Forefront-Antispam-Report: CIP:149.199.80.198; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:xir-pvapexch01.xlnx.xilinx.com; PTR:unknown-80-198.xilinx.com; CAT:NONE; SFS:(13230016)(4636009)(346002)(396003)(376002)(39860400002)(136003)(40470700004)(36840700001)(46966006)(40480700001)(478600001)(83380400001)(316002)(26005)(82310400005)(45080400002)(426003)(336012)(54906003)(110136005)(47076005)(31686004)(36756003)(36860700001)(2616005)(186003)(82740400003)(70586007)(8676002)(4326008)(70206006)(7636003)(2906002)(53546011)(41300700001)(44832011)(31696002)(40460700003)(356005)(5660300002)(8936002)(9786002)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2022 15:09:12.2560 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bb9663a5-cdeb-4b84-e739-08da8450457a X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.80.198]; Helo=[xir-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: BN1NAM02FT047.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR02MB6481 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 7/9/2022 12:49 AM, longli@linuxonhyperv.com wrote: > CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email. > > > From: Long Li > > With all the TX queues created, MANA can send packets over those queues. > > Signed-off-by: Long Li > --- > Change log: > v2: > Rename all camel cases. > <...> > + > + DRV_LOG(DEBUG, "pkt[%d]: buf_addr 0x%p, nb_segs %d, pkt_len %d", > + pkt_idx, m_pkt->buf_addr, m_pkt->nb_segs, > + m_pkt->pkt_len); > + > + /* Create SGL for packet data buffers */ > + for (uint16_t seg_idx = 0; seg_idx < m_pkt->nb_segs; seg_idx++) { This is C99 feature and we tend to not use it BUT, Thomas, David, In the past there were c89/c90/ansi code in DPDK, but as far as I can see no more left. Is there anything that prevents us using C99 features, like variable in the for loop, I think it is usefull that it reduces the scope and makes code more readable, etc...