[ovs-dev] Docs: Add DPDK AF_XDP PMD use case.
diff mbox series

Message ID 1566427695-122598-1-git-send-email-u9012063@gmail.com
State New
Headers show
Series
  • [ovs-dev] Docs: Add DPDK AF_XDP PMD use case.
Related show

Commit Message

William Tu Aug. 21, 2019, 10:48 p.m. UTC
Add command lines for using DPDK's AF_XDP PMD driver.

Signed-off-by: William Tu <u9012063@gmail.com>
---
 Documentation/intro/install/afxdp.rst | 36 +++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

Comments

David Marchand Aug. 22, 2019, 6 a.m. UTC | #1
On Thu, Aug 22, 2019 at 12:49 AM William Tu <u9012063@gmail.com> wrote:
>
> Add command lines for using DPDK's AF_XDP PMD driver.
>
> Signed-off-by: William Tu <u9012063@gmail.com>
> ---
>  Documentation/intro/install/afxdp.rst | 36 +++++++++++++++++++++++++++++++++++
>  1 file changed, 36 insertions(+)
>
> diff --git a/Documentation/intro/install/afxdp.rst b/Documentation/intro/install/afxdp.rst
> index 820e9d993d8f..c3e03b40f3b5 100644
> --- a/Documentation/intro/install/afxdp.rst
> +++ b/Documentation/intro/install/afxdp.rst
> @@ -426,6 +426,42 @@ In the namespace, run drop or bounce back the packet::
>    ip netns exec at_ns0 ./xdp_rxq_info --dev p0 --action XDP_TX
>
>
> +Using DPDK's AF_XDP PMD driver
> +------------------------------
> +Another way to use AF_XDP is to enable DPDK and use DPDK's AF_XDP
> +driver. First, enable the AF_XDP PMD config at DPDK's
> +config/common_base file by::
> +
> +  CONFIG_RTE_LIBRTE_PMD_AF_XDP=y
> +
> +and recompile the DPDK source. Then, compile OVS with DPDK::

The AF_XDP pmd went in dpdk 19.05.

OVS master uses dpdk 18.11.2.
- https://github.com/openvswitch/ovs/commit/446a2a7ede1f377687e8c0d848d63eb5e9988cfa
is required to build against 19.05,
- https://github.com/openvswitch/ovs/commit/75e5e39e5468cb9f15114f7d8b367d39bc26756c
is required to build against 19.08,

If you want to have a note in this doc in the master branch, you must
properly explain this, or users will be disappointed and complain on
the ml :-)
Eelco Chaudron Aug. 22, 2019, 7:44 a.m. UTC | #2
On 22 Aug 2019, at 0:48, William Tu wrote:

> Add command lines for using DPDK's AF_XDP PMD driver.
>
> Signed-off-by: William Tu <u9012063@gmail.com>
> ---
>  Documentation/intro/install/afxdp.rst | 36 
> +++++++++++++++++++++++++++++++++++
>  1 file changed, 36 insertions(+)
>
> diff --git a/Documentation/intro/install/afxdp.rst 
> b/Documentation/intro/install/afxdp.rst
> index 820e9d993d8f..c3e03b40f3b5 100644
> --- a/Documentation/intro/install/afxdp.rst
> +++ b/Documentation/intro/install/afxdp.rst
> @@ -426,6 +426,42 @@ In the namespace, run drop or bounce back the 
> packet::
>    ip netns exec at_ns0 ./xdp_rxq_info --dev p0 --action XDP_TX
>
>
> +Using DPDK's AF_XDP PMD driver
> +------------------------------
> +Another way to use AF_XDP is to enable DPDK and use DPDK's AF_XDP
> +driver. First, enable the AF_XDP PMD config at DPDK's
> +config/common_base file by::
> +
> +  CONFIG_RTE_LIBRTE_PMD_AF_XDP=y
> +
> +and recompile the DPDK source. Then, compile OVS with DPDK::
> +
> +  ./configure --with-dpdk=<patch to dpdk build>
> +

Looks good, but maybe add a reference to 
Documentation/intro/install/dpdk.rst?

> +Start ovs-vswitchd and initilize DPDK::
> +
> +  ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
> +
> +Finally, assume eth2 and eth3 are the physical NIC, AF_XDP port can
> +be added by::
> +
> +  ovs-vsctl add-port br0 afxdp-p0 -- set int afxdp-p0 type=dpdk \
> +    options:dpdk-devargs=vdev:net_af_xdp0,iface=eth2 \
> +    start_queue=0,queue_count=1
> +  ovs-vsctl add-port br0 afxdp-p1 -- set int afxdp-p1 type=dpdk \
> +    options:dpdk-devargs=vdev:net_af_xdp1,iface=eth3 \
> +    start_queue=0,queue_count=1
> +
> +Execute ovs-vsctl show::
> +
> +  Bridge "br0"
> +    datapath_type: netdev
> +    Port "afxdp-p0"
> +      Interface "afxdp-p0"
> +        type: dpdk
> +        options: {dpdk-devargs="vdev:net_af_xdp,iface=eth2"}
> +
> +
>  Bug Reporting
>  -------------
>
> -- 
> 2.7.4
Stokes, Ian Aug. 22, 2019, 8:29 a.m. UTC | #3
On 8/22/2019 7:00 AM, David Marchand wrote:
> On Thu, Aug 22, 2019 at 12:49 AM William Tu <u9012063@gmail.com> wrote:
>> Add command lines for using DPDK's AF_XDP PMD driver.
>>
>> Signed-off-by: William Tu <u9012063@gmail.com>
>> ---
>>   Documentation/intro/install/afxdp.rst | 36 +++++++++++++++++++++++++++++++++++
>>   1 file changed, 36 insertions(+)
>>
>> diff --git a/Documentation/intro/install/afxdp.rst b/Documentation/intro/install/afxdp.rst
>> index 820e9d993d8f..c3e03b40f3b5 100644
>> --- a/Documentation/intro/install/afxdp.rst
>> +++ b/Documentation/intro/install/afxdp.rst
>> @@ -426,6 +426,42 @@ In the namespace, run drop or bounce back the packet::
>>     ip netns exec at_ns0 ./xdp_rxq_info --dev p0 --action XDP_TX
>>
>>
>> +Using DPDK's AF_XDP PMD driver
>> +------------------------------
>> +Another way to use AF_XDP is to enable DPDK and use DPDK's AF_XDP
>> +driver. First, enable the AF_XDP PMD config at DPDK's
>> +config/common_base file by::
>> +
>> +  CONFIG_RTE_LIBRTE_PMD_AF_XDP=y
>> +
>> +and recompile the DPDK source. Then, compile OVS with DPDK::
> The AF_XDP pmd went in dpdk 19.05.
>
> OVS master uses dpdk 18.11.2.
> - https://github.com/openvswitch/ovs/commit/446a2a7ede1f377687e8c0d848d63eb5e9988cfa
> is required to build against 19.05,
> - https://github.com/openvswitch/ovs/commit/75e5e39e5468cb9f15114f7d8b367d39bc26756c
> is required to build against 19.08,
>
> If you want to have a note in this doc in the master branch, you must
> properly explain this, or users will be disappointed and complain on
> the ml :-)


+1, also I think we shouldn't reference commits in the docs that 
reference the dpdk-latest branch (I was burned by this before in commit 
messages myself), the reason is I intend to rebase dpdk-latest on master 
after the 2.12 release and as such the commit  IDs will change due to 
the rebase.

I'm not so sure we should even add documentation to master regarding the 
AF_XDP PMD until master moves to 19.11? Possibly the 'dpdk-latest' might 
be a better candidate for this doc change?

Regards

Ian

>
>
David Marchand Aug. 22, 2019, 8:33 a.m. UTC | #4
On Thu, Aug 22, 2019 at 10:30 AM Stokes, Ian <ian.stokes@intel.com> wrote:
>
>
> On 8/22/2019 7:00 AM, David Marchand wrote:
> > On Thu, Aug 22, 2019 at 12:49 AM William Tu <u9012063@gmail.com> wrote:
> >> Add command lines for using DPDK's AF_XDP PMD driver.
> >>
> >> Signed-off-by: William Tu <u9012063@gmail.com>
> >> ---
> >>   Documentation/intro/install/afxdp.rst | 36 +++++++++++++++++++++++++++++++++++
> >>   1 file changed, 36 insertions(+)
> >>
> >> diff --git a/Documentation/intro/install/afxdp.rst b/Documentation/intro/install/afxdp.rst
> >> index 820e9d993d8f..c3e03b40f3b5 100644
> >> --- a/Documentation/intro/install/afxdp.rst
> >> +++ b/Documentation/intro/install/afxdp.rst
> >> @@ -426,6 +426,42 @@ In the namespace, run drop or bounce back the packet::
> >>     ip netns exec at_ns0 ./xdp_rxq_info --dev p0 --action XDP_TX
> >>
> >>
> >> +Using DPDK's AF_XDP PMD driver
> >> +------------------------------
> >> +Another way to use AF_XDP is to enable DPDK and use DPDK's AF_XDP
> >> +driver. First, enable the AF_XDP PMD config at DPDK's
> >> +config/common_base file by::
> >> +
> >> +  CONFIG_RTE_LIBRTE_PMD_AF_XDP=y
> >> +
> >> +and recompile the DPDK source. Then, compile OVS with DPDK::
> > The AF_XDP pmd went in dpdk 19.05.
> >
> > OVS master uses dpdk 18.11.2.
> > - https://github.com/openvswitch/ovs/commit/446a2a7ede1f377687e8c0d848d63eb5e9988cfa
> > is required to build against 19.05,
> > - https://github.com/openvswitch/ovs/commit/75e5e39e5468cb9f15114f7d8b367d39bc26756c
> > is required to build against 19.08,
> >
> > If you want to have a note in this doc in the master branch, you must
> > properly explain this, or users will be disappointed and complain on
> > the ml :-)
>
>
> +1, also I think we shouldn't reference commits in the docs that
> reference the dpdk-latest branch (I was burned by this before in commit
> messages myself), the reason is I intend to rebase dpdk-latest on master
> after the 2.12 release and as such the commit  IDs will change due to
> the rebase.
>
> I'm not so sure we should even add documentation to master regarding the
> AF_XDP PMD until master moves to 19.11? Possibly the 'dpdk-latest' might
> be a better candidate for this doc change?

Yes, this was my thought too.
William Tu Aug. 22, 2019, 2:43 p.m. UTC | #5
On Thu, Aug 22, 2019 at 1:33 AM David Marchand
<david.marchand@redhat.com> wrote:
>
> On Thu, Aug 22, 2019 at 10:30 AM Stokes, Ian <ian.stokes@intel.com> wrote:
> >
> >
> > On 8/22/2019 7:00 AM, David Marchand wrote:
> > > On Thu, Aug 22, 2019 at 12:49 AM William Tu <u9012063@gmail.com> wrote:
> > >> Add command lines for using DPDK's AF_XDP PMD driver.
> > >>
> > >> Signed-off-by: William Tu <u9012063@gmail.com>
> > >> ---
> > >>   Documentation/intro/install/afxdp.rst | 36 +++++++++++++++++++++++++++++++++++
> > >>   1 file changed, 36 insertions(+)
> > >>
> > >> diff --git a/Documentation/intro/install/afxdp.rst b/Documentation/intro/install/afxdp.rst
> > >> index 820e9d993d8f..c3e03b40f3b5 100644
> > >> --- a/Documentation/intro/install/afxdp.rst
> > >> +++ b/Documentation/intro/install/afxdp.rst
> > >> @@ -426,6 +426,42 @@ In the namespace, run drop or bounce back the packet::
> > >>     ip netns exec at_ns0 ./xdp_rxq_info --dev p0 --action XDP_TX
> > >>
> > >>
> > >> +Using DPDK's AF_XDP PMD driver
> > >> +------------------------------
> > >> +Another way to use AF_XDP is to enable DPDK and use DPDK's AF_XDP
> > >> +driver. First, enable the AF_XDP PMD config at DPDK's
> > >> +config/common_base file by::
> > >> +
> > >> +  CONFIG_RTE_LIBRTE_PMD_AF_XDP=y
> > >> +
> > >> +and recompile the DPDK source. Then, compile OVS with DPDK::
> > > The AF_XDP pmd went in dpdk 19.05.
> > >
> > > OVS master uses dpdk 18.11.2.
> > > - https://github.com/openvswitch/ovs/commit/446a2a7ede1f377687e8c0d848d63eb5e9988cfa
> > > is required to build against 19.05,
> > > - https://github.com/openvswitch/ovs/commit/75e5e39e5468cb9f15114f7d8b367d39bc26756c
> > > is required to build against 19.08,
> > >
> > > If you want to have a note in this doc in the master branch, you must
> > > properly explain this, or users will be disappointed and complain on
> > > the ml :-)
> >
> >
> > +1, also I think we shouldn't reference commits in the docs that
> > reference the dpdk-latest branch (I was burned by this before in commit
> > messages myself), the reason is I intend to rebase dpdk-latest on master
> > after the 2.12 release and as such the commit  IDs will change due to
> > the rebase.
> >
> > I'm not so sure we should even add documentation to master regarding the
> > AF_XDP PMD until master moves to 19.11? Possibly the 'dpdk-latest' might
> > be a better candidate for this doc change?
>
> Yes, this was my thought too.
>

Hi David, Ian, and Eelco,

Thanks for your comments.
Do you suggest me to resubmit the patch to dpdk-latest now?
Or do you mean wait until master moves to dpdk 19.11, and then
submit to master?

Regards,
William
Stokes, Ian Aug. 27, 2019, 5:38 p.m. UTC | #6
On 8/22/2019 3:43 PM, William Tu wrote:
> On Thu, Aug 22, 2019 at 1:33 AM David Marchand
> <david.marchand@redhat.com> wrote:
>>
>> On Thu, Aug 22, 2019 at 10:30 AM Stokes, Ian <ian.stokes@intel.com> wrote:
>>>
>>>
>>> On 8/22/2019 7:00 AM, David Marchand wrote:
>>>> On Thu, Aug 22, 2019 at 12:49 AM William Tu <u9012063@gmail.com> wrote:
>>>>> Add command lines for using DPDK's AF_XDP PMD driver.
>>>>>
>>>>> Signed-off-by: William Tu <u9012063@gmail.com>
>>>>> ---
>>>>>    Documentation/intro/install/afxdp.rst | 36 +++++++++++++++++++++++++++++++++++
>>>>>    1 file changed, 36 insertions(+)
>>>>>
>>>>> diff --git a/Documentation/intro/install/afxdp.rst b/Documentation/intro/install/afxdp.rst
>>>>> index 820e9d993d8f..c3e03b40f3b5 100644
>>>>> --- a/Documentation/intro/install/afxdp.rst
>>>>> +++ b/Documentation/intro/install/afxdp.rst
>>>>> @@ -426,6 +426,42 @@ In the namespace, run drop or bounce back the packet::
>>>>>      ip netns exec at_ns0 ./xdp_rxq_info --dev p0 --action XDP_TX
>>>>>
>>>>>
>>>>> +Using DPDK's AF_XDP PMD driver
>>>>> +------------------------------
>>>>> +Another way to use AF_XDP is to enable DPDK and use DPDK's AF_XDP
>>>>> +driver. First, enable the AF_XDP PMD config at DPDK's
>>>>> +config/common_base file by::
>>>>> +
>>>>> +  CONFIG_RTE_LIBRTE_PMD_AF_XDP=y
>>>>> +
>>>>> +and recompile the DPDK source. Then, compile OVS with DPDK::
>>>> The AF_XDP pmd went in dpdk 19.05.
>>>>
>>>> OVS master uses dpdk 18.11.2.
>>>> - https://github.com/openvswitch/ovs/commit/446a2a7ede1f377687e8c0d848d63eb5e9988cfa
>>>> is required to build against 19.05,
>>>> - https://github.com/openvswitch/ovs/commit/75e5e39e5468cb9f15114f7d8b367d39bc26756c
>>>> is required to build against 19.08,
>>>>
>>>> If you want to have a note in this doc in the master branch, you must
>>>> properly explain this, or users will be disappointed and complain on
>>>> the ml :-)
>>>
>>>
>>> +1, also I think we shouldn't reference commits in the docs that
>>> reference the dpdk-latest branch (I was burned by this before in commit
>>> messages myself), the reason is I intend to rebase dpdk-latest on master
>>> after the 2.12 release and as such the commit  IDs will change due to
>>> the rebase.
>>>
>>> I'm not so sure we should even add documentation to master regarding the
>>> AF_XDP PMD until master moves to 19.11? Possibly the 'dpdk-latest' might
>>> be a better candidate for this doc change?
>>
>> Yes, this was my thought too.
>>
> 
> Hi David, Ian, and Eelco,
> 
> Thanks for your comments.
> Do you suggest me to resubmit the patch to dpdk-latest now?
> Or do you mean wait until master moves to dpdk 19.11, and then
> submit to master?

For me I'd be happy to see it re-submitted when master supports 19.11. 
dpdk-latest to date has been more about compilation enabling against 
latest DPDK target (with basic existing/supported feature validation 
carried out obv). But we haven't really used it for documentation 
changes like this so far. Instead we've made the doc changes in master 
once the new feature is enabled and available on master.

Regards
Ian

> 
> Regards,
> William
>
William Tu Aug. 28, 2019, 5:28 p.m. UTC | #7
On Tue, Aug 27, 2019 at 10:38 AM Stokes, Ian <ian.stokes@intel.com> wrote:
>
>
>
> On 8/22/2019 3:43 PM, William Tu wrote:
> > On Thu, Aug 22, 2019 at 1:33 AM David Marchand
> > <david.marchand@redhat.com> wrote:
> >>
> >> On Thu, Aug 22, 2019 at 10:30 AM Stokes, Ian <ian.stokes@intel.com> wrote:
> >>>
> >>>
> >>> On 8/22/2019 7:00 AM, David Marchand wrote:
> >>>> On Thu, Aug 22, 2019 at 12:49 AM William Tu <u9012063@gmail.com> wrote:
> >>>>> Add command lines for using DPDK's AF_XDP PMD driver.
> >>>>>
> >>>>> Signed-off-by: William Tu <u9012063@gmail.com>
> >>>>> ---
> >>>>>    Documentation/intro/install/afxdp.rst | 36 +++++++++++++++++++++++++++++++++++
> >>>>>    1 file changed, 36 insertions(+)
> >>>>>
> >>>>> diff --git a/Documentation/intro/install/afxdp.rst b/Documentation/intro/install/afxdp.rst
> >>>>> index 820e9d993d8f..c3e03b40f3b5 100644
> >>>>> --- a/Documentation/intro/install/afxdp.rst
> >>>>> +++ b/Documentation/intro/install/afxdp.rst
> >>>>> @@ -426,6 +426,42 @@ In the namespace, run drop or bounce back the packet::
> >>>>>      ip netns exec at_ns0 ./xdp_rxq_info --dev p0 --action XDP_TX
> >>>>>
> >>>>>
> >>>>> +Using DPDK's AF_XDP PMD driver
> >>>>> +------------------------------
> >>>>> +Another way to use AF_XDP is to enable DPDK and use DPDK's AF_XDP
> >>>>> +driver. First, enable the AF_XDP PMD config at DPDK's
> >>>>> +config/common_base file by::
> >>>>> +
> >>>>> +  CONFIG_RTE_LIBRTE_PMD_AF_XDP=y
> >>>>> +
> >>>>> +and recompile the DPDK source. Then, compile OVS with DPDK::
> >>>> The AF_XDP pmd went in dpdk 19.05.
> >>>>
> >>>> OVS master uses dpdk 18.11.2.
> >>>> - https://github.com/openvswitch/ovs/commit/446a2a7ede1f377687e8c0d848d63eb5e9988cfa
> >>>> is required to build against 19.05,
> >>>> - https://github.com/openvswitch/ovs/commit/75e5e39e5468cb9f15114f7d8b367d39bc26756c
> >>>> is required to build against 19.08,
> >>>>
> >>>> If you want to have a note in this doc in the master branch, you must
> >>>> properly explain this, or users will be disappointed and complain on
> >>>> the ml :-)
> >>>
> >>>
> >>> +1, also I think we shouldn't reference commits in the docs that
> >>> reference the dpdk-latest branch (I was burned by this before in commit
> >>> messages myself), the reason is I intend to rebase dpdk-latest on master
> >>> after the 2.12 release and as such the commit  IDs will change due to
> >>> the rebase.
> >>>
> >>> I'm not so sure we should even add documentation to master regarding the
> >>> AF_XDP PMD until master moves to 19.11? Possibly the 'dpdk-latest' might
> >>> be a better candidate for this doc change?
> >>
> >> Yes, this was my thought too.
> >>
> >
> > Hi David, Ian, and Eelco,
> >
> > Thanks for your comments.
> > Do you suggest me to resubmit the patch to dpdk-latest now?
> > Or do you mean wait until master moves to dpdk 19.11, and then
> > submit to master?
>
> For me I'd be happy to see it re-submitted when master supports 19.11.
> dpdk-latest to date has been more about compilation enabling against
> latest DPDK target (with basic existing/supported feature validation
> carried out obv). But we haven't really used it for documentation
> changes like this so far. Instead we've made the doc changes in master
> once the new feature is enabled and available on master.
>
Hi Ian,
Thank you, I will wait for master support 19.11
William

Patch
diff mbox series

diff --git a/Documentation/intro/install/afxdp.rst b/Documentation/intro/install/afxdp.rst
index 820e9d993d8f..c3e03b40f3b5 100644
--- a/Documentation/intro/install/afxdp.rst
+++ b/Documentation/intro/install/afxdp.rst
@@ -426,6 +426,42 @@  In the namespace, run drop or bounce back the packet::
   ip netns exec at_ns0 ./xdp_rxq_info --dev p0 --action XDP_TX
 
 
+Using DPDK's AF_XDP PMD driver
+------------------------------
+Another way to use AF_XDP is to enable DPDK and use DPDK's AF_XDP
+driver. First, enable the AF_XDP PMD config at DPDK's
+config/common_base file by::
+
+  CONFIG_RTE_LIBRTE_PMD_AF_XDP=y
+
+and recompile the DPDK source. Then, compile OVS with DPDK::
+
+  ./configure --with-dpdk=<patch to dpdk build>
+
+Start ovs-vswitchd and initilize DPDK::
+
+  ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
+
+Finally, assume eth2 and eth3 are the physical NIC, AF_XDP port can
+be added by::
+
+  ovs-vsctl add-port br0 afxdp-p0 -- set int afxdp-p0 type=dpdk \
+    options:dpdk-devargs=vdev:net_af_xdp0,iface=eth2 \
+    start_queue=0,queue_count=1
+  ovs-vsctl add-port br0 afxdp-p1 -- set int afxdp-p1 type=dpdk \
+    options:dpdk-devargs=vdev:net_af_xdp1,iface=eth3 \
+    start_queue=0,queue_count=1
+
+Execute ovs-vsctl show::
+
+  Bridge "br0"
+    datapath_type: netdev
+    Port "afxdp-p0"
+      Interface "afxdp-p0"
+        type: dpdk
+        options: {dpdk-devargs="vdev:net_af_xdp,iface=eth2"}
+
+
 Bug Reporting
 -------------