Re: [ovs-dev] [PATCH] datapath: add key support to CAPWAP tunnel

2011-09-09 Thread Simon Horman
On Thu, Sep 08, 2011 at 02:39:45AM -0700, Jesse Gross wrote: > From: Valient Gough > > Add tunnel key support to CAPWAP vport. Uses the optional WSI field in a > CAPWAP header to store a 64bit key. It can also be used without keys, in > which > case it is backward compatible with the old code.

[ovs-dev] [PATCH 1/3] ovs-ctl: Add load-kmod command

2011-09-09 Thread Simon Horman
On Debian there is a need for the init scripts to die gracefully if module insertion fails. In such a case it is desirable to print some sort of informative message. By adding the load-kmod sub-command to ovs-ctl init scripts may try to load modules and take appropriate action on failure or then t

[ovs-dev] [PATCH 2/3] Debian: fail gracefully if modules can't be loaded on install

2011-09-09 Thread Simon Horman
By registering an error-handler for the init script used in openvswitch-switch.postinst and detecting if module insertion fails, it is possible to avoid failure to install in the case where the openvswitch_mod module is not available. This is done without altering the behaviour that the start targ

[ovs-dev] [PATCH v3 0/3] Add load-kmod subcommand to ovs-ctl

2011-09-09 Thread Simon Horman
Hi, this series is comprised of an updated version of the changes I made for the 1.2.1-3 upload to Debian. The changes avoid install of the openvswitch-switch package failing in the case where the openvswtich_mod kernel module can't be loaded. Changes since v1 are indicated in the change log of e

[ovs-dev] [PATCH 3/3] Debian: Update changelog for 1.2.1-3 upload

2011-09-09 Thread Simon Horman
--- debian/changelog | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3940891..1f510f8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +openvswitch (1.2.1-3) unstable; urgency=low + + * Allow the op

Re: [ovs-dev] [PATCH] VLAN actions should use push/pop semantics

2011-09-09 Thread Pravin Shelar
On Thu, Sep 8, 2011 at 4:04 PM, Jesse Gross wrote: > On Wed, Sep 7, 2011 at 5:50 PM, Pravin Shelar wrote: >> Currently the kernel vlan actions mirror those used by OpenFlow 1.0. >> i.e. MODIFY and STRIP. More flexible approach is to have an action to push a >> tag and pop a tag off, so that it ca

Re: [ovs-dev] [PATCH] fix br_nlmsg_size

2011-09-09 Thread Pravin Shelar
On Fri, Sep 9, 2011 at 11:22 AM, Jesse Gross wrote: > On Thu, Sep 8, 2011 at 7:35 PM, Pravin Shelar wrote: >> I missed this in last vport iflink patch. >>    As IFLA_LINK is not be passed in netlink msg there is no need to >> allocate space for it. >> >> Signed-off-by: Pravin B Shelar > > Good c

Re: [ovs-dev] [PATCH v3] Improve kernel hash table

2011-09-09 Thread Pravin Shelar
On Fri, Sep 9, 2011 at 3:46 PM, Jesse Gross wrote: > On Fri, Sep 9, 2011 at 2:34 PM, Pravin Shelar wrote: >>> +       cancel_delayed_work_sync(&cache_cleaner_wq); >>> >>> This should have been stopped when the last port is removed, right? >>> >> I did it as it can cancel cache clearer in cas

Re: [ovs-dev] [learning v2 10/19] meta-flow: New library for working with fields by id.

2011-09-09 Thread Ethan Jackson
I think in general this patch would be cleaner if we required the void * parameters to be properly aligned. I don't think that should block it though, we can always change it later. I'm also wondering if it's possible to generate a lot of this code. At any rate, this is a step in the right direc

Re: [ovs-dev] [learning v2 19/19] ofproto-dpif: Optimize flow revalidation for MAC learning.

2011-09-09 Thread Ethan Jackson
> +/* Optimized flow revalidation. > + * > + * It's a difficult problem, in general, to tell which facets need to have > + * their actions recalculated whenever the OpenFlow flow table changes.  We > + * don't try to solve that general problem: for most kinds of OpenFlow flow > + * table changes, w

Re: [ovs-dev] [PATCH] netlink-socket: Avoid use-after-free in nl_lookup_genl_mcgroup().

2011-09-09 Thread Ben Pfaff
Thanks, I pushed this. On Fri, Sep 09, 2011 at 03:38:48PM -0700, Ethan Jackson wrote: > Looks good, > > Ethan > > On Fri, Sep 9, 2011 at 10:21, Ben Pfaff wrote: > > Commit e408762f "netlink-socket: New function nl_lookup_genl_mcgroup()" > > modified do_lookup_genl_family() to return the Netlink

Re: [ovs-dev] [PATCH] bridge: Avoid reading uninitialized data in bridge_pick_local_hw_addr().

2011-09-09 Thread Ben Pfaff
Thanks, I pushed this. On Fri, Sep 09, 2011 at 01:28:26PM -0700, Ethan Jackson wrote: > Looks good, > > Ethan > > On Fri, Sep 9, 2011 at 10:10, Ben Pfaff wrote: > > Commit 3a48ace3 "bridge: Make bridge_pick_local_hw_addr() easier to reason" > > didn't initialize 'ea' before trying to compare ag

Re: [ovs-dev] [learning v2 18/19] ofproto-dpif: Introduce an enum for the number of tables.

2011-09-09 Thread Ethan Jackson
> +/* Number of implemented OpenFlow tables.  Must be between 1 and 255. */ > +enum { N_TABLES = 255 }; Does it make sense to use BUILD_ASSERT to enforce the allowed range? Looks good, Ethan ___ dev mailing list dev@openvswitch.org http://openvswitch.or

Re: [ovs-dev] [PATCH v3] Improve kernel hash table

2011-09-09 Thread Jesse Gross
On Fri, Sep 9, 2011 at 2:34 PM, Pravin Shelar wrote: >> >>> +       cancel_delayed_work_sync(&cache_cleaner_wq); >> >> This should have been stopped when the last port is removed, right? >> > I did it as it can cancel cache clearer in case of bug related port not > deleted. It seems like there i

Re: [ovs-dev] [PATCH 1/2] ofproto: Fix documentation for calls to ->rule_destruct().

2011-09-09 Thread Ben Pfaff
I'm not going to update the code unless it causes trouble for some implementation. Thanks. On Fri, Sep 09, 2011 at 03:40:13PM -0700, Ethan Jackson wrote: > Looks good, > > Out of curiosity, are you planning to update the code, or is the > current implementation fine? > > Ethan > > On Thu, Sep

Re: [ovs-dev] [learning v2 17/19] flow: New function flow_wildcards_is_catchall().

2011-09-09 Thread Ethan Jackson
I would consider having this assert fail on FLOW_WC_SEQ. Seems fine otherwise, Ethan On Fri, Aug 19, 2011 at 15:28, Ben Pfaff wrote: > This will be used in an upcoming commit. > --- >  lib/flow.c |   26 ++ >  lib/flow.h |    1 + >  2 files changed, 27 insertions(+), 0 del

Re: [ovs-dev] [learning v2 16/19] classifier: Move zero_wildcards() to flow.c as public flow_zero_wildcards().

2011-09-09 Thread Ethan Jackson
Looks good, Ethan On Fri, Aug 19, 2011 at 15:28, Ben Pfaff wrote: > This function will soon be used elsewhere.  As it doesn't inherently have > anything to with the classifier, move it to flow.c. > --- >  lib/classifier.c |   63 + >  lib/flow.c

Re: [ovs-dev] [PATCH 1/2] ofproto: Fix documentation for calls to ->rule_destruct().

2011-09-09 Thread Ethan Jackson
Looks good, Out of curiosity, are you planning to update the code, or is the current implementation fine? Ethan On Thu, Sep 8, 2011 at 16:27, Ben Pfaff wrote: > This documented what I intended to implement and what I thought I had > implemented, but not what the code actually did.  It is a litt

Re: [ovs-dev] [PATCH] netlink-socket: Avoid use-after-free in nl_lookup_genl_mcgroup().

2011-09-09 Thread Ethan Jackson
Looks good, Ethan On Fri, Sep 9, 2011 at 10:21, Ben Pfaff wrote: > Commit e408762f "netlink-socket: New function nl_lookup_genl_mcgroup()" > modified do_lookup_genl_family() to return the Netlink attributes to the > caller, but it still freed the Netlink message itself, which meant that > the at

Re: [ovs-dev] [learning v2 15/19] Implement new "learn" action.

2011-09-09 Thread Ethan Jackson
I get the following compiler warning: lib/learn.c: In function 'learn_format': lib/learn.c:463:32: error: variable 'src_field' set but not used [-Werror=unused-but-set-variable] > ovs-vsctl del-controller br0 > ovs-ofctl del-flows br0 > ovs-ofctl add-flow br0 "table=0 actions=learn(ta

Re: [ovs-dev] [PATCH] Strip down vport interface : MTU

2011-09-09 Thread Jesse Gross
Moving this back on-list. On Fri, Sep 9, 2011 at 3:13 PM, Pravin Shelar wrote: >>> diff --git a/datapath/vport-internal_dev.c b/datapath/vport-internal_dev.c >>> index f777637..492bef7 100644 >>> --- a/datapath/vport-internal_dev.c >>> +++ b/datapath/vport-internal_dev.c >>> -static int internal_

Re: [ovs-dev] [PATCH] Strip down vport interface : MTU

2011-09-09 Thread Jesse Gross
On Thu, Sep 8, 2011 at 8:03 PM, Pravin Shelar wrote: > diff --git a/datapath/datapath.c b/datapath/datapath.c > index b92c198..aa33f63 100644 > --- a/datapath/datapath.c > +++ b/datapath/datapath.c > @@ -130,7 +130,6 @@ static inline size_t br_nlmsg_size(void) >               + nla_total_size(IFNA

Re: [ovs-dev] [PATCH v3] Improve kernel hash table

2011-09-09 Thread Pravin Shelar
> >> +       cancel_delayed_work_sync(&cache_cleaner_wq); > > This should have been stopped when the last port is removed, right? > I did it as it can cancel cache clearer in case of bug related port not deleted. >> +       for (i = 0; i < PORT_TABLE_SIZE; i++) { >> +               hash_head = &po

Re: [ovs-dev] [PATCH v3] Improve kernel hash table

2011-09-09 Thread Jesse Gross
On Thu, Sep 8, 2011 at 5:08 PM, Pravin Shelar wrote: >  Currently OVS uses its own hashing implmentation for hash tables > which has some problems, e.g. error case on deletion code. > Following patch replaces that with hlist based hash table which is > consistent with other kernel hash tables. As

Re: [ovs-dev] [cfm_v2 8/9] cfm: Eight byte MPIDs in extended mode.

2011-09-09 Thread Ethan Jackson
Thanks for the reviews, I've folded this change in and will merge shortly. Ethan On Fri, Sep 9, 2011 at 13:39, Ben Pfaff wrote: > On Fri, Sep 09, 2011 at 01:37:42PM -0700, Ethan Jackson wrote: >> > 1 and 2 are both in the range [1, 8191], so they would be allowed. >> > >> > The only disallowed

Re: [ovs-dev] [cfm_v2 8/9] cfm: Eight byte MPIDs in extended mode.

2011-09-09 Thread Ben Pfaff
On Fri, Sep 09, 2011 at 01:37:42PM -0700, Ethan Jackson wrote: > > 1 and 2 are both in the range [1, 8191], so they would be allowed. > > > > The only disallowed values would be 0 and [8192, UINT16_MAX]. > > That still feels a bit arbitrary to me. However, I realized that I > should probably rest

Re: [ovs-dev] [cfm_v2 8/9] cfm: Eight byte MPIDs in extended mode.

2011-09-09 Thread Ethan Jackson
> 1 and 2 are both in the range [1, 8191], so they would be allowed. > > The only disallowed values would be 0 and [8192, UINT16_MAX]. That still feels a bit arbitrary to me. However, I realized that I should probably restrict "0" as a valid mpid in extended mode. How about I change cfm_is_valid

Re: [ovs-dev] [PATCH] bridge: Avoid reading uninitialized data in bridge_pick_local_hw_addr().

2011-09-09 Thread Ethan Jackson
Looks good, Ethan On Fri, Sep 9, 2011 at 10:10, Ben Pfaff wrote: > Commit 3a48ace3 "bridge: Make bridge_pick_local_hw_addr() easier to reason" > didn't initialize 'ea' before trying to compare against it.  We need to > check that an address has been found. > --- >  vswitchd/bridge.c |    2 +- >

Re: [ovs-dev] [cfm_v2 8/9] cfm: Eight byte MPIDs in extended mode.

2011-09-09 Thread Ben Pfaff
[adding ovs-dev back] On Fri, Sep 09, 2011 at 01:23:58PM -0700, Ben Pfaff wrote: > On Fri, Sep 09, 2011 at 01:14:44PM -0700, Ethan Jackson wrote: > > > I'd be tempted to say that mpids must be in either range [1, 8191] or > > > [UINT16_MAX + 1, UINT64_MAX], which would allow cfm_is_valid_mpid() to

Re: [ovs-dev] [cfm_v2 9/9] cfm: Write remote MPIDs to the database.

2011-09-09 Thread Ethan Jackson
> cfm_destroy() should free ->rmps. good catch. Thanks for the review, On Fri, Sep 9, 2011 at 11:39, Ben Pfaff wrote: > On Thu, Sep 08, 2011 at 06:59:53PM -0700, Ethan Jackson wrote: >> A controller may want to know which MPIDs are reachable from an >> interface configured with CFM.  This patch

Re: [ovs-dev] [cfm_v2 5/9] cfm: Remove cfm_remote_mpid configuration.

2011-09-09 Thread Ben Pfaff
On Fri, Sep 09, 2011 at 12:58:36PM -0700, Ethan Jackson wrote: > > Also, am I reading the code correctly that too many RMPs triggers an > > unexpected_recv fault? ?Is that what we want? > > This is an edge case I suppose. I made a judgement call that it > should but I'd like to here another opini

Re: [ovs-dev] [cfm_v2 6/9] cfm: New cfm extended mode.

2011-09-09 Thread Ethan Jackson
Sounds good, I wrote a helper function and folded it into the patch. Ethan ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH 2/2] ofproto: Document that ->rule_construct() should uninitialize victim rules.

2011-09-09 Thread Ben Pfaff
Thanks, I pushed these to master. On Fri, Sep 09, 2011 at 12:53:43PM -0700, Hao Zheng wrote: > Looks good. > > On Fri, Sep 9, 2011 at 12:46 PM, Ben Pfaff wrote: > > > Hao pointed out out-of-band that this version still wasn't right. > > Third time's the charm? > > > > Additional incremental: >

Re: [ovs-dev] [PATCH 2/2] ofproto: Document that ->rule_construct() should uninitialize victim rules.

2011-09-09 Thread Hao Zheng
Looks good. On Fri, Sep 9, 2011 at 12:46 PM, Ben Pfaff wrote: > Hao pointed out out-of-band that this version still wasn't right. > Third time's the charm? > > Additional incremental: > > diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c > index c0b3474..15bcd13 100644 > --- a/ofproto/ofproto.c

Re: [ovs-dev] [PATCH 2/2] ofproto: Document that ->rule_construct() should uninitialize victim rules.

2011-09-09 Thread Ben Pfaff
Hao pointed out out-of-band that this version still wasn't right. Third time's the charm? Additional incremental: diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index c0b3474..15bcd13 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -2844,8 +2844,7 @@ ofoperation_destroy(struct ofope

[ovs-dev] E-mail vítaz.

2011-09-09 Thread publ...@virgilio.it
E-mail vítaz. Plaza Norte, 2449, Madrid, Španielsko. Pozor: Vítaz. Sme radi, že Vás informovat, že e-mailovú adresu sa objavili vítaz kategórie B štyristo pätdesiat tisíc eur (450,000.00 Euro) v Grand ponúka skupine Award. Tento e-mailom lotérie propagacné program je urcený na podporu inter

Re: [ovs-dev] [cfm_v2 2/9] bridge: Write CFM changes more aggressively.

2011-09-09 Thread Ben Pfaff
On Fri, Sep 09, 2011 at 11:45:56AM -0700, Ethan Jackson wrote: > This patch no longer rate limits database updates due to CFM > changes. Due to recent changes, the fault status of CFM only > changes once per 3.5 tx_interval seconds. There doesn't seem to be > a good reason to add an additional ra

[ovs-dev] [cfm_v2 2/9] bridge: Write CFM changes more aggressively.

2011-09-09 Thread Ethan Jackson
This patch no longer rate limits database updates due to CFM changes. Due to recent changes, the fault status of CFM only changes once per 3.5 tx_interval seconds. There doesn't seem to be a good reason to add an additional rate limit on top of this. --- vswitchd/bridge.c | 46

Re: [ovs-dev] [cfm_v2 9/9] cfm: Write remote MPIDs to the database.

2011-09-09 Thread Ben Pfaff
On Thu, Sep 08, 2011 at 06:59:53PM -0700, Ethan Jackson wrote: > A controller may want to know which MPIDs are reachable from an > interface configured with CFM. This patch regularly writes this > information to the database. > > Bug #7014. I think it would be nice if ofproto_port_get_cfm_remote

Re: [ovs-dev] [cfm_v2 8/9] cfm: Eight byte MPIDs in extended mode.

2011-09-09 Thread Ben Pfaff
On Thu, Sep 08, 2011 at 06:59:52PM -0700, Ethan Jackson wrote: > 802.1ag only allows for MPIDs in the range [1, 8191]. This is > restrictive enough to make assignment of MPIDs to instances of OVS > awkward. This patch allows six byte MPIDs when running in extended > mode. s/six/eight/ above. I'

Re: [ovs-dev] [cfm_v2 7/9] cfm: Allow accurate transmission intervals in extended mode.

2011-09-09 Thread Ben Pfaff
On Thu, Sep 08, 2011 at 06:59:51PM -0700, Ethan Jackson wrote: > The standard CFM protocol only allows a handful of transmission > rates. This is particularly problematic if you want to support a > transmission rate slower than 100 ms and faster than 1000 ms. > > This patch allows arbitrary trans

Re: [ovs-dev] [PATCH] fix br_nlmsg_size

2011-09-09 Thread Jesse Gross
On Thu, Sep 8, 2011 at 7:35 PM, Pravin Shelar wrote: > I missed this in last vport iflink patch. >    As IFLA_LINK is not be passed in netlink msg there is no need to > allocate space for it. > > Signed-off-by: Pravin B Shelar Good catch. Acked-by: Jesse Gross _

Re: [ovs-dev] [cfm_v2 6/9] cfm: New cfm extended mode.

2011-09-09 Thread Ben Pfaff
On Thu, Sep 08, 2011 at 06:59:50PM -0700, Ethan Jackson wrote: > The new extended mode introduced in this patch will be used for > features which break wire compatibility with 802.1ag compliant > implementations. > > Bug #7014. The expression "cfm->extended ? eth_addr_ccm_x : eth_addr_ccm" appear

Re: [ovs-dev] [cfm_v2 5/9] cfm: Remove cfm_remote_mpid configuration.

2011-09-09 Thread Ben Pfaff
On Thu, Sep 08, 2011 at 06:59:49PM -0700, Ethan Jackson wrote: > According to the 802.1ag specification, users should be able to > configure the CFM module with a list of remote endpoints with which > the local endpoint should have connectivity. Commit 93b8df3853 > "cfm: Remove Maintenance_Point a

Re: [ovs-dev] [cfm_v2 4/9] cfm: Trigger fault on unexpected CCM reception.

2011-09-09 Thread Ben Pfaff
Looks good, thank you. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [cfm_v2 3/9] bridge: Clear fault when CFM is not configured.

2011-09-09 Thread Ben Pfaff
Looks good, thank you. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [cfm_v2 2/9] bridge: Write CFM changes more aggressively.

2011-09-09 Thread Ben Pfaff
On Thu, Sep 08, 2011 at 06:59:46PM -0700, Ethan Jackson wrote: > This patch no longer rate limits database updates due to CFM > changes. Due to recent changes, the fault status of CFM only > changes once per 3.5 tx_interval seconds. There doesn't seem to be > a good reason to add an additional ra

Re: [ovs-dev] [cfm_v2 1/9] bridge: ovsdb_idl_omit_alert() on additional columns.

2011-09-09 Thread Ben Pfaff
On Thu, Sep 08, 2011 at 06:59:45PM -0700, Ethan Jackson wrote: > The bridge owns the lacp_current and cfm_fault columns and should > not be alerted when they change. Looks good, thank you. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/m

[ovs-dev] [PATCH] netlink-socket: Avoid use-after-free in nl_lookup_genl_mcgroup().

2011-09-09 Thread Ben Pfaff
Commit e408762f "netlink-socket: New function nl_lookup_genl_mcgroup()" modified do_lookup_genl_family() to return the Netlink attributes to the caller, but it still freed the Netlink message itself, which meant that the attributes pointed into freed memory. This commit fixes the problem. This co

[ovs-dev] [PATCH] bridge: Avoid reading uninitialized data in bridge_pick_local_hw_addr().

2011-09-09 Thread Ben Pfaff
Commit 3a48ace3 "bridge: Make bridge_pick_local_hw_addr() easier to reason" didn't initialize 'ea' before trying to compare against it. We need to check that an address has been found. --- vswitchd/bridge.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/vswitchd/bridge.

Re: [ovs-dev] [PATCH 2/2] ofproto: Document that ->rule_construct() should uninitialize victim rules.

2011-09-09 Thread Ben Pfaff
On Thu, Sep 08, 2011 at 04:53:47PM -0700, Hao Zheng wrote: > > + * - If 'op' is an "add flow" operation, ofproto removes the new rule or > > + * restores the original rule. ofoperation_complete() performs steps > > 5, 6, > > + * and 7 for the new rule, most notably by calling its > > ->r

Re: [ovs-dev] flows in Flow Table?

2011-09-09 Thread Ben Pfaff
No. A new OpenFlow flow goes into the classifier. A packet with field values not yet seen goes into the datapath flow table (e.g. dp_netdev or dpif-linux). On Fri, Sep 09, 2011 at 10:04:46AM +0500, Bibrak Qamar wrote: > So that means when a new flow comes its written in both classifier and > net