Message ID | a55ad58cb929c30aac9b391c02c523514a032079.1452778565.git.pmatilai@redhat.com |
---|---|
State | Not Applicable |
Headers | show |
Panu Matilainen <pmatilai@redhat.com> writes: > Requires DPDK >= 2.2 as that is the first version to have a standard > install layout which we can discover without help from user. > > Signed-off-by: Panu Matilainen <pmatilai@redhat.com> > --- > > As a follow-up to this discussion (oh my, where did the time go...): > http://openvswitch.org/pipermail/dev/2015-November/062599.html > > RFC only for now since rest of OVS hasn't been update for DPDK 2.2 > yet. I think the approach is good, just a minor comment below. > rhel/openvswitch-fedora.spec.in | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in > index 15f5c60..1bf4c12 100644 > --- a/rhel/openvswitch-fedora.spec.in > +++ b/rhel/openvswitch-fedora.spec.in > @@ -16,6 +16,8 @@ > # If libcap-ng isn't available and there is no need for running OVS > # as regular user, specify the '--without libcapng' > %bcond_without libcapng > +# To enable DPDK support, specify '--with dpdk' when building > +%bcond_with dpdk > > # Enable PIE, bz#955181 > %global _hardened_build 1 > @@ -49,6 +51,10 @@ BuildRequires: procps-ng > %if %{with libcapng} > BuildRequires: libcap-ng libcap-ng-devel > %endif > +%if %{with dpdk} > +BuildRequires: dpdk-devel >= 2.2.0 > +Provides: %{name}-dpdk = %{version}-%{release} > +%endif > > Requires: openssl iproute module-init-tools > #Upstream kernel commit 4f647e0a3c37b8d5086214128614a136064110c3 > @@ -117,6 +123,9 @@ overlays and security groups. > %else > --disable-libcapng \ > %endif > +%if %{with dpdk} > + --with-dpdk=$(dirname %{_datadir}/dpdk/*/.config) \ > +%endif dpdk-devel forces export of RTE_SDK - should that change from ${_datadir}/dpdk/*/.config to $(RTE_SDK)/*/.config ? Also, not sure about the '*' - might be better to try and figure out the config name somehow? > --enable-ssl \ > --with-pkidir=%{_sharedstatedir}/openvswitch/pki
On 01/14/2016 06:22 PM, Aaron Conole wrote: > Panu Matilainen <pmatilai@redhat.com> writes: >> Requires DPDK >= 2.2 as that is the first version to have a standard >> install layout which we can discover without help from user. >> >> Signed-off-by: Panu Matilainen <pmatilai@redhat.com> >> --- >> >> As a follow-up to this discussion (oh my, where did the time go...): >> http://openvswitch.org/pipermail/dev/2015-November/062599.html >> >> RFC only for now since rest of OVS hasn't been update for DPDK 2.2 >> yet. > > I think the approach is good, just a minor comment below. > >> rhel/openvswitch-fedora.spec.in | 9 +++++++++ >> 1 file changed, 9 insertions(+) >> >> diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in >> index 15f5c60..1bf4c12 100644 >> --- a/rhel/openvswitch-fedora.spec.in >> +++ b/rhel/openvswitch-fedora.spec.in >> @@ -16,6 +16,8 @@ >> # If libcap-ng isn't available and there is no need for running OVS >> # as regular user, specify the '--without libcapng' >> %bcond_without libcapng >> +# To enable DPDK support, specify '--with dpdk' when building >> +%bcond_with dpdk >> >> # Enable PIE, bz#955181 >> %global _hardened_build 1 >> @@ -49,6 +51,10 @@ BuildRequires: procps-ng >> %if %{with libcapng} >> BuildRequires: libcap-ng libcap-ng-devel >> %endif >> +%if %{with dpdk} >> +BuildRequires: dpdk-devel >= 2.2.0 >> +Provides: %{name}-dpdk = %{version}-%{release} >> +%endif >> >> Requires: openssl iproute module-init-tools >> #Upstream kernel commit 4f647e0a3c37b8d5086214128614a136064110c3 >> @@ -117,6 +123,9 @@ overlays and security groups. >> %else >> --disable-libcapng \ >> %endif >> +%if %{with dpdk} >> + --with-dpdk=$(dirname %{_datadir}/dpdk/*/.config) \ >> +%endif > > dpdk-devel forces export of RTE_SDK - should that change from > ${_datadir}/dpdk/*/.config > to > $(RTE_SDK)/*/.config ? The RTE_SDK export is specific to Fedora DPDK packaging, the above is intentionally only relying on what upstream DPDK offers. > > Also, not sure about the '*' - might be better to try and figure out the > config name somehow? From a DPDK "make install", there can be precisely one directory (the target name) that matches the %{_datadir}/dpdk/*/.config glob. The alternative for figuring the config target name and would be parsing /usr/include/dpdk/rte_config.h and stiching the name back together from that, not worth the trouble IMO. It probably deserves a bit of rationale in the commit message though :) - Panu - - Panu - - Panu -
On Thu, 14 Jan 2016 15:38:59 +0200 Panu Matilainen <pmatilai@redhat.com> wrote: > Requires DPDK >= 2.2 as that is the first version to have a standard > install layout which we can discover without help from user. > > Signed-off-by: Panu Matilainen <pmatilai@redhat.com> > --- > > As a follow-up to this discussion (oh my, where did the time go...): > http://openvswitch.org/pipermail/dev/2015-November/062599.html > > RFC only for now since rest of OVS hasn't been update for DPDK 2.2 > yet. > > rhel/openvswitch-fedora.spec.in | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/rhel/openvswitch-fedora.spec.in > b/rhel/openvswitch-fedora.spec.in index 15f5c60..1bf4c12 100644 > --- a/rhel/openvswitch-fedora.spec.in > +++ b/rhel/openvswitch-fedora.spec.in > @@ -16,6 +16,8 @@ > # If libcap-ng isn't available and there is no need for running OVS > # as regular user, specify the '--without libcapng' > %bcond_without libcapng > +# To enable DPDK support, specify '--with dpdk' when building > +%bcond_with dpdk > > # Enable PIE, bz#955181 > %global _hardened_build 1 > @@ -49,6 +51,10 @@ BuildRequires: procps-ng > %if %{with libcapng} > BuildRequires: libcap-ng libcap-ng-devel > %endif > +%if %{with dpdk} > +BuildRequires: dpdk-devel >= 2.2.0 > +Provides: %{name}-dpdk = %{version}-%{release} > +%endif > > Requires: openssl iproute module-init-tools > #Upstream kernel commit 4f647e0a3c37b8d5086214128614a136064110c3 > @@ -117,6 +123,9 @@ overlays and security groups. > %else > --disable-libcapng \ > %endif > +%if %{with dpdk} > + --with-dpdk=$(dirname %{_datadir}/dpdk/*/.config) \ > +%endif > --enable-ssl \ > --with-pkidir=%{_sharedstatedir}/openvswitch/pki > This is the configure line used: + ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-libcapng --with-dpdk=/usr/share/dpdk/x86_64-default-linuxapp-gcc --enable-ssl --with-pkidir=/var/lib/openvswitch/pki gcc command lines include -I/usr/share/dpdk/x86_64-default-linuxapp-gcc/include linker uses: -L/usr/share/dpdk/x86_64-default-linuxapp-gcc/lib -ldpdk I see "1745 tests were successful." Got the RPM packages. The ovs-vswitchd is linked to many librte_* libraries. It provides openvswitch-dpdk: $ rpm -qp --provides openvswitch-2.5.90-1.fc23.x86_64.rpm | grep dpdk openvswitch-dpdk = 2.5.90-1.fc23 Happy to see this happening. Two things missing though: * A documentation update (INSTALL.Fedora.md) to at least mention the option to build with DPDK. * A way to pass the DPDK options. This is changing with Aaron's patchset to move them to the DB. So, in the end it might not be part of this patch. Other than that it looks good. BTW, branch master is updated to require DPDK 2.2. Thanks,
On 01/27/2016 05:57 PM, Flavio Leitner wrote: > On Thu, 14 Jan 2016 15:38:59 +0200 > Panu Matilainen <pmatilai@redhat.com> wrote: > >> Requires DPDK >= 2.2 as that is the first version to have a standard >> install layout which we can discover without help from user. >> >> Signed-off-by: Panu Matilainen <pmatilai@redhat.com> >> --- >> >> As a follow-up to this discussion (oh my, where did the time go...): >> http://openvswitch.org/pipermail/dev/2015-November/062599.html >> >> RFC only for now since rest of OVS hasn't been update for DPDK 2.2 >> yet. >> >> rhel/openvswitch-fedora.spec.in | 9 +++++++++ >> 1 file changed, 9 insertions(+) >> >> diff --git a/rhel/openvswitch-fedora.spec.in >> b/rhel/openvswitch-fedora.spec.in index 15f5c60..1bf4c12 100644 >> --- a/rhel/openvswitch-fedora.spec.in >> +++ b/rhel/openvswitch-fedora.spec.in >> @@ -16,6 +16,8 @@ >> # If libcap-ng isn't available and there is no need for running OVS >> # as regular user, specify the '--without libcapng' >> %bcond_without libcapng >> +# To enable DPDK support, specify '--with dpdk' when building >> +%bcond_with dpdk >> >> # Enable PIE, bz#955181 >> %global _hardened_build 1 >> @@ -49,6 +51,10 @@ BuildRequires: procps-ng >> %if %{with libcapng} >> BuildRequires: libcap-ng libcap-ng-devel >> %endif >> +%if %{with dpdk} >> +BuildRequires: dpdk-devel >= 2.2.0 >> +Provides: %{name}-dpdk = %{version}-%{release} >> +%endif >> >> Requires: openssl iproute module-init-tools >> #Upstream kernel commit 4f647e0a3c37b8d5086214128614a136064110c3 >> @@ -117,6 +123,9 @@ overlays and security groups. >> %else >> --disable-libcapng \ >> %endif >> +%if %{with dpdk} >> + --with-dpdk=$(dirname %{_datadir}/dpdk/*/.config) \ >> +%endif >> --enable-ssl \ >> --with-pkidir=%{_sharedstatedir}/openvswitch/pki >> > > > This is the configure line used: > > + ./configure --build=x86_64-redhat-linux-gnu > --host=x86_64-redhat-linux-gnu --program-prefix= > --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr > --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc > --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 > --libexecdir=/usr/libexec --localstatedir=/var > --sharedstatedir=/var/lib --mandir=/usr/share/man > --infodir=/usr/share/info --enable-libcapng > --with-dpdk=/usr/share/dpdk/x86_64-default-linuxapp-gcc --enable-ssl > --with-pkidir=/var/lib/openvswitch/pki > > > gcc command lines include > -I/usr/share/dpdk/x86_64-default-linuxapp-gcc/include > > linker uses: > -L/usr/share/dpdk/x86_64-default-linuxapp-gcc/lib -ldpdk > > I see "1745 tests were successful." > > Got the RPM packages. > > The ovs-vswitchd is linked to many librte_* libraries. > > It provides openvswitch-dpdk: > $ rpm -qp --provides openvswitch-2.5.90-1.fc23.x86_64.rpm | grep dpdk > openvswitch-dpdk = 2.5.90-1.fc23 > > Happy to see this happening. > > Two things missing though: > * A documentation update (INSTALL.Fedora.md) to at least mention the > option to build with DPDK. Ah, fair point. > > * A way to pass the DPDK options. This is changing with Aaron's > patchset to move them to the DB. So, in the end it might not be > part of this patch. Yeah I think enabling DPDK at runtime is a separate issue. At any rate one *can* (re)start vswitchd manually as documented in INSTALL.DPDK.md, which is of course not sufficient distro integration but since the initialization is being worked on already... > Other than that it looks good. > > BTW, branch master is updated to require DPDK 2.2. Indeed, noticed that yet somehow the mental trigger to resend the patch failed to execute :) Thanks for the reminder, - Panu - > > Thanks, >
diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in index 15f5c60..1bf4c12 100644 --- a/rhel/openvswitch-fedora.spec.in +++ b/rhel/openvswitch-fedora.spec.in @@ -16,6 +16,8 @@ # If libcap-ng isn't available and there is no need for running OVS # as regular user, specify the '--without libcapng' %bcond_without libcapng +# To enable DPDK support, specify '--with dpdk' when building +%bcond_with dpdk # Enable PIE, bz#955181 %global _hardened_build 1 @@ -49,6 +51,10 @@ BuildRequires: procps-ng %if %{with libcapng} BuildRequires: libcap-ng libcap-ng-devel %endif +%if %{with dpdk} +BuildRequires: dpdk-devel >= 2.2.0 +Provides: %{name}-dpdk = %{version}-%{release} +%endif Requires: openssl iproute module-init-tools #Upstream kernel commit 4f647e0a3c37b8d5086214128614a136064110c3 @@ -117,6 +123,9 @@ overlays and security groups. %else --disable-libcapng \ %endif +%if %{with dpdk} + --with-dpdk=$(dirname %{_datadir}/dpdk/*/.config) \ +%endif --enable-ssl \ --with-pkidir=%{_sharedstatedir}/openvswitch/pki
Requires DPDK >= 2.2 as that is the first version to have a standard install layout which we can discover without help from user. Signed-off-by: Panu Matilainen <pmatilai@redhat.com> --- As a follow-up to this discussion (oh my, where did the time go...): http://openvswitch.org/pipermail/dev/2015-November/062599.html RFC only for now since rest of OVS hasn't been update for DPDK 2.2 yet. rhel/openvswitch-fedora.spec.in | 9 +++++++++ 1 file changed, 9 insertions(+)