|
@@ -49,7 +49,7 @@ struct lb_port_mapping {
|
|
struct lb_priv_ex {
|
|
struct lb_priv_ex {
|
|
struct team *team;
|
|
struct team *team;
|
|
struct lb_port_mapping tx_hash_to_port_mapping[LB_TX_HASHTABLE_SIZE];
|
|
struct lb_port_mapping tx_hash_to_port_mapping[LB_TX_HASHTABLE_SIZE];
|
|
- struct sock_fprog *orig_fprog;
|
|
|
|
|
|
+ struct sock_fprog_kern *orig_fprog;
|
|
struct {
|
|
struct {
|
|
unsigned int refresh_interval; /* in tenths of second */
|
|
unsigned int refresh_interval; /* in tenths of second */
|
|
struct delayed_work refresh_dw;
|
|
struct delayed_work refresh_dw;
|
|
@@ -241,10 +241,10 @@ static int lb_bpf_func_get(struct team *team, struct team_gsetter_ctx *ctx)
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
-static int __fprog_create(struct sock_fprog **pfprog, u32 data_len,
|
|
|
|
|
|
+static int __fprog_create(struct sock_fprog_kern **pfprog, u32 data_len,
|
|
const void *data)
|
|
const void *data)
|
|
{
|
|
{
|
|
- struct sock_fprog *fprog;
|
|
|
|
|
|
+ struct sock_fprog_kern *fprog;
|
|
struct sock_filter *filter = (struct sock_filter *) data;
|
|
struct sock_filter *filter = (struct sock_filter *) data;
|
|
|
|
|
|
if (data_len % sizeof(struct sock_filter))
|
|
if (data_len % sizeof(struct sock_filter))
|
|
@@ -262,7 +262,7 @@ static int __fprog_create(struct sock_fprog **pfprog, u32 data_len,
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
-static void __fprog_destroy(struct sock_fprog *fprog)
|
|
|
|
|
|
+static void __fprog_destroy(struct sock_fprog_kern *fprog)
|
|
{
|
|
{
|
|
kfree(fprog->filter);
|
|
kfree(fprog->filter);
|
|
kfree(fprog);
|
|
kfree(fprog);
|
|
@@ -273,7 +273,7 @@ static int lb_bpf_func_set(struct team *team, struct team_gsetter_ctx *ctx)
|
|
struct lb_priv *lb_priv = get_lb_priv(team);
|
|
struct lb_priv *lb_priv = get_lb_priv(team);
|
|
struct sk_filter *fp = NULL;
|
|
struct sk_filter *fp = NULL;
|
|
struct sk_filter *orig_fp;
|
|
struct sk_filter *orig_fp;
|
|
- struct sock_fprog *fprog = NULL;
|
|
|
|
|
|
+ struct sock_fprog_kern *fprog = NULL;
|
|
int err;
|
|
int err;
|
|
|
|
|
|
if (ctx->data.bin_val.len) {
|
|
if (ctx->data.bin_val.len) {
|