Ubuntu Server Guide Changes, errors and bugs


Unassigning the default Kernel drivers


Download 1.27 Mb.
Pdf ko'rish
bet54/286
Sana20.12.2022
Hajmi1.27 Mb.
#1035308
1   ...   50   51   52   53   54   55   56   57   ...   286
Bog'liq
ubuntu-server-guide

Unassigning the default Kernel drivers
Cards have to be unassigned from their kernel driver and instead be assigned to uio_pci_generic of vfio −pci.
uio_pci_generic is older and usually getting to work more easily, but also has less features and isolation.
The newer vfio-pci requires that you activate the following kernel parameters to enable iommu.
iommu=pt intel_iommu=on
Or on AMD
amd_iommu=pt
On top for vfio-pci you then have to configure and assign the iommu groups accordingly. That is mostly
done in Firmware and by HW layout, you can check the group assignment the kernel probed in /sys/kernel
/iommu_groups/.
Note: virtio is special, dpdk can directly work on those devices without vfio_pci/uio_pci_generic.
But to avoid issues by kernel and DPDK managing the device you still have to unassign the kernel
driver.
Manual configuration and status checks can be done via sysfs or with the tool dpdk_nic_bind
dpdk_nic_bind . py −−h e l p
Usage:
dpdk−devbind . py [ o p t i o n s ] DEVICE1 DEVICE2 . . . .
where DEVICE1 , DEVICE2 e t c , a r e s p e c i f i e d v i a PCI ” domain : bus : s l o t . f u n c ”
sy n t a x
o r ” bus : s l o t . f u n c ” s y n t a x . For d e v i c e s bound t o Linux k e r n e l d r i v e r s , they may
a l s o be r e f e r r e d t o by Linux i n t e r f a c e name e . g . eth0 , eth1 , em0 , em1 , e t c .
Options :
−−help , −−u s a g e :
D i s p l a y u s a g e i n f o r m a t i o n and q u i t
−s , −−s t a t u s :
P r i n t t h e c u r r e n t s t a t u s o f a l l known network , crypto , e v e n t
and mempool d e v i c e s .
For each d e v i c e , i t d i s p l a y s t h e PCI domain , bus , s l o t and f u n c t i o n ,
a l o n g with a t e x t d e s c r i p t i o n o f t h e d e v i c e . Depending upon whether t h e
d e v i c e i s b e i n g used by a k e r n e l d r i v e r , t h e igb_uio d r i v e r , o r no
d r i v e r , o t h e r r e l e v a n t i n f o r m a t i o n w i l l be d i s p l a y e d :
* t h e Linux i n t e r f a c e name e . g . i f =e t h 0
* t h e d r i v e r b e i n g used e . g . drv=igb_uio
* any s u i t a b l e d r i v e r s not c u r r e n t l y u s i n g t h a t d e v i c e
e . g . unused=igb_uio
NOTE: i f t h i s f l a g i s p a s s e d a l o n g with a bind / unbind o p t i o n , t h e
s t a t u s d i s p l a y w i l l always o c c u r a f t e r t h e o t h e r o p e r a t i o n s have taken
p l a c e .
67


−−s t a t u s −dev :
P r i n t t h e s t a t u s o f g i v e n d e v i c e group . Supported d e v i c e gr o u p s a r e :
” n e t ” , ” c r y p t o ” , ” e v e n t ” , ”mempool” and ” compress ”
−b d r i v e r , −−bind=d r i v e r :
S e l e c t t h e d r i v e r t o u s e o r ” none ” t o unbind t h e d e v i c e
−u , −−unbind :
Unbind a d e v i c e ( E q u i v a l e n t t o ”−b none ” )
−−f o r c e :
By d e f a u l t , network d e v i c e s which a r e used by Linux − a s i n d i c a t e d by
having r o u t e s i n t h e r o u t i n g t a b l e − cannot be m o d i f i e d . Using t h e
−−f o r c e f l a g o v e r r i d e s t h i s b e h a v i o r , a l l o w i n g a c t i v e l i n k s t o be
f o r c i b l y unbound .
WARNING: This can l e a d t o l o s s o f network c o n n e c t i o n and s h o u l d be used
with c a u t i o n .
Examples :
−−−−−−−−−
To d i s p l a y c u r r e n t d e v i c e s t a t u s :
dpdk−devbind . py −−s t a t u s
To d i s p l a y c u r r e n t network d e v i c e s t a t u s :
dpdk−devbind . py −−s t a t u s −dev n e t
To bind e t h 1 from t h e c u r r e n t d r i v e r and move t o u s e igb_uio
dpdk−devbind . py −−bind=igb_uio e t h 1
To unbind 0 0 0 0 : 0 1 : 0 0 . 0 from u s i n g any d r i v e r
dpdk−devbind . py −u 0 0 0 0 : 0 1 : 0 0 . 0
To bind 0 0 0 0 : 0 2 : 0 0 . 0 and 0 0 0 0 : 0 2 : 0 0 . 1 t o t h e i x g b e k e r n e l d r i v e r
dpdk−devbind . py −b i x g b e 0 2 : 0 0 . 0 0 2 : 0 0 . 1

Download 1.27 Mb.

Do'stlaringiz bilan baham:
1   ...   50   51   52   53   54   55   56   57   ...   286




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling