Re: [PATCH 1/2] bpf, docs: prune all references to "internal BPF"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/15/21 2:07 PM, Christoph Hellwig wrote:
The eBPF name has completely taken over from eBPF in general usage, so
prune all remaining references to "internal BPF".

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---
  Documentation/networking/filter.rst | 22 +++++++++++-----------
  arch/arm/net/bpf_jit_32.c           |  2 +-
  arch/arm64/net/bpf_jit_comp.c       |  2 +-
  arch/sparc/net/bpf_jit_comp_64.c    |  2 +-
  arch/x86/net/bpf_jit_comp.c         |  2 +-
  kernel/bpf/core.c                   |  4 ++--
  net/core/filter.c                   | 11 +++++------
  7 files changed, 22 insertions(+), 23 deletions(-)

[...]
diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c
index eeb6dc0ecf463..a00821e820019 100644
--- a/arch/arm/net/bpf_jit_32.c
+++ b/arch/arm/net/bpf_jit_32.c
@@ -163,7 +163,7 @@ static const s8 bpf2a32[][2] = {
  	[BPF_REG_9] = {STACK_OFFSET(BPF_R9_HI), STACK_OFFSET(BPF_R9_LO)},
  	/* Read only Frame Pointer to access Stack */
  	[BPF_REG_FP] = {STACK_OFFSET(BPF_FP_HI), STACK_OFFSET(BPF_FP_LO)},
-	/* Temporary Register for internal BPF JIT, can be used
+	/* Temporary Register for eBPF JIT, can be used

Thanks for the cleanup! For the code occurrences with 'internal BPF', I would
just drop the term 'internal' so it's only 'BPF' which is consistent with the
rest in the kernel. Usually eBPF is implied given all the old cBPF stuff is
translated to it anyway. Bit confusing, but that's where it converged over the
years in the kernel including git log. eBPF vs cBPF unless it's explicitly
intended to be called out (like in the filter.rst docs).

  	 * for constant blindings and others.
  	 */
  	[TMP_REG_1] = {ARM_R7, ARM_R6},
[...]
diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
index 2405e39d800fe..355aa51899d62 100644
--- a/kernel/bpf/core.c
+++ b/kernel/bpf/core.c
@@ -1891,7 +1891,7 @@ static void bpf_prog_select_func(struct bpf_prog *fp)
/**
   *	bpf_prog_select_runtime - select exec runtime for BPF program
- *	@fp: bpf_prog populated with internal BPF program
+ *	@fp: bpf_prog populated with eBPF program
   *	@err: pointer to error variable
   *
   * Try to JIT eBPF program, if JIT is not available, use interpreter.
@@ -2300,7 +2300,7 @@ static void bpf_prog_free_deferred(struct work_struct *work)
  	}
  }
-/* Free internal BPF program */
+/* Free eBPF program */

nit: We can probably just drop that comment since it's not very useful anyway
and already implied by the function name.

  void bpf_prog_free(struct bpf_prog *fp)
  {
  	struct bpf_prog_aux *aux = fp->aux;
diff --git a/net/core/filter.c b/net/core/filter.c
index e471c9b096705..634e21647fe30 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -1242,10 +1242,9 @@ static struct bpf_prog *bpf_migrate_filter(struct bpf_prog *fp)
  	int err, new_len, old_len = fp->len;
  	bool seen_ld_abs = false;
- /* We are free to overwrite insns et al right here as it
-	 * won't be used at this point in time anymore internally
-	 * after the migration to the internal BPF instruction
-	 * representation.
+	/* We are free to overwrite insns et al right here as itwon't be used at

nit: itwon't

+	 * this point in time anymore internally after the migration to the eBPF
+	 * instruction representation.> diff --git a/Documentation/networking/filter.rst b/Documentation/networking/filter.rst



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux