* [PATCH] sqlite3: Remove unused "buffer" option.
@ 2016-01-01 17:05 Alex Xu
2016-01-13 14:12 ` Eric Leblond
0 siblings, 1 reply; 4+ messages in thread
From: Alex Xu @ 2016-01-01 17:05 UTC (permalink / raw)
To: netfilter-devel; +Cc: laforge, pablo, eric, Alex Xu
---
doc/ulogd.sgml | 2 --
output/sqlite3/ulogd_output_SQLITE3.c | 17 +----------------
ulogd.conf.in | 2 --
3 files changed, 1 insertion(+), 20 deletions(-)
diff --git a/doc/ulogd.sgml b/doc/ulogd.sgml
index 30bfecb..65a63cf 100644
--- a/doc/ulogd.sgml
+++ b/doc/ulogd.sgml
@@ -603,8 +603,6 @@ The module defines the following configuration directives:
Name of the table to which ulogd should log.
<tag>db</tag>
Name of the database.
-<tag>buffer</tag>
-Size of the sqlite buffer.
</descrip>
</sect2>
diff --git a/output/sqlite3/ulogd_output_SQLITE3.c b/output/sqlite3/ulogd_output_SQLITE3.c
index 5c49055..20ceb3b 100644
--- a/output/sqlite3/ulogd_output_SQLITE3.c
+++ b/output/sqlite3/ulogd_output_SQLITE3.c
@@ -63,8 +63,6 @@ struct sqlite3_priv {
struct field_lh fields;
char *stmt;
sqlite3_stmt *p_stmt;
- int buffer_size;
- int buffer_curr;
struct {
unsigned err_tbl_busy; /* "Table busy" */
} stats;
@@ -83,18 +81,11 @@ static struct config_keyset sqlite3_kset = {
.type = CONFIG_TYPE_STRING,
.options = CONFIG_OPT_MANDATORY,
},
- {
- .key = "buffer",
- .type = CONFIG_TYPE_INT,
- .options = CONFIG_OPT_NONE,
- .u.value = CFG_BUFFER_DEFAULT,
- },
},
};
#define db_ce(pi) (pi)->config_kset->ces[0].u.string
#define table_ce(pi) (pi)->config_kset->ces[1].u.string
-#define buffer_ce(pi) (pi)->config_kset->ces[2].u.value
/* forward declarations */
static int sqlite3_createstmt(struct ulogd_pluginstance *);
@@ -107,9 +98,7 @@ add_row(struct ulogd_pluginstance *pi)
int ret;
ret = sqlite3_step(priv->p_stmt);
- if (ret == SQLITE_DONE)
- priv->buffer_curr++;
- else if (ret == SQLITE_BUSY)
+ if (ret == SQLITE_BUSY)
priv->stats.err_tbl_busy++;
else if (ret == SQLITE_ERROR) {
ret = sqlite3_finalize(priv->p_stmt);
@@ -404,10 +393,6 @@ sqlite3_start(struct ulogd_pluginstance *pi)
return -1;
}
- /* initialize our buffer size and counter */
- priv->buffer_size = buffer_ce(pi);
- priv->buffer_curr = 0;
-
/* create and prepare the actual insert statement */
sqlite3_createstmt(pi);
diff --git a/ulogd.conf.in b/ulogd.conf.in
index 9624a4b..2fcf39a 100644
--- a/ulogd.conf.in
+++ b/ulogd.conf.in
@@ -301,12 +301,10 @@ procedure="INSERT_PACKET_FULL"
[sqlite3_ct]
table="ulog_ct"
db="/var/log/ulogd.sqlite3db"
-buffer=200
[sqlite3_pkt]
table="ulog_pkt"
db="/var/log/ulogd.sqlite3db"
-buffer=200
[sys2]
facility=LOG_LOCAL2
--
2.6.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] sqlite3: Remove unused "buffer" option.
2016-01-01 17:05 [PATCH] sqlite3: Remove unused "buffer" option Alex Xu
@ 2016-01-13 14:12 ` Eric Leblond
0 siblings, 0 replies; 4+ messages in thread
From: Eric Leblond @ 2016-01-13 14:12 UTC (permalink / raw)
To: Alex Xu, netfilter-devel; +Cc: pablo
Hello,
Good for me but I will need a Signed-off-by line in your patch to be
able to push it.
Thanks for this work.
--
Eric
On Fri, 2016-01-01 at 12:05 -0500, Alex Xu wrote:
> ---
> doc/ulogd.sgml | 2 --
> output/sqlite3/ulogd_output_SQLITE3.c | 17 +----------------
> ulogd.conf.in | 2 --
> 3 files changed, 1 insertion(+), 20 deletions(-)
>
> diff --git a/doc/ulogd.sgml b/doc/ulogd.sgml
> index 30bfecb..65a63cf 100644
> --- a/doc/ulogd.sgml
> +++ b/doc/ulogd.sgml
> @@ -603,8 +603,6 @@ The module defines the following configuration
> directives:
> Name of the table to which ulogd should log.
> <tag>db</tag>
> Name of the database.
> -<tag>buffer</tag>
> -Size of the sqlite buffer.
> </descrip>
> </sect2>
>
> diff --git a/output/sqlite3/ulogd_output_SQLITE3.c
> b/output/sqlite3/ulogd_output_SQLITE3.c
> index 5c49055..20ceb3b 100644
> --- a/output/sqlite3/ulogd_output_SQLITE3.c
> +++ b/output/sqlite3/ulogd_output_SQLITE3.c
> @@ -63,8 +63,6 @@ struct sqlite3_priv {
> struct field_lh fields;
> char *stmt;
> sqlite3_stmt *p_stmt;
> - int buffer_size;
> - int buffer_curr;
> struct {
> unsigned err_tbl_busy; /* "Table busy" */
> } stats;
> @@ -83,18 +81,11 @@ static struct config_keyset sqlite3_kset = {
> .type = CONFIG_TYPE_STRING,
> .options = CONFIG_OPT_MANDATORY,
> },
> - {
> - .key = "buffer",
> - .type = CONFIG_TYPE_INT,
> - .options = CONFIG_OPT_NONE,
> - .u.value = CFG_BUFFER_DEFAULT,
> - },
> },
> };
>
> #define db_ce(pi) (pi)->config_kset->ces[0].u.string
> #define table_ce(pi) (pi)->config_kset->ces[1].u.string
> -#define buffer_ce(pi) (pi)->config_kset->ces[2].u.value
>
> /* forward declarations */
> static int sqlite3_createstmt(struct ulogd_pluginstance *);
> @@ -107,9 +98,7 @@ add_row(struct ulogd_pluginstance *pi)
> int ret;
>
> ret = sqlite3_step(priv->p_stmt);
> - if (ret == SQLITE_DONE)
> - priv->buffer_curr++;
> - else if (ret == SQLITE_BUSY)
> + if (ret == SQLITE_BUSY)
> priv->stats.err_tbl_busy++;
> else if (ret == SQLITE_ERROR) {
> ret = sqlite3_finalize(priv->p_stmt);
> @@ -404,10 +393,6 @@ sqlite3_start(struct ulogd_pluginstance *pi)
> return -1;
> }
>
> - /* initialize our buffer size and counter */
> - priv->buffer_size = buffer_ce(pi);
> - priv->buffer_curr = 0;
> -
> /* create and prepare the actual insert statement */
> sqlite3_createstmt(pi);
>
> diff --git a/ulogd.conf.in b/ulogd.conf.in
> index 9624a4b..2fcf39a 100644
> --- a/ulogd.conf.in
> +++ b/ulogd.conf.in
> @@ -301,12 +301,10 @@ procedure="INSERT_PACKET_FULL"
> [sqlite3_ct]
> table="ulog_ct"
> db="/var/log/ulogd.sqlite3db"
> -buffer=200
>
> [sqlite3_pkt]
> table="ulog_pkt"
> db="/var/log/ulogd.sqlite3db"
> -buffer=200
>
> [sys2]
> facility=LOG_LOCAL2
--
Eric Leblond <eric@regit.org>
Blog: https://home.regit.org/
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] sqlite3: Remove unused "buffer" option.
2016-01-13 20:37 Alex Xu (Hello71)
@ 2016-01-19 21:39 ` Eric Leblond
0 siblings, 0 replies; 4+ messages in thread
From: Eric Leblond @ 2016-01-19 21:39 UTC (permalink / raw)
To: Alex Xu (Hello71), netfilter-devel; +Cc: pablo
Hello,
On Wed, 2016-01-13 at 15:37 -0500, Alex Xu (Hello71) wrote:
> From: Alex Xu <alex_y_xu@yahoo.ca>
>
> This option was left behind when the code was rewritten and is no
> longer
> functional or useful. Remove it entirely.
>
> Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
Thanks! Applied and pushed.
BR,
--
Eric
> ---
> doc/ulogd.sgml | 2 --
> output/sqlite3/ulogd_output_SQLITE3.c | 17 +----------------
> ulogd.conf.in | 2 --
> 3 files changed, 1 insertion(+), 20 deletions(-)
>
> diff --git a/doc/ulogd.sgml b/doc/ulogd.sgml
> index 30bfecb..65a63cf 100644
> --- a/doc/ulogd.sgml
> +++ b/doc/ulogd.sgml
> @@ -603,8 +603,6 @@ The module defines the following configuration
> directives:
> Name of the table to which ulogd should log.
> <tag>db</tag>
> Name of the database.
> -<tag>buffer</tag>
> -Size of the sqlite buffer.
> </descrip>
> </sect2>
>
> diff --git a/output/sqlite3/ulogd_output_SQLITE3.c
> b/output/sqlite3/ulogd_output_SQLITE3.c
> index 5c49055..20ceb3b 100644
> --- a/output/sqlite3/ulogd_output_SQLITE3.c
> +++ b/output/sqlite3/ulogd_output_SQLITE3.c
> @@ -63,8 +63,6 @@ struct sqlite3_priv {
> struct field_lh fields;
> char *stmt;
> sqlite3_stmt *p_stmt;
> - int buffer_size;
> - int buffer_curr;
> struct {
> unsigned err_tbl_busy; /* "Table busy" */
> } stats;
> @@ -83,18 +81,11 @@ static struct config_keyset sqlite3_kset = {
> .type = CONFIG_TYPE_STRING,
> .options = CONFIG_OPT_MANDATORY,
> },
> - {
> - .key = "buffer",
> - .type = CONFIG_TYPE_INT,
> - .options = CONFIG_OPT_NONE,
> - .u.value = CFG_BUFFER_DEFAULT,
> - },
> },
> };
>
> #define db_ce(pi) (pi)->config_kset->ces[0].u.string
> #define table_ce(pi) (pi)->config_kset->ces[1].u.string
> -#define buffer_ce(pi) (pi)->config_kset->ces[2].u.value
>
> /* forward declarations */
> static int sqlite3_createstmt(struct ulogd_pluginstance *);
> @@ -107,9 +98,7 @@ add_row(struct ulogd_pluginstance *pi)
> int ret;
>
> ret = sqlite3_step(priv->p_stmt);
> - if (ret == SQLITE_DONE)
> - priv->buffer_curr++;
> - else if (ret == SQLITE_BUSY)
> + if (ret == SQLITE_BUSY)
> priv->stats.err_tbl_busy++;
> else if (ret == SQLITE_ERROR) {
> ret = sqlite3_finalize(priv->p_stmt);
> @@ -404,10 +393,6 @@ sqlite3_start(struct ulogd_pluginstance *pi)
> return -1;
> }
>
> - /* initialize our buffer size and counter */
> - priv->buffer_size = buffer_ce(pi);
> - priv->buffer_curr = 0;
> -
> /* create and prepare the actual insert statement */
> sqlite3_createstmt(pi);
>
> diff --git a/ulogd.conf.in b/ulogd.conf.in
> index 9624a4b..2fcf39a 100644
> --- a/ulogd.conf.in
> +++ b/ulogd.conf.in
> @@ -301,12 +301,10 @@ procedure="INSERT_PACKET_FULL"
> [sqlite3_ct]
> table="ulog_ct"
> db="/var/log/ulogd.sqlite3db"
> -buffer=200
>
> [sqlite3_pkt]
> table="ulog_pkt"
> db="/var/log/ulogd.sqlite3db"
> -buffer=200
>
> [sys2]
> facility=LOG_LOCAL2
--
Eric Leblond <eric@regit.org>
Blog: https://home.regit.org/
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] sqlite3: Remove unused "buffer" option.
@ 2016-01-13 20:37 Alex Xu (Hello71)
2016-01-19 21:39 ` Eric Leblond
0 siblings, 1 reply; 4+ messages in thread
From: Alex Xu (Hello71) @ 2016-01-13 20:37 UTC (permalink / raw)
To: netfilter-devel; +Cc: laforge, pablo, eric, Alex Xu
From: Alex Xu <alex_y_xu@yahoo.ca>
This option was left behind when the code was rewritten and is no longer
functional or useful. Remove it entirely.
Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
---
doc/ulogd.sgml | 2 --
output/sqlite3/ulogd_output_SQLITE3.c | 17 +----------------
ulogd.conf.in | 2 --
3 files changed, 1 insertion(+), 20 deletions(-)
diff --git a/doc/ulogd.sgml b/doc/ulogd.sgml
index 30bfecb..65a63cf 100644
--- a/doc/ulogd.sgml
+++ b/doc/ulogd.sgml
@@ -603,8 +603,6 @@ The module defines the following configuration directives:
Name of the table to which ulogd should log.
<tag>db</tag>
Name of the database.
-<tag>buffer</tag>
-Size of the sqlite buffer.
</descrip>
</sect2>
diff --git a/output/sqlite3/ulogd_output_SQLITE3.c b/output/sqlite3/ulogd_output_SQLITE3.c
index 5c49055..20ceb3b 100644
--- a/output/sqlite3/ulogd_output_SQLITE3.c
+++ b/output/sqlite3/ulogd_output_SQLITE3.c
@@ -63,8 +63,6 @@ struct sqlite3_priv {
struct field_lh fields;
char *stmt;
sqlite3_stmt *p_stmt;
- int buffer_size;
- int buffer_curr;
struct {
unsigned err_tbl_busy; /* "Table busy" */
} stats;
@@ -83,18 +81,11 @@ static struct config_keyset sqlite3_kset = {
.type = CONFIG_TYPE_STRING,
.options = CONFIG_OPT_MANDATORY,
},
- {
- .key = "buffer",
- .type = CONFIG_TYPE_INT,
- .options = CONFIG_OPT_NONE,
- .u.value = CFG_BUFFER_DEFAULT,
- },
},
};
#define db_ce(pi) (pi)->config_kset->ces[0].u.string
#define table_ce(pi) (pi)->config_kset->ces[1].u.string
-#define buffer_ce(pi) (pi)->config_kset->ces[2].u.value
/* forward declarations */
static int sqlite3_createstmt(struct ulogd_pluginstance *);
@@ -107,9 +98,7 @@ add_row(struct ulogd_pluginstance *pi)
int ret;
ret = sqlite3_step(priv->p_stmt);
- if (ret == SQLITE_DONE)
- priv->buffer_curr++;
- else if (ret == SQLITE_BUSY)
+ if (ret == SQLITE_BUSY)
priv->stats.err_tbl_busy++;
else if (ret == SQLITE_ERROR) {
ret = sqlite3_finalize(priv->p_stmt);
@@ -404,10 +393,6 @@ sqlite3_start(struct ulogd_pluginstance *pi)
return -1;
}
- /* initialize our buffer size and counter */
- priv->buffer_size = buffer_ce(pi);
- priv->buffer_curr = 0;
-
/* create and prepare the actual insert statement */
sqlite3_createstmt(pi);
diff --git a/ulogd.conf.in b/ulogd.conf.in
index 9624a4b..2fcf39a 100644
--- a/ulogd.conf.in
+++ b/ulogd.conf.in
@@ -301,12 +301,10 @@ procedure="INSERT_PACKET_FULL"
[sqlite3_ct]
table="ulog_ct"
db="/var/log/ulogd.sqlite3db"
-buffer=200
[sqlite3_pkt]
table="ulog_pkt"
db="/var/log/ulogd.sqlite3db"
-buffer=200
[sys2]
facility=LOG_LOCAL2
--
2.7.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-01-19 21:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-01 17:05 [PATCH] sqlite3: Remove unused "buffer" option Alex Xu
2016-01-13 14:12 ` Eric Leblond
2016-01-13 20:37 Alex Xu (Hello71)
2016-01-19 21:39 ` Eric Leblond
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.