Skip to content

Instantly share code, notes, and snippets.

@hiroyuki-sato
hiroyuki-sato / gist:9975936
Last active April 6, 2024 14:50
おれおれVyOSの作り方。

VyOSの独自拡張の方法(ソースの修正は多分あってる)

ちょっとコマンド追加したVyOSを作りたいなという時に利用します。

カスタムパッケージの作成

自分のgithubなどにカスタムのvyatta-cfg-systemを作っておきます。 例では、https://github.com/hiroyuki-sato/vyatta-cfg-system.git を使います。

@hiroyuki-sato
hiroyuki-sato / infiniband.md
Last active January 14, 2024 12:21
Infiniband pib memo

alloc_fast_reg_mrはいつなくなったの?

[d9fe6dd7afaff529124dd7f49c2da89ef789a56f] IB/hfi1: Support ib_alloc_mr verb
running grep alloc_fast_reg_mr include/rdma/ib_verbs.h
	struct ib_mr *		   (*alloc_fast_reg_mr)(struct ib_pd *pd,
 * ib_alloc_fast_reg_mr - Allocates memory region usable with the
struct ib_mr *ib_alloc_fast_reg_mr(struct ib_pd *pd, int max_page_list_len);
d9f272c523db47a56a64942eb6f25361c400de66 is the first bad commit
@hiroyuki-sato
hiroyuki-sato / 00trace.txt
Created December 4, 2015 11:18
poppler debug
UPDATE BLEND DEBUG CairoOutputDev.cc:299
DEBUG CairoOutputDev.cc:570
blend mode: 0
CairoOutputDev.cc:311
restore
UPDATE BLEND DEBUG CairoOutputDev.cc:299
DEBUG CairoOutputDev.cc:570
blend mode: 0
CairoOutputDev.cc:311
restore
@hiroyuki-sato
hiroyuki-sato / gradle.txt
Created September 19, 2023 06:23
gradlew gemPush with JRuby 9.4.3.0
./gradlew gemPush
> Task :gemPush
Executing: `java org.jruby.Main -rjars/setup -S gem push /path/to/embulk-filter-calc/build/gems/embulk-filter-calc-0.2.1.pretest-java.gem --verbose`
with working directory at: /path/to/embulk-filter-calc/build/gems
with classpath: [ /Users/user/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/9.4.3.0/7324205fb4ad1b40d6aee488db6e72918f397ad4/jruby-complete-9.4.3.0.jar ]
Pushing gem to https://rubygems.org...
POST https://rubygems.org/api/v1/gems
ERROR: While executing gem ... (IOError)
Broken pipe
@hiroyuki-sato
hiroyuki-sato / embulk_setup.md
Last active June 28, 2023 04:57
Embulk v0.11 setup

Install Embulk itself

curl --create-dirs -o ~/.embulk/bin/embulk -L "https://dl.embulk.org/embulk-latest.jar"
chmod +x ~/.embulk/bin/embulk
echo 'export PATH="$HOME/.embulk/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Install JRuby

@hiroyuki-sato
hiroyuki-sato / file_system_book.md
Last active June 16, 2023 11:26
linuxのディスクI/O周りやxfsのソースコードを読めるようになるためのおすすめの参考資料募集中です
@hiroyuki-sato
hiroyuki-sato / gist:24af37c10a2bc1eb1de8
Last active June 3, 2023 07:26
Virshの使い方

virshの使い方

手順

  • poolの定義
  • volumeの作成
  • ゲストOSの作成

Poolの作成

# ./mlnxofedinstall --enable-sriov --msm
Logs dir: /tmp/MLNX_OFED_LINUX-2.3-2.0.0.13496.logs
This program will install the MLNX_OFED_LINUX package on your machine.
Note that all other Mellanox, OEM, OFED, or Distribution IB packages will be removed.
Do you want to continue?[y/N]:y
Starting MLNX_OFED_LINUX-2.3-2.0.0 installation ...
Installing mlnx-ofa_kernel RPM
# frozen_string_literal: true

require_relative "lib/hoge/version"

Gem::Specification.new do |spec|
  spec.name = "hoge"
  spec.version = Hoge::VERSION
  spec.authors = ["Hiroyuki Sato"]
  spec.email = ["e-mail"]

コマンド

set policy route PPPOE-IN rule 10 destination address 0.0.0.0/0
set policy route PPPOE-IN rule 10 protocol tcp
set policy route PPPOE-IN rule 10 tcp flags 'SYN,!ACK,!FIN,!RST'
set policy route PPPOE-IN rule 10 set tcp-mss 1414
set interface ethernet eth0 policy route PPPOE-IN

/sbin/iptables -L -n -t mangle