]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/devices/templates/default/udev.rules.erb
Completely disable faulty offloading on HP NC362i
[chef.git] / cookbooks / devices / templates / default / udev.rules.erb
index 27951c4fface6f9e199f277e097c6223ce9b2dbb..837362bb07bbbcb7e65af1fad38d1ed2638c5048 100644 (file)
@@ -3,6 +3,7 @@
 # HP Smart Array configuration
 ACTION=="add", SUBSYSTEM=="block", ENV{ID_VENDOR}=="HP", ENV{ID_MODEL}=="LOGICAL_VOLUME", ATTR{queue/scheduler}="noop"
 ACTION=="add", SUBSYSTEM=="block", ENV{ID_VENDOR}=="HP", ENV{ID_MODEL}=="LOGICAL_VOLUME", ATTR{queue/nr_requests}="512"
+ACTION=="add", SUBSYSTEM=="block", ENV{ID_VENDOR}=="HP", ENV{ID_MODEL}=="LOGICAL_VOLUME", ATTR{queue/read_ahead_kb}="4096"
 <% node[:devices].each do |name,device| -%>
 
 # <%= device[:comment] %>
@@ -23,3 +24,11 @@ ACTION=="add", SUBSYSTEM=="block", ENV{ID_BUS}=="<%= device[:bus] %>", ENV{ID_SE
 <% end -%>
 <% end -%>
 <% end -%>
+<% if node[:lsb][:release] == "12.04" && Chef::Util.compare_versions(node[:kernel][:release], [3, 11]) >= 0 -%>
+
+# Rule from 14.04 udev for 12.04 machines running newer kernels
+ACTION=="add", SUBSYSTEM=="cpu", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe -bv $env{MODALIAS}"
+<% end -%>
+
+# Disable scatter-gather offload for HP NC362i network controllers
+SUBSYSTEM=="net", ACTION=="add", ATTRS{vendor}=="0x8086", ATTRS{device}=="0x10c9", ATTRS{subsystem_vendor}=="0x103c", ATTRS{subsystem_device}=="0x323f", RUN+="/sbin/ethtool -K $name gso off tso off sg off gro off"