Re: [ovs-dev] [PATCH v9 0/7] OVS-DPDK flow offload with rte_flow

2018-04-19 Thread Stokes, Ian
> Hi,
> 
> Here is a joint work from Mellanox and Napatech, to enable the flow hw
> offload with the DPDK generic flow interface (rte_flow).

Hi folks, I feel Mellanox/Netronome have reached the point where HWOL can be 
introduced to OVS DPDK pending performance review.

This has not been an easy path, but I will put one final request out there for 
comments.

If there are none then pending on Travis compilation and final performance 
checks I'm thinking of introducing this to the code base.

Keep in mind this feature is experimental, not only can it be changed but it 
can also be removed pending future review if not maintained.

I invite all to give opinions here as I think this is an important feature.

Sincere thanks to all involved.

Regards
Ian
 

> 
> The basic idea is to associate the flow with a mark id (a unit32_t
> number).
> Later, we then get the flow directly from the mark id, which could bypass
> some heavy CPU operations, including but not limiting to mini flow
> extract, emc lookup, dpcls lookup, etc.
> 
> The association is done with CMAP in patch 1. The CPU workload bypassing
> is done in patch 2. The flow offload is done in patch 3, which mainly does
> two things:
> 
> - translate the ovs match to DPDK rte flow patterns
> - bind those patterns with a RSS + MARK action.
> 
> Patch 5 makes the offload work happen in another thread, for leaving the
> datapath as light as possible.
> 
> A PHY-PHY forwarding with 1000 mega flows (udp,tp_src=1000-1999) and 1
> million streams (tp_src=1000-1999, tp_dst=2000-2999) show more than 260%
> performance boost.
> 
> Note that it's disabled by default, which can be enabled by:
> 
> $ ovs-vsctl set Open_vSwitch . other_config:hw-offload=true
> 
> v9: - introduced IP packet sanity checks in a seperate commit
> - moved structs and enums definition to the begining of the file
> - fixed sparse compilation error (error is assumed to be fixed, issues
>   on Travis CI preventing from fully testing it.
> 
> v8: - enhanced documentation with more details on supported protocols
> - fixed VLOG to start with capital letter
> - fixed compilation issues
> - fixed coding style
> - addressed the rest of Ian's comments
> 
> v7: - fixed wrong hash for mark_to_flow that has been refactored in v6
> - set the rss_conf for rss action to NULL, to workaround a mlx5 change
>   in DPDK v17.11. Note that it will obey the rss settings OVS-DPDK has
>   set in the beginning. Thus, nothing should be effected.
> 
> v6: - fixed a sparse warning
> - added documentation
> - used hash_int to compute mark to flow hash
> - added more comments
> - added lock for pot lookup
> - rebased on top of the latest code
> 
> v5: - fixed an issue that it took too long if we do flow add/remove
>   repeatedly.
> - removed an unused mutex lock
> - turned most of the log level to DBG
> - rebased on top of the latest code
> 
> v4: - use RSS action instead of QUEUE action with MARK
> - make it work with multiple queue (see patch 1)
> - rebased on top of latest code
> 
> v3: - The mark and id association is done with array instead of CMAP.
> - Added a thread to do hw offload operations
> - Removed macros completely
> - dropped the patch to set FDIR_CONF, which is a workround some
>   Intel NICs.
> - Added a debug patch to show all flow patterns we have created.
> - Misc fixes
> 
> v2: - workaround the queue action issue
> - fixed the tcp_flags being skipped issue, which also fixed the
>   build warnings
> - fixed l2 patterns for Intel nic
> - Converted some macros to functions
> - did not hardcode the max number of flow/action
> - rebased on top of the latest code
> 
> Thanks.
> 
> ---
> 
> Finn Christensen (1):
>   netdev-dpdk: implement flow offload with rte flow
> 
> Yuanhan Liu (6):
>   dpif-netdev: associate flow with a mark id
>   flow: Introduce IP packet sanity checks
>   dpif-netdev: retrieve flow directly from the flow mark
>   netdev-dpdk: add debug for rte flow patterns
>   dpif-netdev: do hw flow offload in a thread
>   Documentation: document ovs-dpdk flow offload
> 
>  Documentation/howto/dpdk.rst |  22 ++
>  NEWS |   3 +-
>  lib/dp-packet.h  |  13 +
>  lib/dpif-netdev.c| 497 -
>  lib/flow.c   | 155 ++--
>  lib/flow.h   |   1 +
>  lib/netdev-dpdk.c| 740 +-
>  lib/netdev.h |   6 +
>  8 files changed, 1397 insertions(+), 40 deletions(-)
> 
> --
> 2.7.4

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH V2] datapath: Prevent panic

2018-04-19 Thread Gregory Rose

On 4/19/2018 4:18 PM, Flavio Leitner wrote:

On Tue, Apr 17, 2018 at 12:34:08PM -0700, Greg Rose wrote:

On RHEL 7.x kernels we observe a panic induced by a paging error
when the timer kicks off a job that subsequently accesses memory
that belonged to the openvswitch kernel module but was since
unloaded - thus the paging error.

The panic can be induced on any RHEL 7.x kernel with the following test:

while `true`
do
 make check-kmod TESTSUITEFLAGS="-k \!gre"
done

On the systems I've been testing on it generally takes anywhere from a
minute to 15 minutes or so to repro but never longer than that.  Similar
results have been seen by other testers.

This patch does not fix the underlying bug, which does need to be
investigated and fixed, but it does prevent it from occurring. We
would like to prevent customer systems from panicking while we do
futher investigation to find the root cause.

This looks like related and it is fixed in kernel-3.10.0-842.el7 as
part of 7.5.

Bug 1531680 - openvswitch: list_add corruption splat on running OVS
check-kernel tests
[...]
Running the OVS check-kernel on kernel-3.10.0-826.el7 results in a
splat and/or panic. I bisected this down to:

fc2302dde0d9 ("[net] openvswitch: Fix refcount leak on force commit")

I believe this is caused by a missing del_timer() when deleting the ct
in OVS. RHEL7 does not yet have the changes to remove the timers
(f330a7fdbe16 ("netfilter: conntrack: get rid of conntrack timer")).
The force commit feature was added upstream _after_ f330a7fdbe16.

And the RHEL-only patch is:
diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c
index 7582bf79033e..ef2a324e88b4 100644
--- a/net/openvswitch/conntrack.c
+++ b/net/openvswitch/conntrack.c
@@ -554,7 +554,8 @@  ovs_ct_expect_find(struct net *net, const struct
nf_conntrack_zone *zone,
if (h) {
struct nf_conn *ct = nf_ct_tuplehash_to_ctrack(h);
  
-			nf_ct_delete(ct, 0, 0);

+   if (del_timer(>timeout))
+   nf_ct_delete(ct, 0, 0);
nf_conntrack_put(>ct_general);
}
}
@@ -705,7 +706,8 @@  static bool skb_nfct_cached(struct net *net,
 * the reference.
 */
if (nf_ct_is_confirmed(ct))
-   nf_ct_delete(ct, 0, 0);
+   if (del_timer(>timeout))
+   nf_ct_delete(ct, 0, 0);
  
  		nf_conntrack_put(>ct_general);

nf_ct_set(skb, NULL, 0);


If that's the case, we should say thank Eric.
Thanks,
fbl


Fantastic, I'll test this and whip up a patch.

Thanks!

- Greg





Here is the trace:
[252257.801809] BUG: unable to handle kernel paging request at c07c6298
[252257.802451] IP: [] run_timer_softirq+0xe0/0x310
[252257.803055] PGD 19f5067 PUD 19f7067 PMD 2fb5fc2067 PTE 0
[252257.803559] Oops: 0002 [#1] SMP
[252257.804138] Modules linked in: geneve ip6_udp_tunnel xt_statistic 
xt_physdev xt_nat xt_recent xt_comment xt_mark ipt_MASQUERADE 
nf_nat_masquerade_ipv4 iptable_nat xt_addrtype ipt_REJECT nf_reject_ipv4 
xt_conntrack iptable_filter ip_tables nf_conntrack_netlink br_netfilter 
overlay(T) sch_htb veth udp_tunnel 8021q garp mrp tun ip_set nfnetlink bridge 
stp llc nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 nf_conntrack_ipv4 
nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iTCO_wdt iTCO_vendor_support 
dcdbas mxm_wmi sb_edac edac_core intel_powerclamp coretemp intel_rapl iosf_mbi 
kvm_intel kvm irqbypass crc32_pclmul ghash_clmulni_intel aesni_intel lrw 
gf128mul glue_helper ablk_helper cryptd joydev mei_me sg mei ipmi_ssif pcspkr 
shpchp lpc_ich ipmi_si ipmi_devintf ipmi_msghandler acpi_power_meter wmi nfsd 
auth_rpcgss
[252257.808079] nfs_acl lockd grace sunrpc xfs libcrc32c sr_mod sd_mod cdrom 
crc_t10dif crct10dif_generic uas usb_storage mgag200 drm_kms_helper syscopyarea 
sysfillrect sysimgblt fb_sys_fops ttm drm crct10dif_pclmul crct10dif_common 
crc32c_intel ahci libahci ixgbe libata igb megaraid_sas mdio ptp i2c_algo_bit 
pps_core i2c_core dca dm_mirror dm_region_hash dm_log dm_mod [last unloaded: 
openvswitch]
[252257.811056] CPU: 33 PID: 0 Comm: swapper/33 Tainted: G OE  T 
3.10.0-693.el7.x86_64 #1
[252257.811826] Hardware name: Dell Inc. PowerEdge R630/02C2CP, BIOS 2.1.5 
04/11/2016
[252257.812605] task: 8830b7708fd0 ti: 8830b7718000 task.ti: 
8830b7718000
[252257.813447] RIP: 0010:[] [] 
run_timer_softirq+0xe0/0x310
[252257.814298] RSP: 0018:885fbe203e68 EFLAGS: 00010082
[252257.815122] RAX: 8830b66bc838 RBX: 8830b66bc000 RCX: 
c07c6290
[252257.815933] RDX: 8830b66bc810 RSI: 885fbe203e90 RDI: 
8830b66bc000
[252257.816733] RBP: 885fbe203ed0 R08: e56b5701d800 R09: 
885fbe203da0
[252257.817568] R10: 0002 R11: 885fbe203da8 R12: 
0081
[252257.818429] R13: e56b56fb2eca R14: 819eb0c8 R15: 
0001

Re: [ovs-dev] [PATCH v2] ovs-ofctl: Fixed the "snoop" command of ovs-ofctl

2018-04-19 Thread Ashish Varma
Sure, I will update the comment in the code to explain the effect of using:
 "use_names = 0".
Also, would change the comment in the commit back to the original message.
Thanks,

On Wed, Apr 18, 2018 at 4:29 PM, Ben Pfaff  wrote:

> On Tue, Apr 17, 2018 at 06:40:46PM -0700, Ashish Varma wrote:
> > In normal ovs-ofctl commands (e.g. add-flow), ovs-ofctl connects to
> > ovs-vswitchd process on “/.mgmt” unix socket.
> > In an output that contains a port or table, port name or table name can
> be
> > displayed, instead of their numbers, if the user turns on this feature.
> > (by -—names option) Also, this feature is enabled when interacting with
> a user
> > on console.  To fetch the names, ovs-ofctl sends TABLE FEATURE /
> > PORT DESCRIPTION request message to ovs-vswitchd process and expects a
> reply
> > on the connection.
> > When ovs-ofctl runs the snoop command, it connects to
> > “/.snoop” unix socket. ovs-vswitchd process
> would
> > not reply to the TABLE FEATURE / PORT DESCRIPTION request message on this
> > connection. It would only send any open flow message it receives from the
> > controller.
> > When using port/table name feature with snoop command, the print of open
> flow
> > message would call ‘tables_to_show()’/‘ports_to_show()’ which in turn
> would
> > send the request message on the snoop connection. ovs-vswitchd would not
> reply
> > back on this connection, but instead would keep sending the open flow
> messages
> > received from controller. ‘table_iterator_next()/port_iterator_next()’
> function
> > would loop for ever waiting for response.
> > The fix for this is to turn off display of table/port names when running
> > snoop command.
> >
> > Signed-off-by: Ashish Varma 
> > ---
> > v1-v2
> >
> > Added more description to the cause of the issue and reason to add the
> fix.
>
> Thanks for the update.
>
> I think I didn't describe my request on v1 very well.  I thought that
> the commit message was fine; it described the problem and the solution
> well.  I was asking for the comment in the code to describe the problem
> that it solved.  As is, the following comment:
> > +use_names = 0; /* don't show port and table names */
> explains the immediate effect, but not why.  The "why" is more important
> than the immediate effect, because the effect is pretty easy to
> understand if the reader looks at the comments on the definition of
> "use_names", but the reason is nonobvious.
>
> Thanks,
>
> Ben.
>
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH V2] datapath: Prevent panic

2018-04-19 Thread Flavio Leitner
On Tue, Apr 17, 2018 at 12:34:08PM -0700, Greg Rose wrote:
> On RHEL 7.x kernels we observe a panic induced by a paging error
> when the timer kicks off a job that subsequently accesses memory
> that belonged to the openvswitch kernel module but was since
> unloaded - thus the paging error.
> 
> The panic can be induced on any RHEL 7.x kernel with the following test:
> 
> while `true`
> do
> make check-kmod TESTSUITEFLAGS="-k \!gre"
> done
> 
> On the systems I've been testing on it generally takes anywhere from a
> minute to 15 minutes or so to repro but never longer than that.  Similar
> results have been seen by other testers.
> 
> This patch does not fix the underlying bug, which does need to be
> investigated and fixed, but it does prevent it from occurring. We
> would like to prevent customer systems from panicking while we do
> futher investigation to find the root cause.

This looks like related and it is fixed in kernel-3.10.0-842.el7 as
part of 7.5.

Bug 1531680 - openvswitch: list_add corruption splat on running OVS
check-kernel tests 
[...]
Running the OVS check-kernel on kernel-3.10.0-826.el7 results in a
splat and/or panic. I bisected this down to:

fc2302dde0d9 ("[net] openvswitch: Fix refcount leak on force commit")

I believe this is caused by a missing del_timer() when deleting the ct
in OVS. RHEL7 does not yet have the changes to remove the timers
(f330a7fdbe16 ("netfilter: conntrack: get rid of conntrack timer")).
The force commit feature was added upstream _after_ f330a7fdbe16.

And the RHEL-only patch is:
diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c
index 7582bf79033e..ef2a324e88b4 100644
--- a/net/openvswitch/conntrack.c
+++ b/net/openvswitch/conntrack.c
@@ -554,7 +554,8 @@  ovs_ct_expect_find(struct net *net, const struct
nf_conntrack_zone *zone,
if (h) {
struct nf_conn *ct = nf_ct_tuplehash_to_ctrack(h);
 
-   nf_ct_delete(ct, 0, 0);
+   if (del_timer(>timeout))
+   nf_ct_delete(ct, 0, 0);
nf_conntrack_put(>ct_general);
}
}
@@ -705,7 +706,8 @@  static bool skb_nfct_cached(struct net *net,
 * the reference.
 */
if (nf_ct_is_confirmed(ct))
-   nf_ct_delete(ct, 0, 0);
+   if (del_timer(>timeout))
+   nf_ct_delete(ct, 0, 0);
 
nf_conntrack_put(>ct_general);
nf_ct_set(skb, NULL, 0);


If that's the case, we should say thank Eric.
Thanks,
fbl


> Here is the trace:
> [252257.801809] BUG: unable to handle kernel paging request at 
> c07c6298
> [252257.802451] IP: [] run_timer_softirq+0xe0/0x310
> [252257.803055] PGD 19f5067 PUD 19f7067 PMD 2fb5fc2067 PTE 0
> [252257.803559] Oops: 0002 [#1] SMP
> [252257.804138] Modules linked in: geneve ip6_udp_tunnel xt_statistic 
> xt_physdev xt_nat xt_recent xt_comment xt_mark ipt_MASQUERADE 
> nf_nat_masquerade_ipv4 iptable_nat xt_addrtype ipt_REJECT nf_reject_ipv4 
> xt_conntrack iptable_filter ip_tables nf_conntrack_netlink br_netfilter 
> overlay(T) sch_htb veth udp_tunnel 8021q garp mrp tun ip_set nfnetlink bridge 
> stp llc nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 nf_conntrack_ipv4 
> nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iTCO_wdt iTCO_vendor_support 
> dcdbas mxm_wmi sb_edac edac_core intel_powerclamp coretemp intel_rapl 
> iosf_mbi kvm_intel kvm irqbypass crc32_pclmul ghash_clmulni_intel aesni_intel 
> lrw gf128mul glue_helper ablk_helper cryptd joydev mei_me sg mei ipmi_ssif 
> pcspkr shpchp lpc_ich ipmi_si ipmi_devintf ipmi_msghandler acpi_power_meter 
> wmi nfsd auth_rpcgss
> [252257.808079] nfs_acl lockd grace sunrpc xfs libcrc32c sr_mod sd_mod cdrom 
> crc_t10dif crct10dif_generic uas usb_storage mgag200 drm_kms_helper 
> syscopyarea sysfillrect sysimgblt fb_sys_fops ttm drm crct10dif_pclmul 
> crct10dif_common crc32c_intel ahci libahci ixgbe libata igb megaraid_sas mdio 
> ptp i2c_algo_bit pps_core i2c_core dca dm_mirror dm_region_hash dm_log dm_mod 
> [last unloaded: openvswitch]
> [252257.811056] CPU: 33 PID: 0 Comm: swapper/33 Tainted: G OE  T 
> 3.10.0-693.el7.x86_64 #1
> [252257.811826] Hardware name: Dell Inc. PowerEdge R630/02C2CP, BIOS 2.1.5 
> 04/11/2016
> [252257.812605] task: 8830b7708fd0 ti: 8830b7718000 task.ti: 
> 8830b7718000
> [252257.813447] RIP: 0010:[] [] 
> run_timer_softirq+0xe0/0x310
> [252257.814298] RSP: 0018:885fbe203e68 EFLAGS: 00010082
> [252257.815122] RAX: 8830b66bc838 RBX: 8830b66bc000 RCX: 
> c07c6290
> [252257.815933] RDX: 8830b66bc810 RSI: 885fbe203e90 RDI: 
> 8830b66bc000
> [252257.816733] RBP: 885fbe203ed0 R08: e56b5701d800 R09: 
> 885fbe203da0
> [252257.817568] R10: 0002 R11: 885fbe203da8 R12: 
> 0081
> [252257.818429] R13: e56b56fb2eca R14: 

Re: [ovs-dev] OVS upgrade

2018-04-19 Thread Ben Pfaff
On Thu, Apr 19, 2018 at 03:32:28PM -0400, Amir Mohamad wrote:
>  I have openstack installed on one host. I have one controller (VM) and
> one Compute node (VM).
> I want to install a new version that supports OVN SFC by cloning this repo
> https://github.com/doonhammer/ovs.git

Why that one?  It's not the official OVS repo.

> In the old OVS installation:
> 1. ovsdb-server and ovs-vswitchd are in /usr/sbin
> 2. ovn-controller, ovn-northd, ovn-nbctl, etc. are in /usr/bin
> 3. conf.db is in /etc/openvswitch
> 3. ovnnb-db.db and ovnsb-db.db are in /var/lib/openvswitch
> 4. Schema ( ovn-nb.ovsschema,  ovn-sb.ovsschema,  vswitch.ovsschema, and
> vtep.ovsschema) are in /usr/share/openvswitch
> 
> My questions is:
> According to this page (upgrade section):
> http://docs.openvswitch.org/en/latest/intro/install/general/#upgrading
> , if I want to upgrade, I will need to kill the currently running OVS and
> install the new one using the same configure options as was used for
> installing the previous version, or I may end up with two versions of OVS.
> 
> So, and according to this page ( configure section ) :
> *http://docs.openvswitch.org/en/latest/intro/install/general/#configuring
> *
> 
> 
> I will need to specify the location all files need to be placed in as well
> as the location for db.
> 
> should I use the configure as follow:
> 
> $ ./configure --prefix=/usr --localstatedir=/sbin --sysconfdir=/etc
> 
> 
> OR
> 
> $ ./configure --prefix=/usr --localstatedir=/sbin --sysconfdir=/var/lib

Do you have the old build directory available?  If so, just run
"./config.status --version" to see the configuration flags that were
used.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] OVS upgrade

2018-04-19 Thread Amir Mohamad
Hi,
 I have openstack installed on one host. I have one controller (VM) and
one Compute node (VM).
I want to install a new version that supports OVN SFC by cloning this repo
https://github.com/doonhammer/ovs.git

In the old OVS installation:
1. ovsdb-server and ovs-vswitchd are in /usr/sbin
2. ovn-controller, ovn-northd, ovn-nbctl, etc. are in /usr/bin
3. conf.db is in /etc/openvswitch
3. ovnnb-db.db and ovnsb-db.db are in /var/lib/openvswitch
4. Schema ( ovn-nb.ovsschema,  ovn-sb.ovsschema,  vswitch.ovsschema, and
vtep.ovsschema) are in /usr/share/openvswitch

My questions is:
According to this page (upgrade section):
http://docs.openvswitch.org/en/latest/intro/install/general/#upgrading
, if I want to upgrade, I will need to kill the currently running OVS and
install the new one using the same configure options as was used for
installing the previous version, or I may end up with two versions of OVS.

So, and according to this page ( configure section ) :
*http://docs.openvswitch.org/en/latest/intro/install/general/#configuring
*


I will need to specify the location all files need to be placed in as well
as the location for db.

should I use the configure as follow:

$ ./configure --prefix=/usr --localstatedir=/sbin --sysconfdir=/etc


OR

$ ./configure --prefix=/usr --localstatedir=/sbin --sysconfdir=/var/lib

or

more options needs to be specified?




-- 
   Regards
Amir I. Mohamad
Assistant Lecturer
Faculty of Computers & Information
IT Dept. Cairo University

-- 

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v2 0/4] Fix URLS and and associated markups.

2018-04-19 Thread Stokes, Ian
> On Thu, Apr 19, 2018 at 03:17:08PM +0100, Ian Stokes wrote:
> > Running make check-docs has caught a number of URLs that are no longer
> > active. This patch series updates the required URLs along with some
> > mark-up changes in the docs in relation to said URLs.
> >
> > I originally looked at doing this in a single patch however as the
> > URLs are spread throughout the documentation and relate to different
> > aspects of OVS I thought it better to break this into 4 patches as the
> > changes to index and DocumentationStyle.rst may have more input than the
> others.
> 
> These all seem good to me.
> 
> Do you want me to apply them directly or do you prefer to roll them into
> your next pull request?

Thanks Ben, I've started prepping a pull request for tomorrow, I can roll these 
into it as well in that.

Thanks
Ian
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v2 1/1] netdev-dpdk: fix RX jumbo for NICs not supporting scatter

2018-04-19 Thread Kevin Traynor
On 04/19/2018 03:32 PM, Pablo Cascón wrote:
> On 18/04/18 18:35, Kevin Traynor wrote:
>> On 04/18/2018 03:41 PM, Pablo Cascón wrote:
>>> On 13/04/18 19:45, Kevin Traynor wrote:
 On 04/13/2018 04:20 PM, Stokes, Ian wrote:
>> Currently to RX jumbo packets fails for NICs not supporting scatter.
>> Scatter is not strictly needed for jumbo support on RX. This change
>> fixes
>> the issue by only enabling scatter for NICs supporting it. Add a
>> quirk for
>> "igb" while the PMD is fixed to advertise scatter.
>>
> Thanks for the v2 Pablo.
>
> Adding Eelco and Kevin as they had some comments on the v1.
>
> FYI I'm investigating on the DPDK side to see how/when the flag
> should be set and used for igb and ixgbe as well as other drivers.
>
> https://dpdk.org/ml/archives/dev/2018-April/097056.html
>
>> Reported-by: Louis Peens
>> Signed-off-by: Pablo Cascón
>> Reviewed-by: Simon Horman
>> ---
>>lib/netdev-dpdk.c | 10 +-
>>1 file changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index
>> ee39cbe..8f6a0a3
>> 100644
>> --- a/lib/netdev-dpdk.c
>> +++ b/lib/netdev-dpdk.c
>> @@ -694,11 +694,19 @@ dpdk_eth_dev_queue_setup(struct netdev_dpdk
>> *dev,
>> int n_rxq, int n_txq)
>>int diag = 0;
>>int i;
>>struct rte_eth_conf conf = port_conf;
>> +struct rte_eth_dev_info info;
>>
>>/* For some NICs (e.g. Niantic), scatter_rx mode needs to be
>> explicitly
>> * enabled. */
>>if (dev->mtu > ETHER_MTU) {
>> -conf.rxmode.enable_scatter = 1;
>> +rte_eth_dev_info_get(dev->port_id, );
>> +if (info.rx_offload_capa & DEV_RX_OFFLOAD_SCATTER) {
>> +conf.rxmode.enable_scatter = 1;
>> +} else if (!strcmp(info.driver_name, "igb")) {
>> +/* Quirk: as of DPDK 17.11.1 igb's PMD requires
>> explicitly
>> +   enabling scatter but fails to advertise it. */
 Can you check name for "nfp" and don't set enable_scatter? I don't
 think
 most of the PMDs used these new offload defines in DPDK17.11.
>>> (sorry for the delay replying, was on PTO)
>>>
>>> While it is technically possible to do that for the "nfp" it is not the
>>> preferred solution IMHO. The "nfp" PMD is doing the right thing (TM) by
>>> not advertising it supports scatter (it doesn't) and not requiring it
>>> for jumbo traffic. If we're to add a quirk it should be for the
>>> to-be-fixed PMD(s).
>>>
>> I will agree with you...but only in the future :-)
>>
>> You are considering that the other drivers are to-be-fixed but OVS
>> supports DPDK 17.11 LTS and it is not required for PMDs to support the
>> new offloads API (of which this define is associated with). So, Ian can
>> correct me if I'm wrong, but I don't think that other PMDs need to or
>> will set this flag in any 17.11.X stable release.
> 
> I see, was assuming that PMDs were required to use the capabilities from
> the time they were added. If the PMDs are not required to then for "DPDK
> 17.11.x stable release" the capability bit is not something to reliably
> check. Then it could make sense to rely on other information such as the
> driver name.
> 
> (note that the table at
> https://dpdk.org/doc/guides/nics/overview.html#id1 does not match the
> code at least for "igb" on master or tag 17.11, so might not be a
> reliable way to know either)
> 
> 
>>
>> That's why I think it's better to make the exception for "nfp" at
>> present. It works for nfp, it works for Intel and it works for any other
>> NICs that currently work.
> There's some logic to it, something like "only add code for the device
> driver we're supporting in a better way or fixing as to avoid to
> potentially breaking others". The counter argument is that jumbo does
> not mean scatter and this patch is removing that link.
> 
> One way to look at it is that there are 2 different parts of the issue:
> 1) jumbo RX does not need scatter
> 2) there's no trivial way, without testing, to tell which NICs a)
> require scatter (and support it) even if it is not advertised and b)
> support jumbo with or without scatter
> 
> IMHO we should fix 1 with this patch as current code is wrongly linking
> the jumbo and scatter. And for 2 let NIC maintainers test it while the
> review process (or after) and add a quirk if need be (only for PMDs that
> won't RX jumbo otherwise, regardless of what they advertise). "igb" can
> be covered once tested and others will come if needed.
> 

I'm not totally against that approach. I'm just a little concerned that
the default is changing and other NIC vendors might not notice or test
for a long time, but you are right that it is technically the more
correct way to do things.

> 
>>
>> 

[ovs-dev] Could be a bug: extremely long latency for ovn-controller to get SB update in scale test

2018-04-19 Thread Han Zhou
While working on ovn-controller incremental processing, I was testing the
end-to-end latency and comparing with master. I found the latency with
master branch is extremely long while changing the way of testing makes it
much shorter. The master branch was at commit 593e93e5f (ovsdb clustering
was not merged yet). I promised in last ovn meeting to send a report and
here are the details.

*Precondition: *
there are 1k sandbox HVs connected, and 10k lports already created and
bound on these HVs. There are 8 lrouters, each connected with 5 lswitches,
and each lswitch has 250 lports.

*Test: *
- on a sandbox (HV1), create a ovs-port:
# ovs-vsctl add-port br-int lsp1 -- set interface lsp1 type=internal -- set
interface lsp1 external-ids:iface-id=lsp1

- create the lport on NB on a lswitch that is not yet in local datapath of
HV1, wait for port up and then sync HVs
# time ovn-nbctl lsp-add lswitch_b9322b_ecpmKt lsp1 -- lsp-set-addresses
lsp1 "aa:aa:aa:aa:aa:aa 172.145.222.222"; time ovn-nbctl wait-until
Logical_Switch_Port lsp1 up=true; time ovn-nbctl --wait=hv sync

*Result:*
real0m0.408s
user0m0.316s
sys 0m0.008s

real0m4.837s
user0m0.348s
sys 0m0.012s

*real7m48.373s*
user0m0.348s
sys 0m0.016s

*Notes: *

- the time for the last --wait=hv sync is extremely long: 7m48s.

- the test is with the patch for nb_cfg separation (
https://patchwork.ozlabs.org/patch/899608/), so that --wait=hv sync is
optimized without notification flooding.

- the lswitch where the lsp1 is added doesn't belong to any existing local
datapath on HV1, i.e., there is no other existing lport on HV1 in this
lswitch or any other lswitch that is connected with this lswitch by the
same lrouter. This means when adding the lport the HV1 will change monitor
condition to watch on a new set of datapaths and port-bindings on them.
 (tested with adding the lsp1 on an existing local datapath, there is no
such extremely long latency.)

- adding a command to sync hvs before waiting for port up changes the
behavior: the total latency is only 20+ seconds then:
 # time ovn-nbctl lsp-add lswitch_b9322b_ecpmKt lsp1 --
lsp-set-addresses lsp1 "aa:aa:aa:aa:aa:aa 172.145.222.222"; *time ovn-nbctl
--wait=hv sync;* time ovn-nbctl wait-until Logical_Switch_Port lsp1
up=true; time ovn-nbctl --wait=hv sync

*Debug log analysis:*

With debug log enabled for ovn-controller, I found that the latency was
because ovn-controller didn't get any SB update during the 7+ minutes. Here
are the related logs and analysis:

// HV1 got notification of lsp1 port binding added by northd after the lsp1
is created in NB
2018-03-20T00:00:07.353Z|51461|jsonrpc|DBG|tcp:192.168.10.10:6640: received
notification, method="update2",
params=["monid",{"Port_Binding":{"d6f145bf-ac8f-4107-a565-9ef1fcc9ec6c":{"insert":{"tunnel_key":252,"mac":"aa:aa:aa:aa:aa:aa
172.145.222.222","logical_port":"lsp1","datapath":["uuid","bb979633-789e-4ef8-9663-51839f000c0f"]]


// Claim the lsp1 on this chassis
2018-03-20T00:00:07.367Z|51465|binding|INFO|Claiming lport lsp1 for this
chassis.
2018-03-20T00:00:07.367Z|51466|binding|INFO|lsp1: Claiming
aa:aa:aa:aa:aa:aa 172.145.222.222

// Update port binding to this chassis
2018-03-20T00:00:11.381Z|51588|jsonrpc|DBG|tcp:192.168.10.10:6640: send
request, method="transact",
params=["OVN_Southbound",{"where":[["_uuid","==",["uuid","d6f145bf-ac8f-4107-a565-9ef1fcc9ec6c"]]],"row":{"chassis":["uuid","b2f297f6-cd8b-4429-94f0-274a24d6640a"]},"op":"update","table":"Port_Binding"}],
id=*2169*

// Send request to change monitor conditions for new local datapaths
2018-03-20T00:00:11.382Z|51594|jsonrpc|DBG|tcp:192.168.10.10:6640: send
request, method=“monitor_cond_change” … id=*2170*

// Received notification for its own port-binding update
2018-03-20T00:00:11.383Z|51595|jsonrpc|DBG|tcp:192.168.10.10:6640: received
notification, method="update2",
params=["monid",{"Port_Binding":{"d6f145bf-ac8f-4107-a565-9ef1fcc9ec6c":{"modify":{"chassis":["uuid","b2f297f6-cd8b-4429-94f0-274a24d6640a"]]

2018-03-20T00:00:11.383Z|51596|jsonrpc|DBG|tcp:192.168.10.10:6640: received
reply, result=[{"count":1}], id=*2169*

*/ 7 minutes later ... but why???*

// Received the notification for the new monitor condition related data
(it's huge data)
2018-03-20T00:07:56.183Z|52643|jsonrpc|DBG|tcp:192.168.10.10:6640: received
notification, method="update2",
params=["monid",{"Multicast_Group":{"944391c4-7bf9-4d46-9662-966f9a5450e0":{"insert":{"ports":["set",[["uuid","00d22282-ac38-4a4e-8f47-3684fa915051"],["uuid","03010cdb-647b-4a1d-b0ca-7f4b0e7a6862"],["uuid","03ba954f-5c96-47f0-b517-4f30b2e61907"],["uuid","0480cf96-5158-45aa-ba49-6053cdec5ce3"],["uuid","052397f5-ebb3-4e81-9970-...(huge
data)...

2018-03-20T00:07:56.386Z|52644|jsonrpc|DBG|tcp:192.168.10.10:6640: received
reply, result={}, id=

*2170*
// Received the nb_cfg change triggered by the --wait=hv sync command,
together with the lflow update caused by the port status change: up=true

Re: [ovs-dev] [PATCH] ofproto: Allow bundle idle timeout to be configured.

2018-04-19 Thread Flavio Leitner
On Fri, Apr 13, 2018 at 10:48:09AM -0700, Ben Pfaff wrote:
> On Fri, Apr 13, 2018 at 01:45:30PM -0300, Flavio Leitner wrote:
> > In some cases 10 seconds might be too much time and in
> > other cases it might be too little.
> > 
> > The OpenFlow spec mandates that it should wait at least one
> > second, so enforce that as the minimum acceptable value.
> > 
> > Signed-off-by: Flavio Leitner 
> 
> Thanks for the patch.
> 
> I don't think that this will set the idle timeout back to the default if
> the setting is removed.  It's better if there's that behavior.

Agreed.

> What do you think of this incremental?  I have not tested it but it is
> meant to behave that way.  Also it avoids integer overflow.

I sent out a v2 including your fix and another test case:
https://mail.openvswitch.org/pipermail/ovs-dev/2018-April/346319.html

Thanks Ben,
fbl

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v2] ofproto: Allow bundle idle timeout to be configured.

2018-04-19 Thread Flavio Leitner
In some cases 10 seconds might be too much time and in
other cases it might be too little.

The OpenFlow spec mandates that it should wait at least one
second, so enforce that as the minimum acceptable value.

Signed-off-by: Flavio Leitner 
---
 ofproto/connmgr.c  |  24 +++--
 ofproto/connmgr.h  |   2 +
 ofproto/ofproto.c  |   7 +++
 ofproto/ofproto.h  |   1 +
 tests/ofproto.at   | 129 +
 vswitchd/bridge.c  |   3 +-
 vswitchd/ovs-vswitchd.8.in |   5 +-
 vswitchd/vswitch.xml   |  12 +
 8 files changed, 176 insertions(+), 7 deletions(-)

* V2
  - Included Ben's fix to use default if the config is removed.
  - Added addditional test to cover the above situation.
  - Made the timeout setting more clear.

diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c
index 964b8c8d8..f78b4c5ff 100644
--- a/ofproto/connmgr.c
+++ b/ofproto/connmgr.c
@@ -37,6 +37,7 @@
 #include "openvswitch/poll-loop.h"
 #include "openvswitch/rconn.h"
 #include "openvswitch/shash.h"
+#include "sat-math.h"
 #include "simap.h"
 #include "stream.h"
 #include "timeval.h"
@@ -138,10 +139,11 @@ struct ofconn {
 
 /* vswitchd/ovs-vswitchd.8.in documents the value of BUNDLE_IDLE_LIFETIME in
  * seconds.  That documentation must be kept in sync with the value below. */
-enum {
-BUNDLE_EXPIRY_INTERVAL = 1000,  /* Check bundle expiry every 1 sec. */
-BUNDLE_IDLE_TIMEOUT = 1,/* Expire idle bundles after 10 seconds. */
-};
+#define BUNDLE_EXPIRY_INTERVAL 1000 /* Check bundle expiry every 1 sec. */
+#define BUNDLE_IDLE_TIMEOUT_DEFAULT 1   /* Expire idle bundles after
+ * 10 seconds. */
+
+static unsigned int bundle_idle_timeout = BUNDLE_IDLE_TIMEOUT_DEFAULT;
 
 static struct ofconn *ofconn_create(struct connmgr *, struct rconn *,
 enum ofconn_type, bool enable_async_msgs)
@@ -469,6 +471,18 @@ ofconn_get_ofproto(const struct ofconn *ofconn)
 {
 return ofconn->connmgr->ofproto;
 }
+
+/* Sets the bundle idle timeout to 'timeout' seconds, interpreting 0 as
+ * requesting the default timeout.
+ *
+ * The OpenFlow spec mandates the timeout to be at least one second; . */
+void
+connmgr_set_bundle_idle_timeout(unsigned timeout)
+{
+bundle_idle_timeout = (timeout
+   ? sat_mul(timeout, 1000)
+   : BUNDLE_IDLE_TIMEOUT_DEFAULT);
+}
 
 /* OpenFlow configuration. */
 
@@ -1247,7 +1261,7 @@ static void
 bundle_remove_expired(struct ofconn *ofconn, long long int now)
 {
 struct ofp_bundle *b, *next;
-long long int limit = now - BUNDLE_IDLE_TIMEOUT;
+long long int limit = now - bundle_idle_timeout;
 
 HMAP_FOR_EACH_SAFE (b, next, node, >bundles) {
 if (b->used <= limit) {
diff --git a/ofproto/connmgr.h b/ofproto/connmgr.h
index 2405fbd79..eb3be1668 100644
--- a/ofproto/connmgr.h
+++ b/ofproto/connmgr.h
@@ -86,6 +86,8 @@ void connmgr_get_memory_usage(const struct connmgr *, struct 
simap *usage);
 
 struct ofproto *ofconn_get_ofproto(const struct ofconn *);
 
+void connmgr_set_bundle_idle_timeout(unsigned timeout);
+
 void connmgr_retry(struct connmgr *);
 
 /* OpenFlow configuration. */
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index 36f4c0b16..4af7e6486 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -680,6 +680,13 @@ ofproto_set_in_band_queue(struct ofproto *ofproto, int 
queue_id)
 connmgr_set_in_band_queue(ofproto->connmgr, queue_id);
 }
 
+/* Sets the bundle max idle timeout */
+void
+ofproto_set_bundle_idle_timeout(unsigned timeout)
+{
+connmgr_set_bundle_idle_timeout(timeout);
+}
+
 /* Sets the number of flows at which eviction from the kernel flow table
  * will occur. */
 void
diff --git a/ofproto/ofproto.h b/ofproto/ofproto.h
index 8c85bbf7f..3ca88baf0 100644
--- a/ofproto/ofproto.h
+++ b/ofproto/ofproto.h
@@ -312,6 +312,7 @@ void ofproto_reconnect_controllers(struct ofproto *);
 void ofproto_set_extra_in_band_remotes(struct ofproto *,
const struct sockaddr_in *, size_t n);
 void ofproto_set_in_band_queue(struct ofproto *, int queue_id);
+void ofproto_set_bundle_idle_timeout(unsigned timeout);
 void ofproto_set_flow_limit(unsigned limit);
 void ofproto_set_max_idle(unsigned max_idle);
 void ofproto_set_forward_bpdu(struct ofproto *, bool forward_bpdu);
diff --git a/tests/ofproto.at b/tests/ofproto.at
index c1beea7ae..bf4166aea 100644
--- a/tests/ofproto.at
+++ b/tests/ofproto.at
@@ -5456,6 +5456,135 @@ OFPT_BARRIER_REPLY (OF1.4):
 OVS_VSWITCHD_STOP
 AT_CLEANUP
 
+AT_SETUP([ofproto - bundle custom timeout (OpenFlow 1.4)])
+AT_KEYWORDS([monitor])
+OVS_VSWITCHD_START
+
+AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:bundle-idle-timeout=4])
+
+# Start a monitor, use the required protocol version
+ovs-ofctl -O OpenFlow14 monitor br0 --detach --no-chdir --pidfile >monitor.log 
2>&1

Re: [ovs-dev] [PATCH] ofproto-dpif-upcall: Only call ovsrcu_postpone() on active actions

2018-04-19 Thread Ben Pfaff
On Thu, Apr 19, 2018 at 01:24:06PM +0200, Eelco Chaudron wrote:
> Currently, ovsrcu_postpone() is called even with a NULL argument,
> i.e. when there is no data to be freed. This is causing additional
> overhead because work is scheduled for the urcu thread. This change
> avoids adding the postpone callback if no work needs to be done.
> 
> This especially helps for the OVS-DPDK case where the PMD threads
> might no longer have to do a write() due to the latch_set(), and thus
> saving a syscall.
> 
> Signed-off-by: Eelco Chaudron 

Wow, good catch!

Thanks, I applied this to master.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v2] python: Tighten the check if we need encoding

2018-04-19 Thread Ben Pfaff
On Thu, Apr 19, 2018 at 11:33:21AM +0200, Jakub Sitnicki wrote:
> Check if we are dealing with a Unicode string that needs
> encoding for both Python 2 & 3.
> 
> Also, do the encoding the same way for Python 2 & 3 and avoid using
> negation to make the code simpler.
> 
> v1 -> v2: Rewrite the check for Unicode string to avoid flake8 warnings.
> 
> Signed-off-by: Jakub Sitnicki 
> ---
> 
> Ben,
> 
> Thanks for pointing out the flake8 warnings. It was poorly done.
> 
> This version should read much better, and be free of warnings.

Thanks, I applied this version to master.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v2 0/4] Fix URLS and and associated markups.

2018-04-19 Thread Ben Pfaff
On Thu, Apr 19, 2018 at 03:17:08PM +0100, Ian Stokes wrote:
> Running make check-docs has caught a number of URLs that are no longer
> active. This patch series updates the required URLs along with some mark-up
> changes in the docs in relation to said URLs.
> 
> I originally looked at doing this in a single patch however as the URLs
> are spread throughout the documentation and relate to different aspects
> of OVS I thought it better to break this into 4 patches as the changes to
> index and DocumentationStyle.rst may have more input than the others.

These all seem good to me.

Do you want me to apply them directly or do you prefer to roll them into
your next pull request?
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v3] rhel: user/group openvswitch does not exist

2018-04-19 Thread Aaron Conole
From: Alan Pevec 

Default ownership[1] for config files is failing on an empty system:
  Running scriptlet: openvswitch-2.9.0-3.fc28.x86_64
warning: user openvswitch does not exist - using root
warning: group openvswitch does not exist - using root
...

Required user/group need to be created in %pre as documented in
Fedora guideline[2]

[1] 
https://github.com/openvswitch/ovs/commit/951d79e638ecdb3b1dcd19df1adb2ff91fe61af8

[2] https://fedoraproject.org/wiki/Packaging:UsersAndGroups#Dynamic_allocation

Submitted-at: https://github.com/openvswitch/ovs/pull/223
Signed-off-by: Alan Pevec 
Co-authored-by: Aaron Conole 
Signed-off-by: Aaron Conole 
---
v3:
 * re-introduce 'exit 0' in %pre after discussion with Marcos and Alan

v2:
 * Removed the requires(post) lines
 * Removed 'exit 0'

 rhel/openvswitch-fedora.spec.in | 21 +
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in
index 658eb206c..04909c8d3 100644
--- a/rhel/openvswitch-fedora.spec.in
+++ b/rhel/openvswitch-fedora.spec.in
@@ -92,8 +92,7 @@ Requires: openssl hostname iproute module-init-tools
 #Upstream kernel commit 4f647e0a3c37b8d5086214128614a136064110c3
 #Requires: kernel >= 3.15.0-0
 
-Requires(post): /usr/bin/getent
-Requires(post): /usr/sbin/useradd
+Requires(pre): shadow-utils
 Requires(post): /usr/bin/sed
 %if %{with dpdk}
 Requires(post): /usr/sbin/usermod
@@ -384,17 +383,23 @@ rm -rf $RPM_BUILD_ROOT
 fi
 %endif
 
+%pre
+getent group openvswitch >/dev/null || groupadd -r openvswitch
+getent passwd openvswitch >/dev/null || \
+useradd -r -g openvswitch -d / -s /sbin/nologin \
+-c "Open vSwitch Daemons" openvswitch
+
+%if %{with dpdk}
+getent group hugetlbfs >/dev/null || groupadd hugetlbfs
+usermod -a -G hugetlbfs openvswitch
+%endif
+exit 0
+
 %post
 if [ $1 -eq 1 ]; then
-getent passwd openvswitch >/dev/null || \
-useradd -r -d / -s /sbin/nologin -c "Open vSwitch Daemons" openvswitch
-
 sed -i 's:^#OVS_USER_ID=:OVS_USER_ID=:' /etc/sysconfig/openvswitch
 
 %if %{with dpdk}
-getent group hugetlbfs >/dev/null || \
-groupadd hugetlbfs
-usermod -a -G hugetlbfs openvswitch
 sed -i \
 
's@OVS_USER_ID="openvswitch:openvswitch"@OVS_USER_ID="openvswitch:hugetlbfs"@'\
 /etc/sysconfig/openvswitch
-- 
2.14.3

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v3 2/9] doc: Add "PMD" topic document

2018-04-19 Thread Kevin Traynor
On 04/19/2018 01:57 PM, Stephen Finucane wrote:
> This continues the breakup of the huge DPDK "howto" into smaller
> components. There are a couple of related changes included, such as
> using "Rx queue" instead of "rxq" and noting how Tx queues cannot be
> configured.
> 
> Signed-off-by: Stephen Finucane 
> ---
> v3:
> - Add new files to automake.mk
> - Add additional 'versionchanged' information for 'pmd-rxq-show' command
> v2:
> - Add cross-references from 'pmd' doc to 'vhost-user' and 'phy' docs
> - Add 'versionchanged' warning about automatic assignment of Rx queues
> - Add a 'todo' to describe Tx queue behavior
> ---
>  Documentation/automake.mk|   1 +
>  Documentation/howto/dpdk.rst |  86 -
>  Documentation/topics/dpdk/index.rst  |   1 +
>  Documentation/topics/dpdk/phy.rst|  12 +++
>  Documentation/topics/dpdk/pmd.rst| 161 
> +++
>  Documentation/topics/dpdk/vhost-user.rst |  17 ++--
>  6 files changed, 183 insertions(+), 95 deletions(-)
>  create mode 100644 Documentation/topics/dpdk/pmd.rst
> 
> diff --git a/Documentation/automake.mk b/Documentation/automake.mk
> index cd8f3dc0d..878de4349 100644
> --- a/Documentation/automake.mk
> +++ b/Documentation/automake.mk
> @@ -35,6 +35,7 @@ DOC_SOURCE = \
>   Documentation/topics/design.rst \
>   Documentation/topics/dpdk/index.rst \
>   Documentation/topics/dpdk/phy.rst \
> + Documentation/topics/dpdk/pmd.rst \
>   Documentation/topics/dpdk/ring.rst \
>   Documentation/topics/dpdk/vhost-user.rst \
>   Documentation/topics/testing.rst \
> diff --git a/Documentation/howto/dpdk.rst b/Documentation/howto/dpdk.rst
> index 79b626c76..388728363 100644
> --- a/Documentation/howto/dpdk.rst
> +++ b/Documentation/howto/dpdk.rst
> @@ -81,92 +81,6 @@ To stop ovs-vswitchd & delete bridge, run::
>  $ ovs-appctl -t ovsdb-server exit
>  $ ovs-vsctl del-br br0
>  
> -PMD Thread Statistics
> --
> -
> -To show current stats::
> -
> -$ ovs-appctl dpif-netdev/pmd-stats-show
> -
> -To clear previous stats::
> -
> -$ ovs-appctl dpif-netdev/pmd-stats-clear
> -
> -Port/RXQ Assigment to PMD Threads
> --
> -
> -To show port/rxq assignment::
> -
> -$ ovs-appctl dpif-netdev/pmd-rxq-show
> -
> -To change default rxq assignment to pmd threads, rxqs may be manually pinned 
> to
> -desired cores using::
> -
> -$ ovs-vsctl set Interface  \
> -other_config:pmd-rxq-affinity=
> -
> -where:
> -
> --  is a CSV list of ``:`` values
> -
> -For example::
> -
> -$ ovs-vsctl set interface dpdk-p0 options:n_rxq=4 \
> -other_config:pmd-rxq-affinity="0:3,1:7,3:8"
> -
> -This will ensure:
> -
> -- Queue #0 pinned to core 3
> -- Queue #1 pinned to core 7
> -- Queue #2 not pinned
> -- Queue #3 pinned to core 8
> -
> -After that PMD threads on cores where RX queues was pinned will become
> -``isolated``. This means that this thread will poll only pinned RX queues.
> -
> -.. warning::
> -  If there are no ``non-isolated`` PMD threads, ``non-pinned`` RX queues will
> -  not be polled. Also, if provided ``core_id`` is not available (ex. this
> -  ``core_id`` not in ``pmd-cpu-mask``), RX queue will not be polled by any 
> PMD
> -  thread.
> -
> -If pmd-rxq-affinity is not set for rxqs, they will be assigned to pmds 
> (cores)
> -automatically. The processing cycles that have been stored for each rxq
> -will be used where known to assign rxqs to pmd based on a round robin of the
> -sorted rxqs.
> -
> -For example, in the case where here there are 5 rxqs and 3 cores (e.g. 3,7,8)
> -available, and the measured usage of core cycles per rxq over the last
> -interval is seen to be:
> -
> -- Queue #0: 30%
> -- Queue #1: 80%
> -- Queue #3: 60%
> -- Queue #4: 70%
> -- Queue #5: 10%
> -
> -The rxqs will be assigned to cores 3,7,8 in the following order:
> -
> -Core 3: Q1 (80%) |
> -Core 7: Q4 (70%) | Q5 (10%)
> -core 8: Q3 (60%) | Q0 (30%)
> -
> -To see the current measured usage history of pmd core cycles for each rxq::
> -
> -$ ovs-appctl dpif-netdev/pmd-rxq-show
> -
> -.. note::
> -
> -  A history of one minute is recorded and shown for each rxq to allow for
> -  traffic pattern spikes. An rxq's pmd core cycles usage changes due to 
> traffic
> -  pattern or reconfig changes will take one minute before they are fully
> -  reflected in the stats.
> -
> -Rxq to pmds assignment takes place whenever there are configuration changes
> -or can be triggered by using::
> -
> -$ ovs-appctl dpif-netdev/pmd-rxq-rebalance
> -
>  QoS
>  ---
>  
> diff --git a/Documentation/topics/dpdk/index.rst 
> b/Documentation/topics/dpdk/index.rst
> index 5f836a6e9..dfde88377 100644
> --- a/Documentation/topics/dpdk/index.rst
> +++ b/Documentation/topics/dpdk/index.rst
> @@ -31,3 +31,4 @@ The DPDK Datapath
> phy
> vhost-user
> ring
> +   pmd
> diff --git 

Re: [ovs-dev] [PATCH v2 1/1] netdev-dpdk: fix RX jumbo for NICs not supporting scatter

2018-04-19 Thread Pablo Cascón

On 18/04/18 18:35, Kevin Traynor wrote:

On 04/18/2018 03:41 PM, Pablo Cascón wrote:

On 13/04/18 19:45, Kevin Traynor wrote:

On 04/13/2018 04:20 PM, Stokes, Ian wrote:

Currently to RX jumbo packets fails for NICs not supporting scatter.
Scatter is not strictly needed for jumbo support on RX. This change
fixes
the issue by only enabling scatter for NICs supporting it. Add a
quirk for
"igb" while the PMD is fixed to advertise scatter.


Thanks for the v2 Pablo.

Adding Eelco and Kevin as they had some comments on the v1.

FYI I'm investigating on the DPDK side to see how/when the flag
should be set and used for igb and ixgbe as well as other drivers.

https://dpdk.org/ml/archives/dev/2018-April/097056.html


Reported-by: Louis Peens
Signed-off-by: Pablo Cascón
Reviewed-by: Simon Horman
---
   lib/netdev-dpdk.c | 10 +-
   1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index
ee39cbe..8f6a0a3
100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -694,11 +694,19 @@ dpdk_eth_dev_queue_setup(struct netdev_dpdk *dev,
int n_rxq, int n_txq)
   int diag = 0;
   int i;
   struct rte_eth_conf conf = port_conf;
+struct rte_eth_dev_info info;

   /* For some NICs (e.g. Niantic), scatter_rx mode needs to be
explicitly
* enabled. */
   if (dev->mtu > ETHER_MTU) {
-conf.rxmode.enable_scatter = 1;
+rte_eth_dev_info_get(dev->port_id, );
+if (info.rx_offload_capa & DEV_RX_OFFLOAD_SCATTER) {
+conf.rxmode.enable_scatter = 1;
+} else if (!strcmp(info.driver_name, "igb")) {
+/* Quirk: as of DPDK 17.11.1 igb's PMD requires explicitly
+   enabling scatter but fails to advertise it. */

Can you check name for "nfp" and don't set enable_scatter? I don't think
most of the PMDs used these new offload defines in DPDK17.11.

(sorry for the delay replying, was on PTO)

While it is technically possible to do that for the "nfp" it is not the
preferred solution IMHO. The "nfp" PMD is doing the right thing (TM) by
not advertising it supports scatter (it doesn't) and not requiring it
for jumbo traffic. If we're to add a quirk it should be for the
to-be-fixed PMD(s).


I will agree with you...but only in the future :-)

You are considering that the other drivers are to-be-fixed but OVS
supports DPDK 17.11 LTS and it is not required for PMDs to support the
new offloads API (of which this define is associated with). So, Ian can
correct me if I'm wrong, but I don't think that other PMDs need to or
will set this flag in any 17.11.X stable release.


I see, was assuming that PMDs were required to use the capabilities from 
the time they were added. If the PMDs are not required to then for "DPDK 
17.11.x stable release" the capability bit is not something to reliably 
check. Then it could make sense to rely on other information such as the 
driver name.


(note that the table at 
https://dpdk.org/doc/guides/nics/overview.html#id1 does not match the 
code at least for "igb" on master or tag 17.11, so might not be a 
reliable way to know either)





That's why I think it's better to make the exception for "nfp" at
present. It works for nfp, it works for Intel and it works for any other
NICs that currently work.
There's some logic to it, something like "only add code for the device 
driver we're supporting in a better way or fixing as to avoid to 
potentially breaking others". The counter argument is that jumbo does 
not mean scatter and this patch is removing that link.


One way to look at it is that there are 2 different parts of the issue:
1) jumbo RX does not need scatter
2) there's no trivial way, without testing, to tell which NICs a) 
require scatter (and support it) even if it is not advertised and b) 
support jumbo with or without scatter


IMHO we should fix 1 with this patch as current code is wrongly linking 
the jumbo and scatter. And for 2 let NIC maintainers test it while the 
review process (or after) and add a quirk if need be (only for PMDs that 
won't RX jumbo otherwise, regardless of what they advertise). "igb" can 
be covered once tested and others will come if needed.





When OVS is updated to a future DPDK release where all the PMDs support
setting/not setting this flag, then I agree any workaround should be
made for NICs that are not properly reporting their status, or have quirks.


Agree with that, once PMDs are required to report their caps for those 
features not working only because of the mis reporting then a per NIC 
workaround will be required.




On a different note, and it may be irrelevant depending on the outcome
of the discussion, but this is mixing using defines introduced as part
of the new API and bitfields from the old API. It will work as both are
supported but whenever switching to the new API in OVS, we should
probably do it across the board.


Ah good to 

[ovs-dev] [PATCH v2 4/4] docs: Fix urls in index.rst.

2018-04-19 Thread Ian Stokes
This patch prepends 'www' to openvswitch urls in index.rst. Without this
make check-docs fails when verifying url liveness. Also remove url
referencing ovsdb-server(5) as these are no longer accessible.

Cc: Stephen Finucane 
Fixes: 4f6ec357c ("doc: Populate 'ref' section")
Signed-off-by: Ian Stokes 
Acked-by: Stephen Finucane 
---
v1 -> v2
No change.
---
 Documentation/ref/index.rst | 214 ++--
 1 file changed, 105 insertions(+), 109 deletions(-)

diff --git a/Documentation/ref/index.rst b/Documentation/ref/index.rst
index 5c85132..3d511de 100644
--- a/Documentation/ref/index.rst
+++ b/Documentation/ref/index.rst
@@ -50,146 +50,142 @@ The remainder are still in roff format can be found below:
 .. list-table::
 
* - ovn-architecture(7)
- - `(pdf) 
`__
- - `(html) 
`__
- - `(plain text) 
`__
+ - `(pdf) 
`__
+ - `(html) 
`__
+ - `(plain text) 
`__
* - ovn-controller(8)
- - `(pdf) 
`__
- - `(html) 
`__
- - `(plain text) 
`__
+ - `(pdf) 
`__
+ - `(html) 
`__
+ - `(plain text) 
`__
* - ovn-controller-vtep(8)
- - `(pdf) 
`__
- - `(html) 
`__
- - `(plain text) 
`__
+ - `(pdf) 
`__
+ - `(html) 
`__
+ - `(plain text) 
`__
* - ovn-ctl(8)
- - `(pdf) `__
- - `(html) `__
- - `(plain text) 
`__
+ - `(pdf) `__
+ - `(html) `__
+ - `(plain text) 
`__
* - ovn-nb(5)
- - `(pdf) `__
- - `(html) `__
- - `(plain text) `__
+ - `(pdf) `__
+ - `(html) `__
+ - `(plain text) 
`__
* - ovn-nbctl(8)
- - `(pdf) `__
- - `(html) `__
- - `(plain text) 
`__
+ - `(pdf) `__
+ - `(html) 
`__
+ - `(plain text) 
`__
* - ovn-northd(8)
- - `(pdf) `__
- - `(html) `__
- - `(plain text) 
`__
+ - `(pdf) 
`__
+ - `(html) 
`__
+ - `(plain text) 
`__
* - ovn-sb(5)
- - `(pdf) `__
- - `(html) `__
- - `(plain text) `__
+ - `(pdf) `__
+ - `(html) `__
+ - `(plain text) 

[ovs-dev] [PATCH v2 3/4] docs: Fix sphinx urls.

2018-04-19 Thread Ian Stokes
Update dead url links for sphinx documentation to avoid
make check-docs failing.

Cc: Stephen Finucane 
Fixes: 26ea2d409 ("docs: Add writing guide")
Fixes: 73c76b447 ("doc: Add info on building documentation")
Signed-off-by: Ian Stokes 
Acked-by: Stephen Finucane 
---
v1 -> v2
Use correct url for sphinx documentation.
---
 Documentation/internals/contributing/documentation-style.rst | 3 ++-
 Documentation/intro/install/documentation.rst| 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Documentation/internals/contributing/documentation-style.rst 
b/Documentation/internals/contributing/documentation-style.rst
index 07bfe2b..deb07d9 100644
--- a/Documentation/internals/contributing/documentation-style.rst
+++ b/Documentation/internals/contributing/documentation-style.rst
@@ -442,4 +442,5 @@ Useful Links
 - `Quick reStructuredText
   `__
 
-- `Sphinx Documentation `__
+- `Sphinx Documentation
+  `__
diff --git a/Documentation/intro/install/documentation.rst 
b/Documentation/intro/install/documentation.rst
index 0eeeab1..d7eb25d 100644
--- a/Documentation/intro/install/documentation.rst
+++ b/Documentation/intro/install/documentation.rst
@@ -58,7 +58,7 @@ wish to install using ``pip``::
 $ source .venv/bin/activate
 $ pip install -r Documentation/requirements.txt
 
-__ http://www.sphinx-doc.org/install.html
+__ http://www.sphinx-doc.org/en/master/usage/installation.html
 
 Configuring
 ---
@@ -86,4 +86,4 @@ Makefile targets::
 Once built, documentation is available in the ``/Documentation/_build`` folder.
 Open the root ``index.html`` to browse the documentation.
 
-__ http://www.sphinx-doc.org/config.html
+__ http://www.sphinx-doc.org/en/master/config.html
-- 
2.7.5

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v2 2/4] docs: Fix style guide url in DocumentationStyle.rst.

2018-04-19 Thread Ian Stokes
The link used for IBM Style Guide is no longer valid. As there is no
longer a valid link via redbooks remove the url to avoid make
check-docs failing.

Cc: Stephen Finucane 
Fixes: 26ea2d409 ("docs: Add writing guide")
Signed-off-by: Ian Stokes 
Acked-by: Stephen Finucane 
---
v1 -> v2
Add new link for IBM Documentation Style.
Add italics for 'IBM Documentaiton Style'.
---
 Documentation/internals/contributing/documentation-style.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/internals/contributing/documentation-style.rst 
b/Documentation/internals/contributing/documentation-style.rst
index 9c47bd6..07bfe2b 100644
--- a/Documentation/internals/contributing/documentation-style.rst
+++ b/Documentation/internals/contributing/documentation-style.rst
@@ -358,8 +358,8 @@ Writing Style
 -
 
 Follow these guidelines to ensure readability and consistency of the Open
-vSwitch documentation. These guidelines are based on the `IBM Style Guide
-`__.
+vSwitch documentation. These guidelines are based on the `/*IBM Style Guide/*
+`__.
 
 - Use standard US English
 
-- 
2.7.5

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v2 1/4] docs: Fix sflow documentation url and markup.

2018-04-19 Thread Ian Stokes
The link url link for the blog in sflow documentation causes make
check-docs to fail with a broken link warning. Fix this by correcting
the url address. Also use correct markup for note regarding the
configuration of sflow.

CC: Stephen Finucane 
Fixes: 198c5d3d0 ("doc: Add sFlow cookbook from website")
Signed-off-by: Ian Stokes 
Acked-by: Stephen Finucane 
---
v1 -> v2
Changed Docs to docs in summary.
---
 Documentation/howto/sflow.rst | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/Documentation/howto/sflow.rst b/Documentation/howto/sflow.rst
index afe1e7e..ae7737f 100644
--- a/Documentation/howto/sflow.rst
+++ b/Documentation/howto/sflow.rst
@@ -166,6 +166,9 @@ This document is heavily based on content from Neil McKee 
at InMon:
 - `https://mail.openvswitch.org/pipermail/ovs-dev/2010-July/165245.html
   `__
 
-- `http://blog.sflow.com/2010/01/open-vswitch.html
-  `__ (note: the configuration
-  syntax is out of date, but the high-level descriptions are correct)
+- `https://blog.sflow.com/2010/01/open-vswitch.html
+  `__
+
+.. note::
+  The configuration syntax is out of date, but the high-level
+  descriptions are correct.
-- 
2.7.5

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v2 0/4] Fix URLS and and associated markups.

2018-04-19 Thread Ian Stokes
Running make check-docs has caught a number of URLs that are no longer
active. This patch series updates the required URLs along with some mark-up
changes in the docs in relation to said URLs.

I originally looked at doing this in a single patch however as the URLs
are spread throughout the documentation and relate to different aspects
of OVS I thought it better to break this into 4 patches as the changes to
index and DocumentationStyle.rst may have more input than the others.

Ian Stokes (4):
  docs: Fix sflow documentation url and markup.
  docs: Fix style guide url in DocumentationStyle.rst.
  docs: Fix sphinx urls.
  docs: Fix urls in index.rst.

 Documentation/howto/sflow.rst  |   9 +-
 .../internals/contributing/documentation-style.rst |   7 +-
 Documentation/intro/install/documentation.rst  |   4 +-
 Documentation/ref/index.rst| 214 ++---
 4 files changed, 117 insertions(+), 117 deletions(-)

-- 
2.7.5

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v3 6/9] doc: Add "bridge" topic document

2018-04-19 Thread Stephen Finucane
This details configuration steps that apply to the entire bridge, rather
than individual ports.

Signed-off-by: Stephen Finucane 
---
v3:
- Add new files to automake.mk
v2:
- Cross-reference this document from all interface documents
---
 Documentation/automake.mk|   1 +
 Documentation/howto/dpdk.rst |  60 --
 Documentation/topics/dpdk/bridge.rst | 104 +++
 Documentation/topics/dpdk/index.rst  |   1 +
 Documentation/topics/dpdk/phy.rst|   5 ++
 Documentation/topics/dpdk/ring.rst   |   5 ++
 Documentation/topics/dpdk/vdev.rst   |   5 ++
 Documentation/topics/dpdk/vhost-user.rst |   5 ++
 8 files changed, 126 insertions(+), 60 deletions(-)
 create mode 100644 Documentation/topics/dpdk/bridge.rst

diff --git a/Documentation/automake.mk b/Documentation/automake.mk
index e443e..2aacaa380 100644
--- a/Documentation/automake.mk
+++ b/Documentation/automake.mk
@@ -34,6 +34,7 @@ DOC_SOURCE = \
Documentation/topics/datapath.rst \
Documentation/topics/design.rst \
Documentation/topics/dpdk/index.rst \
+   Documentation/topics/dpdk/bridge.rst \
Documentation/topics/dpdk/phy.rst \
Documentation/topics/dpdk/pmd.rst \
Documentation/topics/dpdk/qos.rst \
diff --git a/Documentation/howto/dpdk.rst b/Documentation/howto/dpdk.rst
index 3e04d8627..b3cba19b2 100644
--- a/Documentation/howto/dpdk.rst
+++ b/Documentation/howto/dpdk.rst
@@ -170,66 +170,6 @@ largest frame size supported by Fortville NIC using the 
DPDK i40e driver, but
 larger frames and other DPDK NIC drivers may be supported. These cases are
 common for use cases involving East-West traffic only.
 
-.. _extended-statistics:
-
-Extended & Custom Statistics
-
-
-DPDK Extended Statistics API allows PMD to expose a unique set of statistics.
-The Extended Statistics are implemented and supported only for DPDK physical
-and vHost ports. Custom statistics are a dynamic set of counters which can
-vary depending on the driver. Those statistics are implemented
-for DPDK physical ports and contain all "dropped", "error" and "management"
-counters from XSTATS. XSTATS counters list can be found here:
-`__.
-
-To enable statistics, you have to enable OpenFlow 1.4 support for OVS.
-Configure bridge br0 to support OpenFlow version 1.4::
-
-$ ovs-vsctl set bridge br0 datapath_type=netdev \
-  protocols=OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13,OpenFlow14
-
-Check the OVSDB protocols column in the bridge table if OpenFlow 1.4 support
-is enabled for OVS::
-
-$ ovsdb-client dump Bridge protocols
-
-Query the port statistics by explicitly specifying -O OpenFlow14 option::
-
-$ ovs-ofctl -O OpenFlow14 dump-ports br0
-
-Note about "Extended Statistics": vHost ports supports only partial
-statistics. RX packet size based counter are only supported and
-doesn't include TX packet size counters.
-
-EMC Insertion Probability
--
-By default 1 in every 100 flows are inserted into the Exact Match Cache (EMC).
-It is possible to change this insertion probability by setting the
-``emc-insert-inv-prob`` option::
-
-$ ovs-vsctl --no-wait set Open_vSwitch . other_config:emc-insert-inv-prob=N
-
-where:
-
-``N``
-  is a positive integer representing the inverse probability of insertion ie.
-  on average 1 in every N packets with a unique flow will generate an EMC
-  insertion.
-
-If ``N`` is set to 1, an insertion will be performed for every flow. If set to
-0, no insertions will be performed and the EMC will effectively be disabled.
-
-With default ``N`` set to 100, higher megaflow hits will occur initially
-as observed with pmd stats::
-
-$ ovs-appctl dpif-netdev/pmd-stats-show
-
-For certain traffic profiles with many parallel flows, it's recommended to set
-``N`` to '0' to achieve higher forwarding performance.
-
-For more information on the EMC refer to :doc:`/intro/install/dpdk` .
-
 .. _dpdk-ovs-in-guest:
 
 OVS with DPDK Inside VMs
diff --git a/Documentation/topics/dpdk/bridge.rst 
b/Documentation/topics/dpdk/bridge.rst
new file mode 100644
index 0..63f8a62de
--- /dev/null
+++ b/Documentation/topics/dpdk/bridge.rst
@@ -0,0 +1,104 @@
+..
+  Licensed under the Apache License, Version 2.0 (the "License"); you may
+  not use this file except in compliance with the License. You may obtain
+  a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+  License for the specific language governing permissions and limitations
+  under the License.
+
+  Convention for heading levels in Open vSwitch 

[ovs-dev] [PATCH v3 2/9] doc: Add "PMD" topic document

2018-04-19 Thread Stephen Finucane
This continues the breakup of the huge DPDK "howto" into smaller
components. There are a couple of related changes included, such as
using "Rx queue" instead of "rxq" and noting how Tx queues cannot be
configured.

Signed-off-by: Stephen Finucane 
---
v3:
- Add new files to automake.mk
- Add additional 'versionchanged' information for 'pmd-rxq-show' command
v2:
- Add cross-references from 'pmd' doc to 'vhost-user' and 'phy' docs
- Add 'versionchanged' warning about automatic assignment of Rx queues
- Add a 'todo' to describe Tx queue behavior
---
 Documentation/automake.mk|   1 +
 Documentation/howto/dpdk.rst |  86 -
 Documentation/topics/dpdk/index.rst  |   1 +
 Documentation/topics/dpdk/phy.rst|  12 +++
 Documentation/topics/dpdk/pmd.rst| 161 +++
 Documentation/topics/dpdk/vhost-user.rst |  17 ++--
 6 files changed, 183 insertions(+), 95 deletions(-)
 create mode 100644 Documentation/topics/dpdk/pmd.rst

diff --git a/Documentation/automake.mk b/Documentation/automake.mk
index cd8f3dc0d..878de4349 100644
--- a/Documentation/automake.mk
+++ b/Documentation/automake.mk
@@ -35,6 +35,7 @@ DOC_SOURCE = \
Documentation/topics/design.rst \
Documentation/topics/dpdk/index.rst \
Documentation/topics/dpdk/phy.rst \
+   Documentation/topics/dpdk/pmd.rst \
Documentation/topics/dpdk/ring.rst \
Documentation/topics/dpdk/vhost-user.rst \
Documentation/topics/testing.rst \
diff --git a/Documentation/howto/dpdk.rst b/Documentation/howto/dpdk.rst
index 79b626c76..388728363 100644
--- a/Documentation/howto/dpdk.rst
+++ b/Documentation/howto/dpdk.rst
@@ -81,92 +81,6 @@ To stop ovs-vswitchd & delete bridge, run::
 $ ovs-appctl -t ovsdb-server exit
 $ ovs-vsctl del-br br0
 
-PMD Thread Statistics
--
-
-To show current stats::
-
-$ ovs-appctl dpif-netdev/pmd-stats-show
-
-To clear previous stats::
-
-$ ovs-appctl dpif-netdev/pmd-stats-clear
-
-Port/RXQ Assigment to PMD Threads
--
-
-To show port/rxq assignment::
-
-$ ovs-appctl dpif-netdev/pmd-rxq-show
-
-To change default rxq assignment to pmd threads, rxqs may be manually pinned to
-desired cores using::
-
-$ ovs-vsctl set Interface  \
-other_config:pmd-rxq-affinity=
-
-where:
-
--  is a CSV list of ``:`` values
-
-For example::
-
-$ ovs-vsctl set interface dpdk-p0 options:n_rxq=4 \
-other_config:pmd-rxq-affinity="0:3,1:7,3:8"
-
-This will ensure:
-
-- Queue #0 pinned to core 3
-- Queue #1 pinned to core 7
-- Queue #2 not pinned
-- Queue #3 pinned to core 8
-
-After that PMD threads on cores where RX queues was pinned will become
-``isolated``. This means that this thread will poll only pinned RX queues.
-
-.. warning::
-  If there are no ``non-isolated`` PMD threads, ``non-pinned`` RX queues will
-  not be polled. Also, if provided ``core_id`` is not available (ex. this
-  ``core_id`` not in ``pmd-cpu-mask``), RX queue will not be polled by any PMD
-  thread.
-
-If pmd-rxq-affinity is not set for rxqs, they will be assigned to pmds (cores)
-automatically. The processing cycles that have been stored for each rxq
-will be used where known to assign rxqs to pmd based on a round robin of the
-sorted rxqs.
-
-For example, in the case where here there are 5 rxqs and 3 cores (e.g. 3,7,8)
-available, and the measured usage of core cycles per rxq over the last
-interval is seen to be:
-
-- Queue #0: 30%
-- Queue #1: 80%
-- Queue #3: 60%
-- Queue #4: 70%
-- Queue #5: 10%
-
-The rxqs will be assigned to cores 3,7,8 in the following order:
-
-Core 3: Q1 (80%) |
-Core 7: Q4 (70%) | Q5 (10%)
-core 8: Q3 (60%) | Q0 (30%)
-
-To see the current measured usage history of pmd core cycles for each rxq::
-
-$ ovs-appctl dpif-netdev/pmd-rxq-show
-
-.. note::
-
-  A history of one minute is recorded and shown for each rxq to allow for
-  traffic pattern spikes. An rxq's pmd core cycles usage changes due to traffic
-  pattern or reconfig changes will take one minute before they are fully
-  reflected in the stats.
-
-Rxq to pmds assignment takes place whenever there are configuration changes
-or can be triggered by using::
-
-$ ovs-appctl dpif-netdev/pmd-rxq-rebalance
-
 QoS
 ---
 
diff --git a/Documentation/topics/dpdk/index.rst 
b/Documentation/topics/dpdk/index.rst
index 5f836a6e9..dfde88377 100644
--- a/Documentation/topics/dpdk/index.rst
+++ b/Documentation/topics/dpdk/index.rst
@@ -31,3 +31,4 @@ The DPDK Datapath
phy
vhost-user
ring
+   pmd
diff --git a/Documentation/topics/dpdk/phy.rst 
b/Documentation/topics/dpdk/phy.rst
index a3f8b475c..ad191dad0 100644
--- a/Documentation/topics/dpdk/phy.rst
+++ b/Documentation/topics/dpdk/phy.rst
@@ -113,3 +113,15 @@ tool::
 For more information, refer to the `DPDK documentation `__.
 
 .. _dpdk-drivers: http://dpdk.org/doc/guides/linux_gsg/linux_drivers.html
+
+.. 

[ovs-dev] [PATCH v3 4/9] doc: Add "vdev" topic document

2018-04-19 Thread Stephen Finucane
These are separate things from physical, ring and vhost-user interfaces
and deserve their own documents. A couple of small typos are fixed along
the way.

Signed-off-by: Stephen Finucane 
---
v3:
- Add new files to automake.mk
- Add 'versionchanged' directive to call out when this was added
---
 Documentation/automake.mk   |  1 +
 Documentation/howto/dpdk.rst| 29 --
 Documentation/topics/dpdk/index.rst |  1 +
 Documentation/topics/dpdk/vdev.rst  | 61 +
 4 files changed, 63 insertions(+), 29 deletions(-)
 create mode 100644 Documentation/topics/dpdk/vdev.rst

diff --git a/Documentation/automake.mk b/Documentation/automake.mk
index 878de4349..3056e527a 100644
--- a/Documentation/automake.mk
+++ b/Documentation/automake.mk
@@ -37,6 +37,7 @@ DOC_SOURCE = \
Documentation/topics/dpdk/phy.rst \
Documentation/topics/dpdk/pmd.rst \
Documentation/topics/dpdk/ring.rst \
+   Documentation/topics/dpdk/vdev.rst \
Documentation/topics/dpdk/vhost-user.rst \
Documentation/topics/testing.rst \
Documentation/topics/high-availability.rst \
diff --git a/Documentation/howto/dpdk.rst b/Documentation/howto/dpdk.rst
index 531612880..9cb76b7e1 100644
--- a/Documentation/howto/dpdk.rst
+++ b/Documentation/howto/dpdk.rst
@@ -244,35 +244,6 @@ Note about "Extended Statistics": vHost ports supports 
only partial
 statistics. RX packet size based counter are only supported and
 doesn't include TX packet size counters.
 
-.. _vdev-support:
-
-Vdev Support
-
-
-DPDK provides drivers for both physical and virtual devices. Physical DPDK
-devices are added to OVS by specifying a valid PCI address in 'dpdk-devargs'.
-Virtual DPDK devices which do not have PCI addresses can be added using a
-different format for 'dpdk-devargs'.
-
-Typically, the format expected is 'eth_' where 'x' is a
-unique identifier of your choice for the given port.
-
-For example to add a dpdk port that uses the 'null' DPDK PMD driver::
-
-   $ ovs-vsctl add-port br0 null0 -- set Interface null0 type=dpdk \
-   options:dpdk-devargs=eth_null0
-
-Similarly, to add a dpdk port that uses the 'af_packet' DPDK PMD driver::
-
-   $ ovs-vsctl add-port br0 myeth0 -- set Interface myeth0 type=dpdk \
-   options:dpdk-devargs=eth_af_packet0,iface=eth0
-
-More information on the different types of virtual DPDK PMDs can be found in
-the `DPDK documentation
-`__.
-
-Note: Not all DPDK virtual PMD drivers have been tested and verified to work.
-
 EMC Insertion Probability
 -
 By default 1 in every 100 flows are inserted into the Exact Match Cache (EMC).
diff --git a/Documentation/topics/dpdk/index.rst 
b/Documentation/topics/dpdk/index.rst
index 4b4dc119a..c1e6ea78c 100644
--- a/Documentation/topics/dpdk/index.rst
+++ b/Documentation/topics/dpdk/index.rst
@@ -34,4 +34,5 @@ The DPDK Datapath
/topics/dpdk/phy
/topics/dpdk/vhost-user
/topics/dpdk/ring
+   /topics/dpdk/vdev
/topics/dpdk/pmd
diff --git a/Documentation/topics/dpdk/vdev.rst 
b/Documentation/topics/dpdk/vdev.rst
new file mode 100644
index 0..31894530b
--- /dev/null
+++ b/Documentation/topics/dpdk/vdev.rst
@@ -0,0 +1,61 @@
+..
+  Copyright 2018, Red Hat, Inc.
+
+  Licensed under the Apache License, Version 2.0 (the "License"); you may
+  not use this file except in compliance with the License. You may obtain
+  a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+  License for the specific language governing permissions and limitations
+  under the License.
+
+  Convention for heading levels in Open vSwitch documentation:
+
+  ===  Heading 0 (reserved for the title in a document)
+  ---  Heading 1
+  ~~~  Heading 2
+  +++  Heading 3
+  '''  Heading 4
+
+  Avoid deeper levels because they do not render well.
+
+
+DPDK Virtual Devices
+
+
+DPDK provides drivers for both physical and virtual devices. Physical DPDK
+devices are added to OVS by specifying a valid PCI address in ``dpdk-devargs``.
+Virtual DPDK devices which do not have PCI addresses can be added using a
+different format for ``dpdk-devargs``.
+
+.. note::
+
+Not all DPDK virtual PMD drivers have been tested and verified to work.
+
+.. versionadded:: 2.7.0
+
+Quick Example
+-
+
+To add a virtual ``dpdk`` devices, the ``dpdk-devargs`` argument should be of
+the format ``eth_``, where ``x``' is a unique identifier of
+your choice for the given port. For example to add a ``dpdk`` port that uses
+the ``null`` DPDK PMD 

[ovs-dev] [PATCH v3 8/9] doc: Add "jumbo frames" topic document

2018-04-19 Thread Stephen Finucane
We include references from the physical and vhost-user interface guides.

Signed-off-by: Stephen Finucane 
---
v3:
- Add new files to automake.mk
- Add 'versionchanged' directive to call out when this was added
v2:
- Don't split the document into multiple docs
---
 Documentation/automake.mk  |  1 +
 Documentation/howto/dpdk.rst   | 52 ++---
 Documentation/topics/dpdk/index.rst|  1 +
 Documentation/topics/dpdk/jumbo-frames.rst | 73 ++
 Documentation/topics/dpdk/phy.rst  |  6 +++
 Documentation/topics/dpdk/vhost-user.rst   |  6 +++
 6 files changed, 90 insertions(+), 49 deletions(-)
 create mode 100644 Documentation/topics/dpdk/jumbo-frames.rst

diff --git a/Documentation/automake.mk b/Documentation/automake.mk
index 003ccd27f..8b47d2276 100644
--- a/Documentation/automake.mk
+++ b/Documentation/automake.mk
@@ -35,6 +35,7 @@ DOC_SOURCE = \
Documentation/topics/design.rst \
Documentation/topics/dpdk/index.rst \
Documentation/topics/dpdk/bridge.rst \
+   Documentation/topics/dpdk/jumbo-frames.rst \
Documentation/topics/dpdk/pdump.rst \
Documentation/topics/dpdk/phy.rst \
Documentation/topics/dpdk/pmd.rst \
diff --git a/Documentation/howto/dpdk.rst b/Documentation/howto/dpdk.rst
index 1a0fb6df1..e65e7dfaa 100644
--- a/Documentation/howto/dpdk.rst
+++ b/Documentation/howto/dpdk.rst
@@ -48,9 +48,9 @@ number of dpdk devices found in the log file::
 $ ovs-vsctl add-port br0 dpdk-p1 -- set Interface dpdk-p1 type=dpdk \
 options:dpdk-devargs=:01:00.1
 
-Some NICs (i.e. Mellanox ConnectX-3) have only one PCI address associated
-with multiple ports. Using a PCI device like above won't work. Instead, below
-usage is suggested::
+Some NICs (i.e. Mellanox ConnectX-3) have only one PCI address associated with
+multiple ports. Using a PCI device like above won't work. Instead, below usage
+is suggested::
 
 $ ovs-vsctl add-port br0 dpdk-p0 -- set Interface dpdk-p0 type=dpdk \
 options:dpdk-devargs="class=eth,mac=00:11:22:33:44:55:01"
@@ -85,52 +85,6 @@ To stop ovs-vswitchd & delete bridge, run::
 $ ovs-appctl -t ovsdb-server exit
 $ ovs-vsctl del-br br0
 
-Jumbo Frames
-
-
-By default, DPDK ports are configured with standard Ethernet MTU (1500B). To
-enable Jumbo Frames support for a DPDK port, change the Interface's
-``mtu_request`` attribute to a sufficiently large value. For example, to add a
-DPDK Phy port with MTU of 9000::
-
-$ ovs-vsctl add-port br0 dpdk-p0 -- set Interface dpdk-p0 type=dpdk \
-  options:dpdk-devargs=:01:00.0 mtu_request=9000
-
-Similarly, to change the MTU of an existing port to 6200::
-
-$ ovs-vsctl set Interface dpdk-p0 mtu_request=6200
-
-Some additional configuration is needed to take advantage of jumbo frames with
-vHost ports:
-
-1. *mergeable buffers* must be enabled for vHost ports, as demonstrated in the
-   QEMU command line snippet below::
-
-   -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce \
-   -device virtio-net-pci,mac=00:00:00:00:00:01,netdev=mynet1,mrg_rxbuf=on
-
-2. Where virtio devices are bound to the Linux kernel driver in a guest
-   environment (i.e. interfaces are not bound to an in-guest DPDK driver), the
-   MTU of those logical network interfaces must also be increased to a
-   sufficiently large value. This avoids segmentation of Jumbo Frames received
-   in the guest. Note that 'MTU' refers to the length of the IP packet only,
-   and not that of the entire frame.
-
-   To calculate the exact MTU of a standard IPv4 frame, subtract the L2 header
-   and CRC lengths (i.e. 18B) from the max supported frame size.  So, to set
-   the MTU for a 9018B Jumbo Frame::
-
-   $ ip link set eth1 mtu 9000
-
-When Jumbo Frames are enabled, the size of a DPDK port's mbuf segments are
-increased, such that a full Jumbo Frame of a specific size may be accommodated
-within a single mbuf segment.
-
-Jumbo frame support has been validated against 9728B frames, which is the
-largest frame size supported by Fortville NIC using the DPDK i40e driver, but
-larger frames and other DPDK NIC drivers may be supported. These cases are
-common for use cases involving East-West traffic only.
-
 .. _dpdk-ovs-in-guest:
 
 OVS with DPDK Inside VMs
diff --git a/Documentation/topics/dpdk/index.rst 
b/Documentation/topics/dpdk/index.rst
index d083d929e..181f61abb 100644
--- a/Documentation/topics/dpdk/index.rst
+++ b/Documentation/topics/dpdk/index.rst
@@ -39,3 +39,4 @@ The DPDK Datapath
/topics/dpdk/pmd
/topics/dpdk/qos
/topics/dpdk/pdump
+   /topics/dpdk/jumbo-frames
diff --git a/Documentation/topics/dpdk/jumbo-frames.rst 
b/Documentation/topics/dpdk/jumbo-frames.rst
new file mode 100644
index 0..00360b4e6
--- /dev/null
+++ b/Documentation/topics/dpdk/jumbo-frames.rst
@@ -0,0 +1,73 @@
+..
+  Copyright 2018, Red Hat, Inc.
+
+  

[ovs-dev] [PATCH v3 3/9] doc: Move additional sections to "physical ports" doc

2018-04-19 Thread Stephen Finucane
The "hotplugging", "flow control", and "Rx checksum offload" sections
only apply to 'dpdk' ports and are too detailed to include in a
high-level howto. Move them, reworking some aspects of this in the
process.

Signed-off-by: Stephen Finucane 
---
v2:
- Split out vdev into its own document (and patch)
- Add cross-references from DPDK howto guide to detailed topic guides
- Add flow control
---
 Documentation/howto/dpdk.rst| 103 ++--
 Documentation/topics/dpdk/index.rst |  11 ++--
 Documentation/topics/dpdk/phy.rst   |  86 ++
 3 files changed, 110 insertions(+), 90 deletions(-)

diff --git a/Documentation/howto/dpdk.rst b/Documentation/howto/dpdk.rst
index 388728363..531612880 100644
--- a/Documentation/howto/dpdk.rst
+++ b/Documentation/howto/dpdk.rst
@@ -57,8 +57,12 @@ usage is suggested::
 $ ovs-vsctl add-port br0 dpdk-p1 -- set Interface dpdk-p1 type=dpdk \
 options:dpdk-devargs="class=eth,mac=00:11:22:33:44:55:02"
 
-Note: such syntax won't support hotplug. The hotplug is supposed to work with
-future DPDK release, v18.05.
+.. important::
+
+Hotplugging physical interfaces is not supported using the above syntax.
+This is expected to change with the release of DPDK v18.05. For information
+on hotplugging physical interfaces, you should instead refer to
+:ref:`port-hotplug`.
 
 After the DPDK ports get added to switch, a polling thread continuously polls
 DPDK devices and consumes 100% of the core, as can be checked from ``top`` and
@@ -123,34 +127,6 @@ To clear the ingress policer configuration from the port::
 
 Refer to vswitch.xml for more details on ingress-policer.
 
-Flow Control
-
-
-Flow control can be enabled only on DPDK physical ports. To enable flow control
-support at tx side while adding a port, run::
-
-$ ovs-vsctl add-port br0 dpdk-p0 -- set Interface dpdk-p0 type=dpdk \
-options:dpdk-devargs=:01:00.0 options:tx-flow-ctrl=true
-
-Similarly, to enable rx flow control, run::
-
-$ ovs-vsctl add-port br0 dpdk-p0 -- set Interface dpdk-p0 type=dpdk \
-options:dpdk-devargs=:01:00.0 options:rx-flow-ctrl=true
-
-To enable flow control auto-negotiation, run::
-
-$ ovs-vsctl add-port br0 dpdk-p0 -- set Interface dpdk-p0 type=dpdk \
-options:dpdk-devargs=:01:00.0 options:flow-ctrl-autoneg=true
-
-To turn ON the tx flow control at run time for an existing port, run::
-
-$ ovs-vsctl set Interface dpdk-p0 options:tx-flow-ctrl=true
-
-The flow control parameters can be turned off by setting ``false`` to the
-respective parameter. To disable the flow control at tx side, run::
-
-$ ovs-vsctl set Interface dpdk-p0 options:tx-flow-ctrl=false
-
 pdump
 -
 
@@ -236,16 +212,6 @@ largest frame size supported by Fortville NIC using the 
DPDK i40e driver, but
 larger frames and other DPDK NIC drivers may be supported. These cases are
 common for use cases involving East-West traffic only.
 
-Rx Checksum Offload

-
-By default, DPDK physical ports are enabled with Rx checksum offload.
-
-Rx checksum offload can offer performance improvement only for tunneling
-traffic in OVS-DPDK because the checksum validation of tunnel packets is
-offloaded to the NIC. Also enabling Rx checksum may slightly reduce the
-performance of non-tunnel traffic, specifically for smaller size packet.
-
 .. _extended-statistics:
 
 Extended & Custom Statistics
@@ -278,52 +244,6 @@ Note about "Extended Statistics": vHost ports supports 
only partial
 statistics. RX packet size based counter are only supported and
 doesn't include TX packet size counters.
 
-.. _port-hotplug:
-
-Port Hotplug
-
-
-OVS supports port hotplugging, allowing the use of ports that were not bound
-to DPDK when vswitchd was started.
-In order to attach a port, it has to be bound to DPDK using the
-``dpdk_nic_bind.py`` script::
-
-$ $DPDK_DIR/tools/dpdk_nic_bind.py --bind=igb_uio :01:00.0
-
-Then it can be attached to OVS::
-
-$ ovs-vsctl add-port br0 dpdkx -- set Interface dpdkx type=dpdk \
-options:dpdk-devargs=:01:00.0
-
-Detaching will be performed while processing del-port command::
-
-$ ovs-vsctl del-port dpdkx
-
-Sometimes, the del-port command may not detach the device.
-Detaching can be confirmed by the appearance of an INFO log.
-For example::
-
-INFO|Device ':04:00.1' has been detached
-
-If the log is not seen, then the port can be detached using::
-
-$ ovs-appctl netdev-dpdk/detach :01:00.0
-
-Detaching can be confirmed by console output::
-
-Device ':04:00.1' has been detached
-
-.. warning::
-Detaching should not be done if a device is known to be non-detachable, as
-this may cause the device to behave improperly when added back with
-add-port. The Chelsio Terminator adapters which use the cxgbe driver seem
-to be an example of this behavior; check the driver documentation 

[ovs-dev] [PATCH v3 1/9] doc: Add an overview of the 'dpdk' port

2018-04-19 Thread Stephen Finucane
These ports are used to allow ingress/egress from the host and are
therefore _reasonably_ important. However, there is no clear overview of
what these ports actually are or why things are done the way they are.
Start closing this gap by providing a standalone example of using these
ports along with a little more detailed overview of the binding process.

There is additional cleanup to be done for the DPDK howto, but that will
be done separately.

We enable the TODO directive so we can actually start calling out some
TODOs.

Signed-off-by: Stephen Finucane 
---
v3:
- Add new files to automake.mk
v2:
- Add TODO for multiple ports sharing the same bus slot function
  (ian.stokes)
---
 Documentation/automake.mk   |   1 +
 Documentation/conf.py   |   2 +-
 Documentation/topics/dpdk/index.rst |   1 +
 Documentation/topics/dpdk/phy.rst   | 115 
 4 files changed, 118 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/topics/dpdk/phy.rst

diff --git a/Documentation/automake.mk b/Documentation/automake.mk
index c05a2313a..cd8f3dc0d 100644
--- a/Documentation/automake.mk
+++ b/Documentation/automake.mk
@@ -34,6 +34,7 @@ DOC_SOURCE = \
Documentation/topics/datapath.rst \
Documentation/topics/design.rst \
Documentation/topics/dpdk/index.rst \
+   Documentation/topics/dpdk/phy.rst \
Documentation/topics/dpdk/ring.rst \
Documentation/topics/dpdk/vhost-user.rst \
Documentation/topics/testing.rst \
diff --git a/Documentation/conf.py b/Documentation/conf.py
index 6ab144c5d..babda21de 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -32,7 +32,7 @@ needs_sphinx = '1.1'
 # Add any Sphinx extension module names here, as strings. They can be
 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
 # ones.
-extensions = []
+extensions = ['sphinx.ext.todo']
 
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ['_templates']
diff --git a/Documentation/topics/dpdk/index.rst 
b/Documentation/topics/dpdk/index.rst
index da148b323..5f836a6e9 100644
--- a/Documentation/topics/dpdk/index.rst
+++ b/Documentation/topics/dpdk/index.rst
@@ -28,5 +28,6 @@ The DPDK Datapath
 .. toctree::
:maxdepth: 2
 
+   phy
vhost-user
ring
diff --git a/Documentation/topics/dpdk/phy.rst 
b/Documentation/topics/dpdk/phy.rst
new file mode 100644
index 0..a3f8b475c
--- /dev/null
+++ b/Documentation/topics/dpdk/phy.rst
@@ -0,0 +1,115 @@
+..
+  Copyright 2018, Red Hat, Inc.
+
+  Licensed under the Apache License, Version 2.0 (the "License"); you may
+  not use this file except in compliance with the License. You may obtain
+  a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+  License for the specific language governing permissions and limitations
+  under the License.
+
+  Convention for heading levels in Open vSwitch documentation:
+
+  ===  Heading 0 (reserved for the title in a document)
+  ---  Heading 1
+  ~~~  Heading 2
+  +++  Heading 3
+  '''  Heading 4
+
+  Avoid deeper levels because they do not render well.
+
+===
+DPDK Physical Ports
+===
+
+The netdev datapath allows attaching of DPDK-backed physical interfaces in
+order to provide high-performance ingress/egress from the host.
+
+.. versionchanged:: 2.7.0
+
+   Before Open vSwitch 2.7.0, it was necessary to prefix port names with a
+   ``dpdk`` prefix. Starting with 2.7.0, this is no longer necessary.
+
+.. todo::
+
+   Add an example for multiple ports share the same bus slot function.
+
+Quick Example
+-
+
+This example demonstrates how to bind two ``dpdk`` ports, bound to physical
+interfaces identified by hardware IDs ``:01:00.0`` and ``:01:00.1``, to
+an existing bridge called ``br0``::
+
+$ ovs-vsctl add-port br0 dpdk-p0 \
+   -- set Interface dpdk-p0 type=dpdk options:dpdk-devargs=:01:00.0
+$ ovs-vsctl add-port br0 dpdk-p1 \
+   -- set Interface dpdk-p1 type=dpdk options:dpdk-devargs=:01:00.1
+
+For the above example to work, the two physical interfaces must be bound to
+the DPDK poll-mode drivers in userspace rather than the traditional kernel
+drivers. See the `binding NIC drivers ` section for details.
+
+.. _dpdk-binding-nics:
+
+Binding NIC Drivers
+---
+
+DPDK operates entirely in userspace and, as a result, requires use of its own
+poll-mode drivers in user space for physical interfaces and a passthrough-style
+driver for the devices in kernel space.
+
+There are two different tools for binding drivers: :command:`driverctl` which

[ovs-dev] [PATCH v3 5/9] doc: Move "QoS" guide to its own document

2018-04-19 Thread Stephen Finucane
Again, this stuff is too detailed for a high-level howto.

Signed-off-by: Stephen Finucane 
---
v3:
- Add new files to automake.mk
- Add 'versionchanged' directive to call out when this was added
v2:
- Keep flow control section in 'phy' document
---
 Documentation/automake.mk   |  1 +
 Documentation/howto/dpdk.rst| 42 
 Documentation/topics/dpdk/index.rst |  1 +
 Documentation/topics/dpdk/phy.rst   |  2 +
 Documentation/topics/dpdk/qos.rst   | 78 +
 5 files changed, 82 insertions(+), 42 deletions(-)
 create mode 100644 Documentation/topics/dpdk/qos.rst

diff --git a/Documentation/automake.mk b/Documentation/automake.mk
index 3056e527a..e443e 100644
--- a/Documentation/automake.mk
+++ b/Documentation/automake.mk
@@ -36,6 +36,7 @@ DOC_SOURCE = \
Documentation/topics/dpdk/index.rst \
Documentation/topics/dpdk/phy.rst \
Documentation/topics/dpdk/pmd.rst \
+   Documentation/topics/dpdk/qos.rst \
Documentation/topics/dpdk/ring.rst \
Documentation/topics/dpdk/vdev.rst \
Documentation/topics/dpdk/vhost-user.rst \
diff --git a/Documentation/howto/dpdk.rst b/Documentation/howto/dpdk.rst
index 9cb76b7e1..3e04d8627 100644
--- a/Documentation/howto/dpdk.rst
+++ b/Documentation/howto/dpdk.rst
@@ -85,48 +85,6 @@ To stop ovs-vswitchd & delete bridge, run::
 $ ovs-appctl -t ovsdb-server exit
 $ ovs-vsctl del-br br0
 
-QoS

-
-Assuming you have a vhost-user port transmitting traffic consisting of packets
-of size 64 bytes, the following command would limit the egress transmission
-rate of the port to ~1,000,000 packets per second::
-
-$ ovs-vsctl set port vhost-user0 qos=@newqos -- \
---id=@newqos create qos type=egress-policer other-config:cir=4600 \
-other-config:cbs=2048`
-
-To examine the QoS configuration of the port, run::
-
-$ ovs-appctl -t ovs-vswitchd qos/show vhost-user0
-
-To clear the QoS configuration from the port and ovsdb, run::
-
-$ ovs-vsctl destroy QoS vhost-user0 -- clear Port vhost-user0 qos
-
-Refer to vswitch.xml for more details on egress-policer.
-
-Rate Limiting
---
-
-Here is an example on Ingress Policing usage. Assuming you have a vhost-user
-port receiving traffic consisting of packets of size 64 bytes, the following
-command would limit the reception rate of the port to ~1,000,000 packets per
-second::
-
-$ ovs-vsctl set interface vhost-user0 ingress_policing_rate=368000 \
-ingress_policing_burst=1000`
-
-To examine the ingress policer configuration of the port::
-
-$ ovs-vsctl list interface vhost-user0
-
-To clear the ingress policer configuration from the port::
-
-$ ovs-vsctl set interface vhost-user0 ingress_policing_rate=0
-
-Refer to vswitch.xml for more details on ingress-policer.
-
 pdump
 -
 
diff --git a/Documentation/topics/dpdk/index.rst 
b/Documentation/topics/dpdk/index.rst
index c1e6ea78c..d3c1e2099 100644
--- a/Documentation/topics/dpdk/index.rst
+++ b/Documentation/topics/dpdk/index.rst
@@ -36,3 +36,4 @@ The DPDK Datapath
/topics/dpdk/ring
/topics/dpdk/vdev
/topics/dpdk/pmd
+   /topics/dpdk/qos
diff --git a/Documentation/topics/dpdk/phy.rst 
b/Documentation/topics/dpdk/phy.rst
index 929f394ea..581984b63 100644
--- a/Documentation/topics/dpdk/phy.rst
+++ b/Documentation/topics/dpdk/phy.rst
@@ -126,6 +126,8 @@ DPDK acceleration. It is possible to configure multiple Rx 
queues for ``dpdk``
 ports, thus ensuring this is not a bottleneck for performance. For information
 on configuring PMD threads, refer to :doc:`pmd`.
 
+.. _dpdk-phy-flow-control:
+
 Flow Control
 
 
diff --git a/Documentation/topics/dpdk/qos.rst 
b/Documentation/topics/dpdk/qos.rst
new file mode 100644
index 0..c0aec5d88
--- /dev/null
+++ b/Documentation/topics/dpdk/qos.rst
@@ -0,0 +1,78 @@
+..
+  Licensed under the Apache License, Version 2.0 (the "License"); you may
+  not use this file except in compliance with the License. You may obtain
+  a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+  License for the specific language governing permissions and limitations
+  under the License.
+
+  Convention for heading levels in Open vSwitch documentation:
+
+  ===  Heading 0 (reserved for the title in a document)
+  ---  Heading 1
+  ~~~  Heading 2
+  +++  Heading 3
+  '''  Heading 4
+
+  Avoid deeper levels because they do not render well.
+
+
+Quality of Service (QoS)
+
+
+It is possible to apply both ingress and egress limiting when using the DPDK
+datapath. These are referred 

[ovs-dev] [PATCH v3 0/9] Split up the DPDK how-to

2018-04-19 Thread Stephen Finucane
The DPDK howto has slowly morphed into a catch all for everything DPDK,
which goes against the original design goal for 'howto' documents [*].
This series attempts to return some sanity to the universe by splitting
this document into many more 'topic' documents. Along the way, we add a
lot of semantic markup, rework some text, and add an overview on
'dpdk'-type ports (the original goal here).

There's a good chance I've made some mistakes in the process and I've
left TODOs for someone to resolve now or at a future date. I welcome
feedback on both of these.

[*] 'howto' documents are supposed to be brief, high-level overviews on
a particular group of features, with a focus on the user. They're
not as all-encompassing as a 'tutorial', but not as specific as a
'topic'.

Changes since v2:
- Addressed comments from Ian Stokes

Stephen Finucane (9):
  doc: Add an overview of the 'dpdk' port
  doc: Add "PMD" topic document
  doc: Move additional sections to "physical ports" doc
  doc: Add "vdev" topic document
  doc: Move "QoS" guide to its own document
  doc: Add "bridge" topic document
  doc: Move "pdump" guide to its own document
  doc: Add "jumbo frames" topic document
  doc: Final cleanup of the DPDK documents

 Documentation/automake.mk  |   7 +
 Documentation/conf.py  |   2 +-
 Documentation/howto/dpdk.rst   | 454 +++--
 Documentation/topics/dpdk/bridge.rst   | 104 +++
 Documentation/topics/dpdk/index.rst|  20 +-
 Documentation/topics/dpdk/jumbo-frames.rst |  73 +
 Documentation/topics/dpdk/pdump.rst|  67 +
 Documentation/topics/dpdk/phy.rst  | 226 ++
 Documentation/topics/dpdk/pmd.rst  | 161 ++
 Documentation/topics/dpdk/qos.rst  |  78 +
 Documentation/topics/dpdk/ring.rst |   5 +
 Documentation/topics/dpdk/vdev.rst |  66 +
 Documentation/topics/dpdk/vhost-user.rst   |  28 +-
 13 files changed, 863 insertions(+), 428 deletions(-)
 create mode 100644 Documentation/topics/dpdk/bridge.rst
 create mode 100644 Documentation/topics/dpdk/jumbo-frames.rst
 create mode 100644 Documentation/topics/dpdk/pdump.rst
 create mode 100644 Documentation/topics/dpdk/phy.rst
 create mode 100644 Documentation/topics/dpdk/pmd.rst
 create mode 100644 Documentation/topics/dpdk/qos.rst
 create mode 100644 Documentation/topics/dpdk/vdev.rst

-- 
2.14.3

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v1 3/4] docs: Fix sphinx urls.

2018-04-19 Thread Stokes, Ian
> On Thu, 2018-04-19 at 11:49 +0100, Ian Stokes wrote:
> > Update dead url links for sphinx documentation to avoid make
> > check-docs failing.
> >
> > Cc: Stephen Finucane 
> > Fixes: 26ea2d409 ("docs: Add writing guide")
> > Fixes: 73c76b447 ("doc: Add info on building documentation")
> > Signed-off-by: Ian Stokes 
> > ---
> >  Documentation/internals/contributing/documentation-style.rst | 3 ++-
> >  Documentation/intro/install/documentation.rst| 4 ++--
> >  2 files changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git
> > a/Documentation/internals/contributing/documentation-style.rst
> > b/Documentation/internals/contributing/documentation-style.rst
> > index 047f195..4e77db4 100644
> > --- a/Documentation/internals/contributing/documentation-style.rst
> > +++ b/Documentation/internals/contributing/documentation-style.rst
> > @@ -441,4 +441,5 @@ Useful Links
> >  - `Quick reStructuredText
> >`__
> >
> > -- `Sphinx Documentation
> > `__
> > +- `Sphinx Documentation
> > +  `__
> 
> You're looking for this link:
> 
>   http://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html
> 
> I'd rather we stuck to the authoritative resource on this.

Agreed, I wasn't so sure myself, thanks for the catch.

> 
> > diff --git a/Documentation/intro/install/documentation.rst
> > b/Documentation/intro/install/documentation.rst
> > index 0eeeab1..d7eb25d 100644
> > --- a/Documentation/intro/install/documentation.rst
> > +++ b/Documentation/intro/install/documentation.rst
> > @@ -58,7 +58,7 @@ wish to install using ``pip``::
> >  $ source .venv/bin/activate
> >  $ pip install -r Documentation/requirements.txt
> >
> > -__ http://www.sphinx-doc.org/install.html
> > +__ http://www.sphinx-doc.org/en/master/usage/installation.html
> >
> >  Configuring
> >  ---
> > @@ -86,4 +86,4 @@ Makefile targets::
> >  Once built, documentation is available in the ``/Documentation/_build``
> folder.
> >  Open the root ``index.html`` to browse the documentation.
> >
> > -__ http://www.sphinx-doc.org/config.html
> > +__ http://www.sphinx-doc.org/en/master/config.html
> 
> Note that I'm planning to move this to 'usage/configuration.html'
> shortly (I'm the one who's moving all those docs around). Not much we can
> do until then though.
> 
> The one link aside, this LGTM.

Sure, will address the link in v2 and add the ack if that’s ok.
Ian
> 
> Stephen
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v2 6/9] doc: Add "bridge" topic document

2018-04-19 Thread Stephen Finucane
On Wed, 2018-04-18 at 15:33 +, Stokes, Ian wrote:
> > This details configuration steps that apply to the entire bridge, rather
> > than individual ports.
> > 
> > Signed-off-by: Stephen Finucane 
> > ---
> > v2:
> > - Cross-reference this document from all interface documents
> > ---
> >  Documentation/howto/dpdk.rst |  60 --
> >  Documentation/topics/dpdk/bridge.rst | 104
> > +++
> >  Documentation/topics/dpdk/index.rst  |   1 +
> >  Documentation/topics/dpdk/phy.rst|   5 ++
> >  Documentation/topics/dpdk/ring.rst   |   5 ++
> >  Documentation/topics/dpdk/vdev.rst   |   5 ++
> >  Documentation/topics/dpdk/vhost-user.rst |   5 ++
> >  7 files changed, 125 insertions(+), 60 deletions(-)  create mode 100644
> > Documentation/topics/dpdk/bridge.rst
> > 
> > diff --git a/Documentation/howto/dpdk.rst b/Documentation/howto/dpdk.rst
> > index 3e04d8627..b3cba19b2 100644
> > --- a/Documentation/howto/dpdk.rst
> > +++ b/Documentation/howto/dpdk.rst
> > @@ -170,66 +170,6 @@ largest frame size supported by Fortville NIC using
> > the DPDK i40e driver, but  larger frames and other DPDK NIC drivers may be
> > supported. These cases are  common for use cases involving East-West
> > traffic only.
> > 
> > -.. _extended-statistics:
> > -
> > -Extended & Custom Statistics
> > -
> > -
> > -DPDK Extended Statistics API allows PMD to expose a unique set of
> > statistics.
> > -The Extended Statistics are implemented and supported only for DPDK
> > physical -and vHost ports. Custom statistics are a dynamic set of counters
> > which can -vary depending on the driver. Those statistics are implemented
> > -for DPDK physical ports and contain all "dropped", "error" and
> > "management"
> > -counters from XSTATS. XSTATS counters list can be found here:
> > -`__.
> > -
> > -To enable statistics, you have to enable OpenFlow 1.4 support for OVS.
> > -Configure bridge br0 to support OpenFlow version 1.4::
> > -
> > -$ ovs-vsctl set bridge br0 datapath_type=netdev \
> > -  protocols=OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13,OpenFlow14
> > -
> > -Check the OVSDB protocols column in the bridge table if OpenFlow 1.4
> > support -is enabled for OVS::
> > -
> > -$ ovsdb-client dump Bridge protocols
> > -
> > -Query the port statistics by explicitly specifying -O OpenFlow14 option::
> > -
> > -$ ovs-ofctl -O OpenFlow14 dump-ports br0
> > -
> > -Note about "Extended Statistics": vHost ports supports only partial -
> > statistics. RX packet size based counter are only supported and -doesn't
> > include TX packet size counters.
> > -
> > -EMC Insertion Probability
> > --
> > -By default 1 in every 100 flows are inserted into the Exact Match Cache
> > (EMC).
> > -It is possible to change this insertion probability by setting the -
> > ``emc-insert-inv-prob`` option::
> > -
> > -$ ovs-vsctl --no-wait set Open_vSwitch . other_config:emc-insert-inv-
> > prob=N
> > -
> > -where:
> > -
> > -``N``
> > -  is a positive integer representing the inverse probability of insertion
> > ie.
> > -  on average 1 in every N packets with a unique flow will generate an EMC
> > -  insertion.
> > -
> > -If ``N`` is set to 1, an insertion will be performed for every flow. If
> > set to -0, no insertions will be performed and the EMC will effectively be
> > disabled.
> > -
> > -With default ``N`` set to 100, higher megaflow hits will occur initially
> > -as observed with pmd stats::
> > -
> > -$ ovs-appctl dpif-netdev/pmd-stats-show
> > -
> > -For certain traffic profiles with many parallel flows, it's recommended
> > to set -``N`` to '0' to achieve higher forwarding performance.
> > -
> > -For more information on the EMC refer to :doc:`/intro/install/dpdk` .
> > -
> >  .. _dpdk-ovs-in-guest:
> > 
> >  OVS with DPDK Inside VMs
> > diff --git a/Documentation/topics/dpdk/bridge.rst
> > b/Documentation/topics/dpdk/bridge.rst
> > new file mode 100644
> > index 0..63f8a62de
> > --- /dev/null
> > +++ b/Documentation/topics/dpdk/bridge.rst
> 
> Compilation error, bridge.rst not listed in Documentation/automake.mk.

Done.

> > @@ -0,0 +1,104 @@
> > +..
> > +  Licensed under the Apache License, Version 2.0 (the "License"); you
> > may
> > +  not use this file except in compliance with the License. You may
> > obtain
> > +  a copy of the License at
> > +
> > +  http://www.apache.org/licenses/LICENSE-2.0
> > +
> > +  Unless required by applicable law or agreed to in writing, software
> > +  distributed under the License is distributed on an "AS IS" BASIS,
> > WITHOUT
> > +  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> > See the
> > +  License for the specific language governing permissions and
> > limitations
> > +  under the License.
> > +
> > +  Convention 

Re: [ovs-dev] [PATCH v1 1/4] Docs: Fix sflow documentation url and markup.

2018-04-19 Thread Stokes, Ian


> -Original Message-
> From: Stephen Finucane [mailto:step...@that.guru]
> Sent: Thursday, April 19, 2018 1:25 PM
> To: Stokes, Ian ; d...@openvswitch.org
> Subject: Re: [PATCH v1 1/4] Docs: Fix sflow documentation url and markup.
> 
> On Thu, 2018-04-19 at 11:49 +0100, Ian Stokes wrote:
> > The link url link for the blog in sflow documentation causes make
> > check-docs to fail with a broken link warning. Fix this by correcting
> > the url address. Also use correct markup for note regarding the
> > configuration of sflow.
> >
> > CC: Stephen Finucane 
> > Fixes: 198c5d3d0 ("doc: Add sFlow cookbook from website")
> > Signed-off-by: Ian Stokes 
> 
> femotonit: s/Docs/docs/ (for the summary). Other than that...
> 
> Acked-by: Stephen Finucane 

Sure, will fix above and add your ack to the v2.

Thanks
Ian
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v1 2/4] docs: Fix style guide url in DocumentationStyle.rst.

2018-04-19 Thread Stokes, Ian
> On Thu, 2018-04-19 at 11:49 +0100, Ian Stokes wrote:
> > The link used for IBM Style Guide is no longer valid. As there is no
> > longer a valid link via redbooks remove the url to avoid make
> > check-docs failing.
> >
> > Cc: Stephen Finucane 
> > Fixes: 26ea2d409 ("docs: Add writing guide")
> > Signed-off-by: Ian Stokes 
> > ---
> >  Documentation/internals/contributing/documentation-style.rst | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git
> > a/Documentation/internals/contributing/documentation-style.rst
> > b/Documentation/internals/contributing/documentation-style.rst
> > index 9c47bd6..047f195 100644
> > --- a/Documentation/internals/contributing/documentation-style.rst
> > +++ b/Documentation/internals/contributing/documentation-style.rst
> > @@ -358,8 +358,7 @@ Writing Style
> >  -
> >
> >  Follow these guidelines to ensure readability and consistency of the
> > Open -vSwitch documentation. These guidelines are based on the `IBM
> > Style Guide -
> 
> `__.
> > +vSwitch documentation. These guidelines are based on the `IBM Style
> Guide`.
> 
> s/`IBM Style Guide`/*IBM Style Guide*/
> 
> (I recently learnt the former means default role, which defaults to
> italics but could actually be anything depending on configuration.
> You're better off explicitly requesting italics)
> 
> In addition, I did find the following links which could be used:
> 
>  * http://ptgmedia.pearsoncmg.com/images/9780132101301/samplepages/0132
>101300.pdf
>  * https://www.ibm.com/developerworks/library/styleguidelines/ (for
>developerWorks, but the ideas are the same)
>  * https://www.safaribooksonline.com/library/view/the-ibm-style/9780132
>118989/ (paywall)
> 
> We could use any of these, if we chose. However, italics aside, I'm still
> happy with this as-is so...

Sure, the paywall issue was one I wasn't sure of here, I'd prefer to point to 
something that’s accessible. Let's go with the second link to IBM.

I'll address these in the v2 and add your ACK.

Thanks
Ian
> 
> Acked-by: Stephen Finucane 
> 
> >  - Use standard US English
> >

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v2 2/9] doc: Add "PMD" topic document

2018-04-19 Thread Stephen Finucane
On Wed, 2018-04-18 at 15:31 +, Stokes, Ian wrote:
> > This continues the breakup of the huge DPDK "howto" into smaller
> > components. There are a couple of related changes included, such as using
> > "Rx queue" instead of "rxq" and noting how Tx queues cannot be configured.
> > 
> > Signed-off-by: Stephen Finucane 
> > ---
> > v2:
> > - Add cross-references from 'pmd' doc to 'vhost-user' and 'phy' docs
> > - Add 'versionchanged' warning about automatic assignment of Rx queues
> > - Add a 'todo' to describe Tx queue behavior
> > ---
> >  Documentation/howto/dpdk.rst |  86 -
> >  Documentation/topics/dpdk/index.rst  |   1 +
> >  Documentation/topics/dpdk/phy.rst|  12 +++
> >  Documentation/topics/dpdk/pmd.rst| 156
> > +++
> >  Documentation/topics/dpdk/vhost-user.rst |  17 ++--
> >  5 files changed, 177 insertions(+), 95 deletions(-)  create mode 100644
> > Documentation/topics/dpdk/pmd.rst
> > 
> > diff --git a/Documentation/howto/dpdk.rst b/Documentation/howto/dpdk.rst
> > index 79b626c76..388728363 100644
> > --- a/Documentation/howto/dpdk.rst
> > +++ b/Documentation/howto/dpdk.rst
> > @@ -81,92 +81,6 @@ To stop ovs-vswitchd & delete bridge, run::
> >  $ ovs-appctl -t ovsdb-server exit
> >  $ ovs-vsctl del-br br0
> > 
> > -PMD Thread Statistics
> > --
> > -
> > -To show current stats::
> > -
> > -$ ovs-appctl dpif-netdev/pmd-stats-show
> > -
> > -To clear previous stats::
> > -
> > -$ ovs-appctl dpif-netdev/pmd-stats-clear
> > -
> > -Port/RXQ Assigment to PMD Threads
> > --
> > -
> > -To show port/rxq assignment::
> > -
> > -$ ovs-appctl dpif-netdev/pmd-rxq-show
> > -
> > -To change default rxq assignment to pmd threads, rxqs may be manually
> > pinned to -desired cores using::
> > -
> > -$ ovs-vsctl set Interface  \
> > -other_config:pmd-rxq-affinity=
> > -
> > -where:
> > -
> > --  is a CSV list of ``:``
> > values
> > -
> > -For example::
> > -
> > -$ ovs-vsctl set interface dpdk-p0 options:n_rxq=4 \
> > -other_config:pmd-rxq-affinity="0:3,1:7,3:8"
> > -
> > -This will ensure:
> > -
> > -- Queue #0 pinned to core 3
> > -- Queue #1 pinned to core 7
> > -- Queue #2 not pinned
> > -- Queue #3 pinned to core 8
> > -
> > -After that PMD threads on cores where RX queues was pinned will become -
> > ``isolated``. This means that this thread will poll only pinned RX queues.
> > -
> > -.. warning::
> > -  If there are no ``non-isolated`` PMD threads, ``non-pinned`` RX queues
> > will
> > -  not be polled. Also, if provided ``core_id`` is not available (ex. this
> > -  ``core_id`` not in ``pmd-cpu-mask``), RX queue will not be polled by
> > any PMD
> > -  thread.
> > -
> > -If pmd-rxq-affinity is not set for rxqs, they will be assigned to pmds
> > (cores) -automatically. The processing cycles that have been stored for
> > each rxq -will be used where known to assign rxqs to pmd based on a round
> > robin of the -sorted rxqs.
> > -
> > -For example, in the case where here there are 5 rxqs and 3 cores (e.g.
> > 3,7,8) -available, and the measured usage of core cycles per rxq over the
> > last -interval is seen to be:
> > -
> > -- Queue #0: 30%
> > -- Queue #1: 80%
> > -- Queue #3: 60%
> > -- Queue #4: 70%
> > -- Queue #5: 10%
> > -
> > -The rxqs will be assigned to cores 3,7,8 in the following order:
> > -
> > -Core 3: Q1 (80%) |
> > -Core 7: Q4 (70%) | Q5 (10%)
> > -core 8: Q3 (60%) | Q0 (30%)
> > -
> > -To see the current measured usage history of pmd core cycles for each
> > rxq::
> > -
> > -$ ovs-appctl dpif-netdev/pmd-rxq-show
> > -
> > -.. note::
> > -
> > -  A history of one minute is recorded and shown for each rxq to allow for
> > -  traffic pattern spikes. An rxq's pmd core cycles usage changes due to
> > traffic
> > -  pattern or reconfig changes will take one minute before they are fully
> > -  reflected in the stats.
> > -
> > -Rxq to pmds assignment takes place whenever there are configuration
> > changes -or can be triggered by using::
> > -
> > -$ ovs-appctl dpif-netdev/pmd-rxq-rebalance
> > -
> >  QoS
> >  ---
> > 
> > diff --git a/Documentation/topics/dpdk/index.rst
> > b/Documentation/topics/dpdk/index.rst
> > index 5f836a6e9..dfde88377 100644
> > --- a/Documentation/topics/dpdk/index.rst
> > +++ b/Documentation/topics/dpdk/index.rst
> > @@ -31,3 +31,4 @@ The DPDK Datapath
> > phy
> > vhost-user
> > ring
> > +   pmd
> > diff --git a/Documentation/topics/dpdk/phy.rst
> > b/Documentation/topics/dpdk/phy.rst
> > index a3f8b475c..ad191dad0 100644
> > --- a/Documentation/topics/dpdk/phy.rst
> > +++ b/Documentation/topics/dpdk/phy.rst
> > @@ -113,3 +113,15 @@ tool::
> >  For more information, refer to the `DPDK documentation `__.
> > 
> >  .. _dpdk-drivers: http://dpdk.org/doc/guides/linux_gsg/linux_drivers.html
> > +
> > +.. _dpdk-phy-multiqueue:
> > +
> > +Multiqueue
> > +--

Re: [ovs-dev] [PATCH v2 4/9] doc: Add "vdev" topic document

2018-04-19 Thread Stephen Finucane
On Wed, 2018-04-18 at 15:32 +, Stokes, Ian wrote:
> > These are separate things from physical, ring and vhost-user interfaces
> > and deserve their own documents. A couple of small typos are fixed along
> > the way.
> > 
> > Signed-off-by: Stephen Finucane 
> > ---
> >  Documentation/howto/dpdk.rst| 29 --
> >  Documentation/topics/dpdk/index.rst |  1 +
> > Documentation/topics/dpdk/vdev.rst  | 59
> > +
> >  3 files changed, 60 insertions(+), 29 deletions(-)  create mode 100644
> > Documentation/topics/dpdk/vdev.rst
> > 
> > diff --git a/Documentation/howto/dpdk.rst b/Documentation/howto/dpdk.rst
> > index 531612880..9cb76b7e1 100644
> > --- a/Documentation/howto/dpdk.rst
> > +++ b/Documentation/howto/dpdk.rst
> > @@ -244,35 +244,6 @@ Note about "Extended Statistics": vHost ports
> > supports only partial  statistics. RX packet size based counter are only
> > supported and  doesn't include TX packet size counters.
> > 
> > -.. _vdev-support:
> > -
> > -Vdev Support
> > -
> > -
> > -DPDK provides drivers for both physical and virtual devices. Physical
> > DPDK -devices are added to OVS by specifying a valid PCI address in 'dpdk-
> > devargs'.
> > -Virtual DPDK devices which do not have PCI addresses can be added using a
> > -different format for 'dpdk-devargs'.
> > -
> > -Typically, the format expected is 'eth_' where 'x' is a -
> > unique identifier of your choice for the given port.
> > -
> > -For example to add a dpdk port that uses the 'null' DPDK PMD driver::
> > -
> > -   $ ovs-vsctl add-port br0 null0 -- set Interface null0 type=dpdk \
> > -   options:dpdk-devargs=eth_null0
> > -
> > -Similarly, to add a dpdk port that uses the 'af_packet' DPDK PMD driver::
> > -
> > -   $ ovs-vsctl add-port br0 myeth0 -- set Interface myeth0 type=dpdk
> > \
> > -   options:dpdk-devargs=eth_af_packet0,iface=eth0
> > -
> > -More information on the different types of virtual DPDK PMDs can be found
> > in -the `DPDK documentation -
> > `__.
> > -
> > -Note: Not all DPDK virtual PMD drivers have been tested and verified to
> > work.
> > -
> >  EMC Insertion Probability
> >  -
> >  By default 1 in every 100 flows are inserted into the Exact Match Cache
> > (EMC).
> > diff --git a/Documentation/topics/dpdk/index.rst
> > b/Documentation/topics/dpdk/index.rst
> > index 4b4dc119a..c1e6ea78c 100644
> > --- a/Documentation/topics/dpdk/index.rst
> > +++ b/Documentation/topics/dpdk/index.rst
> > @@ -34,4 +34,5 @@ The DPDK Datapath
> > /topics/dpdk/phy
> > /topics/dpdk/vhost-user
> > /topics/dpdk/ring
> > +   /topics/dpdk/vdev
> > /topics/dpdk/pmd
> > diff --git a/Documentation/topics/dpdk/vdev.rst
> > b/Documentation/topics/dpdk/vdev.rst
> 
> Compilation error, vdev.rst not listed in Documentation/automake.mk
> 
> > new file mode 100644
> > index 0..1b00ac573
> > --- /dev/null
> > +++ b/Documentation/topics/dpdk/vdev.rst
> > @@ -0,0 +1,59 @@
> > +..
> > +  Copyright 2018, Red Hat, Inc.
> > +
> > +  Licensed under the Apache License, Version 2.0 (the "License"); you
> > may
> > +  not use this file except in compliance with the License. You may
> > obtain
> > +  a copy of the License at
> > +
> > +  http://www.apache.org/licenses/LICENSE-2.0
> > +
> > +  Unless required by applicable law or agreed to in writing, software
> > +  distributed under the License is distributed on an "AS IS" BASIS,
> > WITHOUT
> > +  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> > See the
> > +  License for the specific language governing permissions and
> > limitations
> > +  under the License.
> > +
> > +  Convention for heading levels in Open vSwitch documentation:
> > +
> > +  ===  Heading 0 (reserved for the title in a document)
> > +  ---  Heading 1
> > +  ~~~  Heading 2
> > +  +++  Heading 3
> > +  '''  Heading 4
> > +
> > +  Avoid deeper levels because they do not render well.
> > +
> > +
> > +DPDK Virtual Devices
> > +
> > +
> 
> Support for vdevs was added as part of OVS 2.7, version change tag
> here to flag it wasn't there for 2.6 would be good.

Done

> > +DPDK provides drivers for both physical and virtual devices. Physical
> > +DPDK devices are added to OVS by specifying a valid PCI address in
> > ``dpdk-devargs``.
> > +Virtual DPDK devices which do not have PCI addresses can be added using
> > +a different format for ``dpdk-devargs``.
> > +
> > +.. note::
> > +
> > +Not all DPDK virtual PMD drivers have been tested and verified to
> > work.
> > +
> 
> Similar to vhost and phy devices I'd add a cross reference to the
> bridge document here after it's added.

Will do.

> > +Quick Example
> > +-
> > +
> > +To add a virtual ``dpdk`` devices, the ``dpdk-devargs`` 

Re: [ovs-dev] [PATCH v2 1/9] doc: Add an overview of the 'dpdk' port

2018-04-19 Thread Stephen Finucane
On Wed, 2018-04-18 at 15:30 +, Stokes, Ian wrote:
> > These ports are used to allow ingress/egress from the host and are
> > therefore _reasonably_ important. However, there is no clear overview of
> > what these ports actually are or why things are done the way they are.
> > Start closing this gap by providing a standalone example of using these
> > ports along with a little more detailed overview of the binding process.
> > 
> > There is additional cleanup to be done for the DPDK howto, but that will
> > be done separately.
> 
> This patch breaks compilation with the following
> 
> The following files are in git but not the distribution:
> Documentation/topics/dpdk/phy.rst
> 
> Need to add it to Documentation/automake.at

Whoops. I was building this with 'sphinx-build' directly to avoid
installing all the other build dependencies. Fixed now.

> > 
> > We enable the TODO directive so we can actually start calling out some
> > TODOs.
> > 
> > Signed-off-by: Stephen Finucane 
> > ---
> > v2:
> > - Add TODO for multiple ports sharing the same bus slot function
> >   (ian.stokes)
> > ---
> >  Documentation/conf.py   |   2 +-
> >  Documentation/topics/dpdk/index.rst |   1 +
> >  Documentation/topics/dpdk/phy.rst   | 115
> > 
> >  3 files changed, 117 insertions(+), 1 deletion(-)  create mode 100644
> > Documentation/topics/dpdk/phy.rst
> > 
> > diff --git a/Documentation/conf.py b/Documentation/conf.py index
> > 6ab144c5d..babda21de 100644
> > --- a/Documentation/conf.py
> > +++ b/Documentation/conf.py
> > @@ -32,7 +32,7 @@ needs_sphinx = '1.1'
> >  # Add any Sphinx extension module names here, as strings. They can be  #
> > extensions coming with Sphinx (named 'sphinx.ext.*') or your custom  #
> > ones.
> > -extensions = []
> > +extensions = ['sphinx.ext.todo']
> > 
> >  # Add any paths that contain templates here, relative to this directory.
> >  templates_path = ['_templates']
> > diff --git a/Documentation/topics/dpdk/index.rst
> > b/Documentation/topics/dpdk/index.rst
> > index da148b323..5f836a6e9 100644
> > --- a/Documentation/topics/dpdk/index.rst
> > +++ b/Documentation/topics/dpdk/index.rst
> > @@ -28,5 +28,6 @@ The DPDK Datapath
> >  .. toctree::
> > :maxdepth: 2
> > 
> > +   phy
> > vhost-user
> > ring
> > diff --git a/Documentation/topics/dpdk/phy.rst
> > b/Documentation/topics/dpdk/phy.rst
> > new file mode 100644
> > index 0..a3f8b475c
> > --- /dev/null
> > +++ b/Documentation/topics/dpdk/phy.rst
> > @@ -0,0 +1,115 @@
> > +..
> > +  Copyright 2018, Red Hat, Inc.
> > +
> > +  Licensed under the Apache License, Version 2.0 (the "License"); you
> > may
> > +  not use this file except in compliance with the License. You may
> > obtain
> > +  a copy of the License at
> > +
> > +  http://www.apache.org/licenses/LICENSE-2.0
> > +
> > +  Unless required by applicable law or agreed to in writing, software
> > +  distributed under the License is distributed on an "AS IS" BASIS,
> > WITHOUT
> > +  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> > See the
> > +  License for the specific language governing permissions and
> > limitations
> > +  under the License.
> > +
> > +  Convention for heading levels in Open vSwitch documentation:
> > +
> > +  ===  Heading 0 (reserved for the title in a document)
> > +  ---  Heading 1
> > +  ~~~  Heading 2
> > +  +++  Heading 3
> > +  '''  Heading 4
> > +
> > +  Avoid deeper levels because they do not render well.
> > +
> > +===
> > +DPDK Physical Ports
> > +===
> > +
> > +The netdev datapath allows attaching of DPDK-backed physical interfaces
> > +in order to provide high-performance ingress/egress from the host.
> > +
> > +.. versionchanged:: 2.7.0
> > +
> > +   Before Open vSwitch 2.7.0, it was necessary to prefix port names with
> > a
> > +   ``dpdk`` prefix. Starting with 2.7.0, this is no longer necessary.
> > +
> > +.. todo::
> > +
> > +   Add an example for multiple ports share the same bus slot function.
> > +
> > +Quick Example
> > +-
> > +
> > +This example demonstrates how to bind two ``dpdk`` ports, bound to
> > +physical interfaces identified by hardware IDs ``:01:00.0`` and
> > +``:01:00.1``, to an existing bridge called ``br0``::
> > +
> > +$ ovs-vsctl add-port br0 dpdk-p0 \
> > +   -- set Interface dpdk-p0 type=dpdk options:dpdk-
> > devargs=:01:00.0
> > +$ ovs-vsctl add-port br0 dpdk-p1 \
> > +   -- set Interface dpdk-p1 type=dpdk
> > + options:dpdk-devargs=:01:00.1
> > +
> > +For the above example to work, the two physical interfaces must be
> > +bound to the DPDK poll-mode drivers in userspace rather than the
> > +traditional kernel drivers. See the `binding NIC drivers  > nics>` section for details.
> > +
> > +.. _dpdk-binding-nics:
> > +
> > +Binding NIC Drivers
> > 

Re: [ovs-dev] [PATCH v1 3/4] docs: Fix sphinx urls.

2018-04-19 Thread Stephen Finucane
On Thu, 2018-04-19 at 11:49 +0100, Ian Stokes wrote:
> Update dead url links for sphinx documentation to avoid
> make check-docs failing.
> 
> Cc: Stephen Finucane 
> Fixes: 26ea2d409 ("docs: Add writing guide")
> Fixes: 73c76b447 ("doc: Add info on building documentation")
> Signed-off-by: Ian Stokes 
> ---
>  Documentation/internals/contributing/documentation-style.rst | 3 ++-
>  Documentation/intro/install/documentation.rst| 4 ++--
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/internals/contributing/documentation-style.rst 
> b/Documentation/internals/contributing/documentation-style.rst
> index 047f195..4e77db4 100644
> --- a/Documentation/internals/contributing/documentation-style.rst
> +++ b/Documentation/internals/contributing/documentation-style.rst
> @@ -441,4 +441,5 @@ Useful Links
>  - `Quick reStructuredText
>`__
>  
> -- `Sphinx Documentation `__
> +- `Sphinx Documentation
> +  `__

You're looking for this link:

  http://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html

I'd rather we stuck to the authoritative resource on this.

> diff --git a/Documentation/intro/install/documentation.rst 
> b/Documentation/intro/install/documentation.rst
> index 0eeeab1..d7eb25d 100644
> --- a/Documentation/intro/install/documentation.rst
> +++ b/Documentation/intro/install/documentation.rst
> @@ -58,7 +58,7 @@ wish to install using ``pip``::
>  $ source .venv/bin/activate
>  $ pip install -r Documentation/requirements.txt
>  
> -__ http://www.sphinx-doc.org/install.html
> +__ http://www.sphinx-doc.org/en/master/usage/installation.html
>  
>  Configuring
>  ---
> @@ -86,4 +86,4 @@ Makefile targets::
>  Once built, documentation is available in the ``/Documentation/_build`` 
> folder.
>  Open the root ``index.html`` to browse the documentation.
>  
> -__ http://www.sphinx-doc.org/config.html
> +__ http://www.sphinx-doc.org/en/master/config.html

Note that I'm planning to move this to 'usage/configuration.html'
shortly (I'm the one who's moving all those docs around). Not much we
can do until then though.

The one link aside, this LGTM.

Stephen
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v1 2/4] docs: Fix style guide url in DocumentationStyle.rst.

2018-04-19 Thread Stephen Finucane
On Thu, 2018-04-19 at 11:49 +0100, Ian Stokes wrote:
> The link used for IBM Style Guide is no longer valid. As there is no
> longer a valid link via redbooks remove the url to avoid make
> check-docs failing.
> 
> Cc: Stephen Finucane 
> Fixes: 26ea2d409 ("docs: Add writing guide")
> Signed-off-by: Ian Stokes 
> ---
>  Documentation/internals/contributing/documentation-style.rst | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/Documentation/internals/contributing/documentation-style.rst 
> b/Documentation/internals/contributing/documentation-style.rst
> index 9c47bd6..047f195 100644
> --- a/Documentation/internals/contributing/documentation-style.rst
> +++ b/Documentation/internals/contributing/documentation-style.rst
> @@ -358,8 +358,7 @@ Writing Style
>  -
>  
>  Follow these guidelines to ensure readability and consistency of the Open
> -vSwitch documentation. These guidelines are based on the `IBM Style Guide
> -`__.
> +vSwitch documentation. These guidelines are based on the `IBM Style Guide`.

s/`IBM Style Guide`/*IBM Style Guide*/

(I recently learnt the former means default role, which defaults to
italics but could actually be anything depending on configuration.
You're better off explicitly requesting italics)

In addition, I did find the following links which could be used:

 * http://ptgmedia.pearsoncmg.com/images/9780132101301/samplepages/0132
   101300.pdf
 * https://www.ibm.com/developerworks/library/styleguidelines/ (for
   developerWorks, but the ideas are the same)
 * https://www.safaribooksonline.com/library/view/the-ibm-style/9780132
   118989/ (paywall)

We could use any of these, if we chose. However, italics aside, I'm
still happy with this as-is so...

Acked-by: Stephen Finucane 

>  - Use standard US English
>  

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v1 4/4] docs: Fix urls in index.rst.

2018-04-19 Thread Stephen Finucane
On Thu, 2018-04-19 at 11:49 +0100, Ian Stokes wrote:
> This patch prepends 'www.' to openvswitch urls in index.rst. Without this
> make check-docs fails when verifying url liveness. Also remove url
> referencing ovsdb-server(5) as these are no longer accessible.
> 
> Cc: Stephen Finucane 
> Fixes: 4f6ec357c ("doc: Populate 'ref' section")
> Signed-off-by: Ian Stokes 

Acked-by: Stephen Finucane 

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v1 1/4] Docs: Fix sflow documentation url and markup.

2018-04-19 Thread Stephen Finucane
On Thu, 2018-04-19 at 11:49 +0100, Ian Stokes wrote:
> The link url link for the blog in sflow documentation causes make
> check-docs to fail with a broken link warning. Fix this by correcting
> the url address. Also use correct markup for note regarding the
> configuration of sflow.
> 
> CC: Stephen Finucane 
> Fixes: 198c5d3d0 ("doc: Add sFlow cookbook from website")
> Signed-off-by: Ian Stokes 

femotonit: s/Docs/docs/ (for the summary). Other than that...

Acked-by: Stephen Finucane 
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH] ofproto-dpif-upcall: Only call ovsrcu_postpone() on active actions

2018-04-19 Thread Eelco Chaudron
Currently, ovsrcu_postpone() is called even with a NULL argument,
i.e. when there is no data to be freed. This is causing additional
overhead because work is scheduled for the urcu thread. This change
avoids adding the postpone callback if no work needs to be done.

This especially helps for the OVS-DPDK case where the PMD threads
might no longer have to do a write() due to the latch_set(), and thus
saving a syscall.

Signed-off-by: Eelco Chaudron 
---
 ofproto/ofproto-dpif-upcall.c | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c
index 00160e1ee..d26f201f4 100644
--- a/ofproto/ofproto-dpif-upcall.c
+++ b/ofproto/ofproto-dpif-upcall.c
@@ -1621,8 +1621,13 @@ ukey_get_actions(struct udpif_key *ukey, const struct 
nlattr **actions, size_t *
 static void
 ukey_set_actions(struct udpif_key *ukey, const struct ofpbuf *actions)
 {
-ovsrcu_postpone(ofpbuf_delete,
-ovsrcu_get_protected(struct ofpbuf *, >actions));
+struct ofpbuf *old_actions = ovsrcu_get_protected(struct ofpbuf *,
+  >actions);
+
+if (old_actions) {
+ovsrcu_postpone(ofpbuf_delete, old_actions);
+}
+
 ovsrcu_set(>actions, ofpbuf_clone(actions));
 }
 
-- 
2.14.3

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v1 4/4] docs: Fix urls in index.rst.

2018-04-19 Thread Ian Stokes
This patch prepends 'www.' to openvswitch urls in index.rst. Without this
make check-docs fails when verifying url liveness. Also remove url
referencing ovsdb-server(5) as these are no longer accessible.

Cc: Stephen Finucane 
Fixes: 4f6ec357c ("doc: Populate 'ref' section")
Signed-off-by: Ian Stokes 
---
 Documentation/ref/index.rst | 214 ++--
 1 file changed, 105 insertions(+), 109 deletions(-)

diff --git a/Documentation/ref/index.rst b/Documentation/ref/index.rst
index 5c85132..3d511de 100644
--- a/Documentation/ref/index.rst
+++ b/Documentation/ref/index.rst
@@ -50,146 +50,142 @@ The remainder are still in roff format can be found below:
 .. list-table::
 
* - ovn-architecture(7)
- - `(pdf) 
`__
- - `(html) 
`__
- - `(plain text) 
`__
+ - `(pdf) 
`__
+ - `(html) 
`__
+ - `(plain text) 
`__
* - ovn-controller(8)
- - `(pdf) 
`__
- - `(html) 
`__
- - `(plain text) 
`__
+ - `(pdf) 
`__
+ - `(html) 
`__
+ - `(plain text) 
`__
* - ovn-controller-vtep(8)
- - `(pdf) 
`__
- - `(html) 
`__
- - `(plain text) 
`__
+ - `(pdf) 
`__
+ - `(html) 
`__
+ - `(plain text) 
`__
* - ovn-ctl(8)
- - `(pdf) `__
- - `(html) `__
- - `(plain text) 
`__
+ - `(pdf) `__
+ - `(html) `__
+ - `(plain text) 
`__
* - ovn-nb(5)
- - `(pdf) `__
- - `(html) `__
- - `(plain text) `__
+ - `(pdf) `__
+ - `(html) `__
+ - `(plain text) 
`__
* - ovn-nbctl(8)
- - `(pdf) `__
- - `(html) `__
- - `(plain text) 
`__
+ - `(pdf) `__
+ - `(html) 
`__
+ - `(plain text) 
`__
* - ovn-northd(8)
- - `(pdf) `__
- - `(html) `__
- - `(plain text) 
`__
+ - `(pdf) 
`__
+ - `(html) 
`__
+ - `(plain text) 
`__
* - ovn-sb(5)
- - `(pdf) `__
- - `(html) `__
- - `(plain text) `__
+ - `(pdf) `__
+ - `(html) `__
+ - `(plain text) 
`__
* - 

[ovs-dev] [PATCH v1 3/4] docs: Fix sphinx urls.

2018-04-19 Thread Ian Stokes
Update dead url links for sphinx documentation to avoid
make check-docs failing.

Cc: Stephen Finucane 
Fixes: 26ea2d409 ("docs: Add writing guide")
Fixes: 73c76b447 ("doc: Add info on building documentation")
Signed-off-by: Ian Stokes 
---
 Documentation/internals/contributing/documentation-style.rst | 3 ++-
 Documentation/intro/install/documentation.rst| 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Documentation/internals/contributing/documentation-style.rst 
b/Documentation/internals/contributing/documentation-style.rst
index 047f195..4e77db4 100644
--- a/Documentation/internals/contributing/documentation-style.rst
+++ b/Documentation/internals/contributing/documentation-style.rst
@@ -441,4 +441,5 @@ Useful Links
 - `Quick reStructuredText
   `__
 
-- `Sphinx Documentation `__
+- `Sphinx Documentation
+  `__
diff --git a/Documentation/intro/install/documentation.rst 
b/Documentation/intro/install/documentation.rst
index 0eeeab1..d7eb25d 100644
--- a/Documentation/intro/install/documentation.rst
+++ b/Documentation/intro/install/documentation.rst
@@ -58,7 +58,7 @@ wish to install using ``pip``::
 $ source .venv/bin/activate
 $ pip install -r Documentation/requirements.txt
 
-__ http://www.sphinx-doc.org/install.html
+__ http://www.sphinx-doc.org/en/master/usage/installation.html
 
 Configuring
 ---
@@ -86,4 +86,4 @@ Makefile targets::
 Once built, documentation is available in the ``/Documentation/_build`` folder.
 Open the root ``index.html`` to browse the documentation.
 
-__ http://www.sphinx-doc.org/config.html
+__ http://www.sphinx-doc.org/en/master/config.html
-- 
2.7.5

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v1 2/4] docs: Fix style guide url in DocumentationStyle.rst.

2018-04-19 Thread Ian Stokes
The link used for IBM Style Guide is no longer valid. As there is no
longer a valid link via redbooks remove the url to avoid make
check-docs failing.

Cc: Stephen Finucane 
Fixes: 26ea2d409 ("docs: Add writing guide")
Signed-off-by: Ian Stokes 
---
 Documentation/internals/contributing/documentation-style.rst | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/Documentation/internals/contributing/documentation-style.rst 
b/Documentation/internals/contributing/documentation-style.rst
index 9c47bd6..047f195 100644
--- a/Documentation/internals/contributing/documentation-style.rst
+++ b/Documentation/internals/contributing/documentation-style.rst
@@ -358,8 +358,7 @@ Writing Style
 -
 
 Follow these guidelines to ensure readability and consistency of the Open
-vSwitch documentation. These guidelines are based on the `IBM Style Guide
-`__.
+vSwitch documentation. These guidelines are based on the `IBM Style Guide`.
 
 - Use standard US English
 
-- 
2.7.5

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v1 1/4] Docs: Fix sflow documentation url and markup.

2018-04-19 Thread Ian Stokes
The link url link for the blog in sflow documentation causes make
check-docs to fail with a broken link warning. Fix this by correcting
the url address. Also use correct markup for note regarding the
configuration of sflow.

CC: Stephen Finucane 
Fixes: 198c5d3d0 ("doc: Add sFlow cookbook from website")
Signed-off-by: Ian Stokes 
---
 Documentation/howto/sflow.rst | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/Documentation/howto/sflow.rst b/Documentation/howto/sflow.rst
index afe1e7e..ae7737f 100644
--- a/Documentation/howto/sflow.rst
+++ b/Documentation/howto/sflow.rst
@@ -166,6 +166,9 @@ This document is heavily based on content from Neil McKee 
at InMon:
 - `https://mail.openvswitch.org/pipermail/ovs-dev/2010-July/165245.html
   `__
 
-- `http://blog.sflow.com/2010/01/open-vswitch.html
-  `__ (note: the configuration
-  syntax is out of date, but the high-level descriptions are correct)
+- `https://blog.sflow.com/2010/01/open-vswitch.html
+  `__
+
+.. note::
+  The configuration syntax is out of date, but the high-level
+  descriptions are correct.
-- 
2.7.5

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v1 0/4] Fix URLS and and associated markups.

2018-04-19 Thread Ian Stokes
Running make check-docs has caught a number of URLs that are no longer
active. This patch series updates the required URLs along with some mark-up
changes in the docs in relation to said URLs.

I originally looked at doing this in a single patch however as the URLs
are spread throughout the documentation and relate to different aspects
of OVS I thought it better to break this into 4 patches as the changes to
index and DocumentationStyle.rst may have more input than the others.

Ian Stokes (4):
  Docs: Fix sflow documentation url and markup.
  docs: Fix style guide url in DocumentationStyle.rst.
  docs: Fix sphinx urls.
  docs: Fix urls in index.rst.

 Documentation/howto/sflow.rst  |   9 +-
 .../internals/contributing/documentation-style.rst |   6 +-
 Documentation/intro/install/documentation.rst  |   4 +-
 Documentation/ref/index.rst| 214 ++---
 4 files changed, 116 insertions(+), 117 deletions(-)

-- 
2.7.5

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v2] rhel: user/group openvswitch does not exist

2018-04-19 Thread Alan Pevec
On Wed, Apr 18, 2018 at 5:54 PM, Aaron Conole  wrote:
> I can certainly re-add it.  The rationale section calls adding the 'exit
> 0' "...suboptimal but has less potential for system wide breakage..."
>
> I can go either way.  Maybe Alan or Timothy have opinions?

I'd stick to Fedora guideline.

Alan
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH 2/2] dpdk docs: Drop file share in libvirt config.

2018-04-19 Thread Stokes, Ian
> On Thu, 2018-04-12 at 08:24 +0100, Lam, Tiago wrote:
> > On 11/04/2018 15:03, Stephen Finucane wrote:
> > > On Wed, 2018-04-11 at 09:54 -0400, Aaron Conole wrote:
> > > > Tiago Lam  writes:
> > > >
> > > > > When explaining on how to add vhost-user ports to a guest, using
> > > > > libvirt, the following piece of configuration is used:
> > > > >  
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >  
> > > > >
> > > > > This is used to facilitate sharing of a DPDK directory between
> > > > > the host and the guest. However, for this to work selinux also
> > > > > needs to be configured (or disabled).  Furthermore, if one is
> > > > > using Ubuntu, libvirtd would need to be added to complain only
> > > > > in AppArmor. Instead, in [1] it is advised to use wget to get
> > > > > the DPDK sources over the internet, which avoids this
> > > > > differentiation. Thus, we drop this piece of configuration here as
> well and keep the example configuration as simple as possible.
> > > > >
> > > > > This has been verified on both a Fedora 27 image and a Ubuntu
> > > > > 16.04 LTS image.
> > > > >
> > > > > [1]
> > > > > http://docs.openvswitch.org/en/latest/topics/dpdk/vhost-user/#dp
> > > > > dk-in-the-guest
> > > > >
> > > > > Signed-off-by: Tiago Lam 
> > > > > ---
> > > > >
> > > > > CC'ed Stephen,
> > > > >
> > > > > I took the liberty of removing your TODO from here, as I read it
> > > > > to be related to the (now removed) SELinux instruction below. If
> > > > > you think it should still be there let me know and I'll gladly
> send a v2.
> > > >
> > > > I think it should remain until the selinux issues have been
> addressed.
> > > >
> > > > Is there a list somewhere of the AVC denials?  Maybe it makes
> > > > sense to allow them.
> > >
> > > If I'm reading this correctly, Tiago is saying these exceptions only
> > > happen because we're sharing an arbitrary directory with the guest
> > > to avoid downloading the DPDK sources twice. Given that there's a
> > > valid workaround (just fetching sources twice), simply removing that
> > > section of the XML removes the need to disable SELinux. If so,
> > > dropping the warning does make sense in my mind.
> > >
> > > Stephen
> > >
> >
> > Thanks, Stephen. Yeah, that's what I was aiming at. In order to get
> > the file sharing working properly, one must fiddle around with either
> > SELinux or AppArmor, and that seems to be the sole reason why
> > `setenforce 0` is there. Losing the dependency on the file sharing
> > means we can lose any instructions that tell the user how to fiddle
> > with either of those systems.
> >
> > Just a note though, in that the user won't have to download the DPDK
> > sources twice, only once. Following the guide, the user first sets up
> > the vhost-user ports using libvirt, and once inside the VM he should
> > follow up on running `testpmd` inside the guest [1], where he will be
> > instructed to download the DPDK sources. This makes this piece of the
> > docs a bit more consistent, I think.
> >
> > [1]
> > http://docs.openvswitch.org/en/latest/topics/dpdk/vhost-user/#dpdk-in-
> > the-guest
> 
> That all sounds fair to me.
> 
> Acked-by: Stephen Finucane 

Thanks all, pushed to DPDK_MERGE, I'll back port this to previous releases also.

Ian

> ___
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH 1/2] dpdk docs: Drop qemu-kvm for qemu-system-x86_64.

2018-04-19 Thread Stokes, Ian
> Tiago Lam  writes:
> 
> > When explaining on how to add vhost-user ports to a guest, using
> > libvirt, point to the qemu-system-x86_64 binary by default, instead of
> > using qemu-kvm. The latter has been made obsolete and dropped from a
> > number of distributions (although it is still available on Fedora).
> >
> > This has been verified on both a Fedora 27 image and a Ubuntu 16.04
> > LTS image.
> >
> > Signed-off-by: Tiago Lam 
> > ---
> >  Documentation/topics/dpdk/vhost-user.rst | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/Documentation/topics/dpdk/vhost-user.rst
> > b/Documentation/topics/dpdk/vhost-user.rst
> > index ca8a328..74bab78 100644
> > --- a/Documentation/topics/dpdk/vhost-user.rst
> > +++ b/Documentation/topics/dpdk/vhost-user.rst
> > @@ -401,7 +401,7 @@ Sample XML
> >restart
> >destroy
> >
> > -/usr/bin/qemu-kvm
> 
> Looks like this isn't even a proper path on some systems.  For example,
> RHEL7 it's:
> 
>   /usr/libexec/qemu-kvm
> 
> So it's doubly wrong.
> 
> > +/usr/bin/qemu-system-x86_64
> >  
> >
> >
> 
> On the other hand, on my RHEL7.4 system, I don't have qemu-system-x86_64,
> but I do have qemu-kvm.
> 
> I do like cookbook examples, but it seems that sometimes the care and
> feeding of these sections gets cumbersome.  Maybe there's a way of
> including just the xml portions we need for a vhost-enabled libvirt xml
> configuration?
> 
> Just a thought.
> 
> Anyway:
> 
>   Acked-by: Aaron Conole 

Thanks all, pushed to DPDK_MERGE, I'll back port this to previous releases also.

Ian

> 
> Thanks, Tiago!
> ___
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev