From nobody Wed Oct 02 07:42:14 2024 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJRbZ6zTdz5Y7Kp for ; Wed, 02 Oct 2024 07:42:18 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XJRbZ6b1Qz4hSc; Wed, 2 Oct 2024 07:42:18 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qt1-x82e.google.com with SMTP id d75a77b69052e-45aeed46f5eso28732311cf.3; Wed, 02 Oct 2024 00:42:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727854938; x=1728459738; darn=freebsd.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :from:to:cc:subject:date:message-id:reply-to; bh=eNHJRR6x0HAFlpQvySe5D5tvAkfo6y4E792qGbiVAZM=; b=clrWlG2I3XdnX1lc9tKOsA4d0xKKVjgkTghLY7B134oSr3wjxLrlBLdgMEZWFBKJFz 4MZbgbfJloMF5LWsxiPWo4I33M54/gKhGz+vGCLUhlu04m7aI+YYgEcFerpieoq5eDCy 39ydYqf/v7znlV1Rkj6Y9CN6LQoj3Q9HPHZNOKhRkvZArVwWpJUOZJKkYhe5D1Tp0mSx ZCKvmDBlx3rNsLQsIp52K3DAgKIkndR4c8ZmYGlHOrVFKBCVIifyi/D0D1fPaaWOm/9d y/xC9yGZmr5nF893E4YhacYCH3Kbu7KJeOXUIEcA9MLQRRA+KSTQh2XZw4e7kDx1dPOp dwYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727854938; x=1728459738; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=eNHJRR6x0HAFlpQvySe5D5tvAkfo6y4E792qGbiVAZM=; b=rKMS8EOZhVcabEfyILeex1fLkwIHyxnYFHsB8KLqv0GiLGyhdEp1lSdf2mBmNbM+1x C6hLdoRv54ur6Olc20WVG/wtcYow1eoE8tOS/iP+LJt1zLj9mXhxbYo2QtHwjS8GlNDi +o7QKRvYpRWLbDZ5LXQ83qHEYLdbUVA2qtQTJe2TB8126vszvcuujTiH7AS14DScoERo jiiTfDOlN7LvY4f2955cDqbmF2tDGT32qsNYwUyBqToivZRCW85pR6q+77EJ7lWAeNff 4O+yMPCoetUszk3i8xy0ge+tbJ6IeB57Sbrzby/5ovdAi1GdM7WP7b42Fb7kN+LwX9cu oZeQ== X-Forwarded-Encrypted: i=1; AJvYcCWC2zgBbOk+siJwzkkbLuRAEq00ViYclhc4IgcYgb2dwim7HAYzyJROqvz+SJ7fPRjkLS1VfGv+NunsPg==@freebsd.org X-Gm-Message-State: AOJu0YwrfD1G6WSJVVwirzAbo4FK77eoBpKwYK3nxwWKAxAkPnbaZej+ SP4Sxt0TQVtjI74XNA7+5cTNSxpHUzd4BaHq/0K26908gEZW/tTt X-Google-Smtp-Source: AGHT+IG5Ej2yUjGI2ouscEFv3CRFhu1kkMy3YrqHEgAbZuvNEkzON4oGoLoT46yNObu7DGT8Zqfo5g== X-Received: by 2002:a05:622a:553:b0:458:44a2:2524 with SMTP id d75a77b69052e-45d804c3b05mr30949271cf.14.1727854937971; Wed, 02 Oct 2024 00:42:17 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6cb3b680ce6sm57925816d6.121.2024.10.02.00.42.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Oct 2024 00:42:16 -0700 (PDT) Date: Wed, 2 Oct 2024 03:42:14 -0400 From: Mark Johnston To: Franco Fichtner Cc: Zhenlei Huang , FreeBSD Net Subject: Re: CALL FOR TEST axgbe promisc mode Message-ID: References: <31932BD6-8427-4E68-8496-81AADCE9E290@FreeBSD.org> <54063277-FDC6-4B69-914E-08044E09346F@opnsense.org> List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <54063277-FDC6-4B69-914E-08044E09346F@opnsense.org> X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4XJRbZ6b1Qz4hSc X-Spamd-Bar: ---- On Tue, Oct 01, 2024 at 12:46:07PM +0000, Franco Fichtner wrote: > Hi, > > > On 1. Oct 2024, at 02:47, Zhenlei Huang wrote: > > > > The test plan is simple, either of the following should suffice: > > > > • Do traffic sniffing on axgbe interface. The interface will enter promisc mode and should see packets not for us. > > I tested this with and without the patch and it's inconclusive: > > 1. tcpdump sees foreign packets with and without patch > 2. tcpdump -p sees foreign packets with and without patch That's somewhat surprising. > > This oddly enough matches my expectation that nobody raised issues about > promisc not working so far, but it leaves the question if we are/I am testing the > right thing? I think you are. BPF uses ifpromisc() to enable promiscuous mode, and tcpdump uses that interface rather than setting IFF_PPROMISC directly, and without the patch I expect that that's a bit broken. There is perhaps an unrelated driver bug there. I wonder what flags get printed by ifconfig before and during your experiments. It'd also be useful to try enabling debug logging (sysctl dev.ax.0.axgbe_debug_level=1, I think) to see if axgbe_if_promisc_set() is getting executed as expected. > > > Cheers, > Franco > > ax0: mem 0x80160000-0x8017ffff,0x80140000-0x8015ffff,0x80188000-0x80189fff at device 0.4 on pci6 > ax0: Using 512 TX descriptors and 512 RX descriptors > ax0: Using 4 RX queues 4 TX queues > ax0: Using MSI-X interrupts with 8 vectors > ax0: Ethernet address: XX:XX:XX:XX:XX:XX > ax0: xgbe_config_sph_mode: SPH disabled in channel 0 > ax0: xgbe_config_sph_mode: SPH disabled in channel 1 > ax0: xgbe_config_sph_mode: SPH disabled in channel 2 > ax0: xgbe_config_sph_mode: SPH disabled in channel 3 > ax0: RSS Enabled > ax0: Receive checksum offload Enabled > ax0: VLAN filtering Enabled > ax0: VLAN Stripping Enabled > ax0: Checking GPIO expander validity > ax0: GPIO configuration valid > ax0: SFP detected: > ax0: vendor: FS ax0: part number: SFP-10G-T ax0: revision level: A ax0: serial number: XXXXXXXXXXX ax0: netmap queues/slots: TX 4/512, RX 4/512 > ax0: Link is UP - 10Gbps/Full - flow control off > ax0: link state changed to UP > ax0: xgbe_config_sph_mode: SPH disabled in channel 0 > ax0: xgbe_config_sph_mode: SPH disabled in channel 1 > ax0: xgbe_config_sph_mode: SPH disabled in channel 2 > ax0: xgbe_config_sph_mode: SPH disabled in channel 3 > ax0: RSS Enabled > ax0: Receive checksum offload Disabled > ax0: VLAN filtering Disabled > ax0: VLAN Stripping Disabled > ax0: promiscuous mode enabled > ax0: promiscuous mode disabled