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 29406A034C for ; Mon, 12 Dec 2022 12:28:11 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0C5BA4114B; Mon, 12 Dec 2022 12:28:03 +0100 (CET) Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2101.outbound.protection.outlook.com [40.107.105.101]) by mails.dpdk.org (Postfix) with ESMTP id D9BC240156 for ; Wed, 7 Dec 2022 15:12:37 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TTS2bG080UyKo/wtnQJwp52jMFlYQvJnIe9BmvIYUbzM6E/DDX8ZnIxQFySTpB4oCNE6/WGAbdSmRiM4eac6cIKvoSXF5IBXVBuZiqKr6n2hPELLMewJihlIR9YkfVYcgyKxi9vyTR09vpgtzuTFx3OmKc+2GwsTc4jqKODlSsTc1Aeu6H7/RsSrj+eSol5k62/fgHu6VrT13cEDWKBBetIDK3X7r9YhkBs0fj5xzu16b9ROwFa2IMoXX1RP8hKu4hRO0G61Ks+zveajuZCu+q+44H3apan7D2zKztwRTdohybu5bjDpnpTDPigxL5uS1S2JIQXpYDPH3hpTqAwQqA== 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=/CQFQuRKQInGDV8xTElWguEZor+Q6vs0tnCifAz7fGY=; b=f1UAWVuG3LEqSNym/W8jPFrSZizA0j2roeus1SnmRs/u0+HqmEifFg1nigM9ARi4XDxZ62zElhepQVNT+pX80L+5nD5BnzoU7Yyj6Gr5hhMU+wIxdKrdhQAfUvgF7jtP0NvIv5WgoLzWjQRzaH+cHattTKtWKRoMKWUEqEoWTvsW0Zg5Xbo/lx/LIQVsg0OiUkvOVx2MnvUKaHGF6HXa+NSpOp35fDiL5nzaSKgUXpsZGPRqppSDoNk7kWrWWZQ3gMCgCTi9oPBLCtiZU+rCpw71/teu8hUv5uYwEKevksogZJ7KDMJUHnR4EG4K89WMMmPkL14bEpfprL+3gPbGZw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nokia.com; dmarc=pass action=none header.from=nokia.com; dkim=pass header.d=nokia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/CQFQuRKQInGDV8xTElWguEZor+Q6vs0tnCifAz7fGY=; b=qetxdkcQMCHUlwBueJGiItafYCQ3/gdyo5T9EDX4+A6rlN2F+547ugldwQhzZsBQjj6mr60RcCDpPFsoswe6Np9BbO0kGQrxO9T9LTZnAqDIJ+FFEdVPAz1BhngrJwJG4A1htqoFS1EwT0PuoYuqaM//hcu4bndsIXIwVmpqDSU= Received: from HE1PR07MB3465.eurprd07.prod.outlook.com (2603:10a6:7:2c::20) by DB9PR07MB7260.eurprd07.prod.outlook.com (2603:10a6:10:21c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.14; Wed, 7 Dec 2022 14:12:36 +0000 Received: from HE1PR07MB3465.eurprd07.prod.outlook.com ([fe80::781d:8ecb:1b08:55e]) by HE1PR07MB3465.eurprd07.prod.outlook.com ([fe80::781d:8ecb:1b08:55e%7]) with mapi id 15.20.5880.014; Wed, 7 Dec 2022 14:12:36 +0000 From: "Ciprian Pascu (Nokia)" To: "users@dpdk.org" , "bruce.richardson@intel.com" Subject: VS: DPDK issue with reading the eth interface status? Thread-Topic: DPDK issue with reading the eth interface status? Thread-Index: AdkKQ7+DkoE10txDRke6pahlaPflQgAAfdDw Date: Wed, 7 Dec 2022 14:12:36 +0000 Message-ID: References: In-Reply-To: Accept-Language: fi-FI, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nokia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: HE1PR07MB3465:EE_|DB9PR07MB7260:EE_ x-ms-office365-filtering-correlation-id: f2fb7005-c415-4c2f-8688-08dad85d178e x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 796c46/ot6FzXiJ9RSQdpiMyfglFXXn4TYfd5h6aFD2belNm4f9+pm3B7lD7QBopn0bhmAGRs6mh3ZvNBv1uO3P+IHRuttp2FrTTGJsK/se3HgtgbSTxxGUVJue4weglDGVzcGNxq63na+PM6gFFIkQVlaLNCC84/spmUsOs3S0n0R6QRA6NZgx3Rt6qOkAoDzdnmLyuVP18Xbv3TNuxxktyQLhqK+i82aO7Sx+sBaugS+mJBTfs096zIIQsraiuSFRpPpWbZ6rFEjkDZksIeatmq2SDQH5QJcD9jDzTVQy+rjH4NtA0HuIUoDPvjOb3UhQo8A+0fG0ZfAY0v1YxBFYQUCV8dv7aRH2XXQKZnmAKlw2LYA6K/FrqlxbJnRmWyMOHkkz58hkaU6HdaxfE9X7Y6UskThvtXrIWA4uLTG272KQq9A6R4YYlTAxz1tjm5pH4RjteKceZZzGRWI/H3dwEzAM00XMxjWDKS4kKPEC8euIROZuH1IMW6npmPIXYnXHcYGhjMoFtg/HKdrQWaWJxRgAJkduYW0IXmomO1QTrxP7OY75PZIm5+b9k2pSiUdldZlE19KD722FF2/HnDfv0Zw0tCwhgKp/GDc8BheW8VnGMnpdWmZAFokxyahrOsXLOVUt8QjsBU8MicPEAMA/bMz7xu+hIRKEZD+ce5MpkifURRTEJPAAKhBmLITZ89E33yD5HoaFaN9x3fhJ9sQ7eemaeOZWIar5HUBnC8yM= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HE1PR07MB3465.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(376002)(136003)(39860400002)(366004)(346002)(396003)(451199015)(66574015)(19627405001)(86362001)(966005)(71200400001)(33656002)(478600001)(6506007)(7696005)(55016003)(38070700005)(166002)(9686003)(122000001)(82960400001)(186003)(38100700002)(2940100002)(83380400001)(5660300002)(52536014)(316002)(41300700001)(66476007)(26005)(8936002)(110136005)(76116006)(66556008)(8676002)(2906002)(66446008)(66946007)(64756008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?iA5VnwAuST+ZgN/KNjJ+H1oF+fk5ESaUnCKsiTlCleDH929U/E8rR73Ki1?= =?iso-8859-1?Q?5GlAZwUB8XRheD5zqbmCBCEUQ1CVciUQD7v1z5Qt5VXneLfF7O2rqoiNO/?= =?iso-8859-1?Q?0k/95ozMMS4EZuyEKBObaHRl9yeTlmh1BsoIKw19kxxwLmde2bKQTM2zsj?= =?iso-8859-1?Q?s0gn+W9zB8PWijsIiSya3z4TBwRx2KMMSOGuDpyFvRJK674ZPebjTrN+V2?= =?iso-8859-1?Q?GNziy+cnG7FuWMUcfeVzgOhvBx0Ezg887YqJ1AV5a6tAxM2btIl2xv9Z3I?= =?iso-8859-1?Q?CzzqX2+rNjS4jKlVTZyMgp6/PYlKJNCNF9u54vZqjhGzRTsjAkf/maT+IR?= =?iso-8859-1?Q?bRXpSIwETP2iEW0thDolsiDnUUvQv667nXuVHvgSKrE3V4T+FOW7LWNzEu?= =?iso-8859-1?Q?CqlgGPyh+zHSXn6G6EW6yHOAE376gA+hnd03Uzoa0NF2jFoFWQfv8aTAde?= =?iso-8859-1?Q?Ij+zyfpJtpg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et4NbDhVrLM?= =?iso-8859-1?Q?eCGFL+T7okYEIzlpaZF3X7n3GZXuYvRtS8BQ03dwG1USpcncMs6HwGHnqs?= =?iso-8859-1?Q?ujlRSZbGXPSxm3QTM+PSohbYghA6lghzsV1eeO1bafynOS460Qa4IG9iuk?= =?iso-8859-1?Q?96QUEQWiEu9q1yD+4kP7iwc0yLwX0wt/mqxm5YRpyNLL0xvRawTswlZ7Ke?= =?iso-8859-1?Q?A7i19BWwM+zuRPeX05kfOLeJ59Ll2zOrswSP6egAN7/b6FfqVMORzjhkHH?= =?iso-8859-1?Q?psOKhPTNvfo2euva8UW7m5/0pp6XN97yeD?= Content-Type: multipart/alternative; boundary="_000_HE1PR07MB346505BDEB295E1751BF627DE31A9HE1PR07MB3465eurp_" MIME-Version: 1.0 X-OriginatorOrg: nokia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: HE1PR07MB3465.eurprd07.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f2fb7005-c415-4c2f-8688-08dad85d178e X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Dec 2022 14:12:36.4496 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: NEdgZalQpH3EL4OcvxAHMI7F61KMKOx664t3ewosJEO9aw521CAGugqonoYHXOKjYGZQUeHJa/ECWm+GBMHBFA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR07MB7260 X-Mailman-Approved-At: Mon, 12 Dec 2022 12:28:00 +0100 X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org --_000_HE1PR07MB346505BDEB295E1751BF627DE31A9HE1PR07MB3465eurp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable It seems that in the Linux kernel some locking has been added with this com= mit: https://github.com/torvalds/linux/commit/83d0feffc5695d7dc24c6b8dac9ab= 265533beb78: spin_lock_irqsave(&adapter->cmd_lock, flags); VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, VMXNET3_CMD_GET_LINK); ret =3D VMXNET3_READ_BAR1_REG(adapter, VMXNET3_REG_CMD); spin_unlock_irqrestore(&adapter->cmd_lock, flags); Ciprian. ________________________________ L=E4hett=E4j=E4: Ciprian Pascu (Nokia) L=E4hetetty: keskiviikko 7. joulukuuta 2022 15.57 Vastaanottaja: users@dpdk.org ; bruce.richardson@intel.com = Aihe: DPDK issue with reading the eth interface status? Hi, I encountered an issue while using dpdk-20.05 in our VMware based VMs: at t= imes, when sysstat data is collected, dpdk signals that some eth interface = is down; this happens occasionally; after sysstat data has been collected, = eth interface is signaled as up; I was wondering about these lines in '__vm= xnet3_dev_link_update' function: 1251 =BB=B7=B7=B7=B7=B7=B7=B7VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD, VM= XNET3_CMD_GET_LINK); 1252 =BB=B7=B7=B7=B7=B7=B7=B7ret =3D VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_= CMD); Is this atomic? Could this lead to problems if some other module tries to r= ead something else at about the same time and overwrites the command? Thanks, Ciprian. --_000_HE1PR07MB346505BDEB295E1751BF627DE31A9HE1PR07MB3465eurp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

It seems that in the Linux kernel some locking has been added with = this commit: https://github.com/torvalds/linux/commit/83d0feffc5695d7dc24c6b8dac9ab26553= 3beb78:

 

spin_lock_irqsave(&ad= apter->cmd_lock, flags);

 

VMXNET3_WRITE_BAR1_REG(adapt= er, VMXNET3_REG_CMD, VMXNET3_CMD_GET_LINK);

 

ret =3D VMXNET3_READ_BAR1_RE= G(adapter, VMXNET3_REG_CMD);

spin_unlock_irqrestore(&a= mp;adapter->cmd_lock, flags);

 

 

Ciprian.

 

 


L=E4hett=E4j=E4: Ciprian Pascu (Nokia)
L=E4hetetty: keskiviikko 7. joulukuuta 2022 15.57
Vastaanottaja: users@dpdk.org <users@dpdk.org>; bruce.richards= on@intel.com <bruce.richardson@intel.com>
Aihe: DPDK issue with reading the eth interface status?
=

 

Hi,

I encountered an issue while using dpdk-20.05 in our V= Mware based VMs: at times, when sysstat data is collected, dpdk signals tha= t some eth interface is down; this happens occasionally; after sysstat data has been collected, eth interface is signaled as up; I = was wondering about these lines in ‘__vmxnet3_dev_link_update’ = function:

 

1251 =BB=B7=B7=B7=B7=B7=B7=B7VMXNET3_WRITE= _BAR1_REG(hw, VMXNET3_REG_CMD, VMXNET3_CMD_GET_LINK);

1252 =BB=B7=B7=B7=B7=B7=B7=B7ret =3D VMXNE= T3_READ_BAR1_REG(hw, VMXNET3_REG_CMD);

 

Is this atomic? Could this lead to problems if some ot= her module tries to read something else at about the same time and overwrit= es the command?

 

 

Thanks,

Cip= rian.

 

--_000_HE1PR07MB346505BDEB295E1751BF627DE31A9HE1PR07MB3465eurp_--