From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by mail.toke.dk (Postfix) with ESMTPS id C2FD1A91655 for ; Mon, 14 Oct 2024 20:10:44 +0200 (CEST) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=Zc99NQ03 Received: by mail-pg1-x533.google.com with SMTP id 41be03b00d2f7-7ea7d509e61so539929a12.1 for ; Mon, 14 Oct 2024 11:10:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728929382; x=1729534182; darn=xdp-project.net; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=VC0lie449FhX5PEmCXxHwXEALuCgHKKyis1bGYeW3dk=; b=Zc99NQ03OOEq6YU9N1d1luEJBjpXb2tlmnC+cZ8IQnhqN0f4Rt9rQtJ7tfvsvwkiQO 8MS1W7EOa1Cd3rVO/50isQC6kJtfaP0PJhY+DQlW6Ju+fb+qEIFT32K1dZuUBJGlGv52 OMdDTtCJn+h+SBiHtFk1xMpHcEPyGUghZsZ1GoiR/OxI2pHh9DUZlhvmP42jyfXzkmM5 nGEZHONbjlTJGRPsYSGiyUG/7+9VemBoUzxF8qtpBVOx9HOcFWjw+Y7e1+8Kpa7NoyMB GXh9QWIVki0LctVPvSJ1BzcMVmr9ztG1jhLqh0IkN46DMoYxlxSrsa7SPL9qpmTgjD0b +LaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728929382; x=1729534182; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=VC0lie449FhX5PEmCXxHwXEALuCgHKKyis1bGYeW3dk=; b=m6ju78ETfk31HwVdAICxMn17NpDvs3TmODbMCCbawqScLlnZHCZSvqNw2t2E7PsXtI MJltP5hhbHtc1XdjUY6bsaMeaaVY0Yl+UXaJQLR3hdZ6S1TLHDBzM7Fm4UhF1t9UjVPu 5QYo1txODCm42yYKexNyhDm2w8A2ZNS0FlcaterR+D4H+x4eg9BBUY70FIr8IhivY+NE 7gLuxGhaBdQTV4TSk1M1VRkGgGlQvKoJNngz8JyQKEPpKucLrEw6U25CCTfcFw3m7+wh JC2j1pEaeTMk1JXUpFR9TYsgcuJmQnjzhF0GPK/yOnEIAj9UxWNeGqzsxAQEcLerDXVG ksag== X-Forwarded-Encrypted: i=1; AJvYcCXAG11fPOqvDwnCt7Ot9ujoDsME3kcHZwQWYifNi8e8qlE/5SBpuyFgVv6J7k6r+lt7L6nyMU9OQA8=@xdp-project.net X-Gm-Message-State: AOJu0Yz9vS9Jxcj2BC5QvW2eto1JjspLkg0utyKI7EZ3g/nnVVTMegA2 9tVGXPnN5xf+bI5reEkIVkDbsqK4W4K/LnnaN0YN2QX55/Aq12I= X-Google-Smtp-Source: AGHT+IGsHNezMdFQEi6oBU2robbn+vVRkWDrAaV7hVAYWuxxKhtIe4uXaW46jDAXPhcy0g3ePRk7sQ== X-Received: by 2002:a17:90b:19c8:b0:2d1:bf48:e767 with SMTP id 98e67ed59e1d1-2e2f0d7c1f0mr13968728a91.29.1728929382168; Mon, 14 Oct 2024 11:09:42 -0700 (PDT) Received: from localhost ([2601:646:9e00:f56e:123b:cea3:439a:b3e3]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e2d5fa8ddesm9290448a91.39.2024.10.14.11.09.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Oct 2024 11:09:41 -0700 (PDT) Date: Mon, 14 Oct 2024 11:09:41 -0700 From: Stanislav Fomichev To: tianmuyang Message-ID: References: <90c1c6b53a654cf197eb412917fad31a@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <90c1c6b53a654cf197eb412917fad31a@huawei.com> Message-ID-Hash: 523MPUUNWE7AVTL2GB7L4PJ6O3P2I22U X-Message-ID-Hash: 523MPUUNWE7AVTL2GB7L4PJ6O3P2I22U X-MailFrom: stfomichev@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: "bpf@vger.kernel.org" , "larysa.zaremba@intel.com" , "ast@kernel.org" , "daniel@iogearbox.net" , "andrii@kernel.org" , "martin.lau@linux.dev" , "song@kernel.org" , "yhs@fb.com" , "john.fastabend@gmail.com" , "kpsingh@kernel.org" , "sdf@google.com" , "haoluo@google.com" , "jolsa@kernel.org" , "dsahern@gmail.com" , "kuba@kernel.org" , "willemb@google.com" , "brouer@redhat.com" , "anatoly.burakov@intel.com" , "alexandr.lobakin@intel.com" , "magnus.karlsson@gmail.com" , "mtahhan@redhat.com" , "xdp-hints@xdp-project.net" , "netdev@vger.kernel.org" , "willemdebruijn.kernel@gmail.com" , "alexei.starovoitov@gmail.com" , "simon.horman@corigine.com" , "Yanan (Euler)" , "Wuchangye (EulerOS)" , Xiesongyang , "Liuxin(EulerOS)" , "zhangmingyi (C)" , "liwei (H)" X-Mailman-Version: 3.3.10 Precedence: list Subject: [xdp-hints] Re: Questions about XDP hints List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 10/12, tianmuyang wrote: > Hi all: > There has been some discussions about adding checksum hint in AF_XDP such as this thread[1]. Now, we also plan to add checksum hint. My questions are: > 1. In this msg[2], is it appropriate if xdp_csum_status only includes 4 enums/macros(CHECKSUM_NONE...CHECKSUM_PARTIAL in skbuff.h)? Thus it becomes more generic. Also, in this msg[3] we can simply pass skb->ip_summed to csum_status in veth_xdp_rx_csum(). > 2. What should be taken care of if I want to add a new hint? IOW, what is acceptable to add a new hint? There is no clear guidance on what's acceptable and what's not. Each hint it evaluated case by case. IIRC, last time rx csum discussion stalled due to disagreement about the level of details which should be exposed from the generic kfuncs. Feel free to revive the discussion with another patchset. Regarding (1): the consensus seems to be (IIRC) is to expose tree cases only: no-csum, csum-unnecessary, csum-complete+csum. Anything else gets too device specific and too convoluted to handle on the xdp prog side. > Thanks! > > [1] https://lore.kernel.org/bpf/CAADnVQJPgpo7J0qVTQJYYocZ=Jnw=O5GfN2=PyAQ55+WWG_DVg@mail.gmail.com/ > [2] https://lore.kernel.org/bpf/20230728173923.1318596-13-larysa.zaremba@intel.com/ > [3] https://lore.kernel.org/bpf/20230728173923.1318596-18-larysa.zaremba@intel.com/ >