summaryrefslogtreecommitdiff
path: root/Template
blob: 0847cdbf93c6ee8adb390799724b370491e8e88d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
define TOOL_templ
  include $(1)/Makefile
  $(1) $(1)%: BUILD_DIR := $(1)
  $(1) $(1)%: CFLAGS += $$($(1)-eflags)
  $(1)_prehook:
	$(Q)echo "$(bold)$(WHAT) $(1):$(normal)"
  $(1): $(1)_prehook $$($(1)-lex) $$($(1)-yacc) $$(patsubst %.o,$(1)/%.o,$$($(1)-objs))
  $(1)_clean: $(1)_clean_custom
	$(Q)$$(call RM,$(1)/*.o $(1)/$(1) $(1)/*.gz)
  $(1)_do_install:
	$(Q)$$(call INSTX,$(1)/$(1),$$(DESTDIR)$$(SBINDIR))
	$(Q)$(GZIP) $(1).8 > $(1)/$(1).8.gz
	$(Q)$$(call INST,$(1)/$(1).8.gz,$$(DESTDIR)$$(MAN8DIR))
	$(Q)$$(foreach file,$$($(1)-confs),$$(call INST,$$(file),$$(DESTDIR)$$(ETCDIRE));)
  $(1)_install: $(1)_do_install $(1)_post_install
  $(1)_uninstall: $(1)_uninstall_custom
	$(Q)$$(call RM,$$(DESTDIR)$$(SBINDIR)/$(1))
	$(Q)$$(call RM,$$(DESTDIR)$$(MAN8DIR)/$(1).8.gz)
  $(1)/%.yy.o: $(1)/%.yy.c
	$$(CCQ) $$(CFLAGS) -o $$@ -c $$<
  $(1)/%.tab.o: $(1)/%.tab.c
	$$(CCQ) $$(CFLAGS) -o $$@ -c $$<
  $(1)/%.o: %.c %.h
	$$(CHECK) $$(CFLAGS) $$(CHECKFLAGS) $$<
	$$(CCQ) $$(CFLAGS) -o $(1)/$$(shell basename $$@) -c $$<
  $(1)/%.o: %.c
	$$(CHECK) $$(CFLAGS) $$(CHECKFLAGS) $$<
	$$(CCQ) $$(CFLAGS) -o $(1)/$$(shell basename $$@) -c $$<
endef
packet-loop-back&id=40e64e07213201710a51e270595d6e6c028f9502&id2=d8f7750a08968b105056328652d2c332bdfa062d'>diff)
nvmet-rdma: Don't use the inline buffer in order to avoid allocation for small reads
Under extreme conditions this might cause data corruptions. By doing that we we repost the buffer and then post this buffer for the device to send. If we happen to use shared receive queues the device might write to the buffer before it sends it (there is no ordering between send and recv queues). Without SRQs we probably won't get that if the host doesn't mis-behave and send more than we allowed it, but relying on that is not really a good idea. Signed-off-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat